JAR: JAM Axiomatic Reference

4.6. State Types (§4)🔗

🔗structure
Jar.JudgmentsState : Type
Jar.JudgmentsState : Type

ψ : Judgment state. GP §10.1. ψ = ⟨ψ_G, ψ_B, ψ_W, ψ_O⟩

Constructor

Jar.JudgmentsState.mk

Fields

good : Array Hash

ψ_G : Set of good (valid) work-report hashes.

bad : Array Hash

ψ_B : Set of bad (invalid) work-report hashes.

wonky : Array Hash

ψ_W : Set of wonky (uncertain) work-report hashes.

offenders : Array Ed25519PublicKey

ψ_O : Set of offending validator Ed25519 keys.

🔗structure
Jar.RecentBlockInfo : Type
Jar.RecentBlockInfo : Type

A single entry in the recent block history. GP §7. ⟨h, s, b, p⟩

Constructor

Jar.RecentBlockInfo.mk

Fields

headerHash : Hash

h : Header hash. ℍ.

stateRoot : Hash

s : State root. ℍ.

accOutputRoot : Hash

b : Accumulation-output log super-peak. ℍ.

reportedPackages : Dict Hash Hash

p : Reported work-package hashes. ⟨ℍ→ℍ⟩.

🔗structure
Jar.RecentHistory : Type
Jar.RecentHistory : Type

β : Recent history state. GP §7. Composed of block history and accumulation-output belt. β = ⟨β_H, β_B⟩

Constructor

Jar.RecentHistory.mk

Fields

blocks : Array Jar.RecentBlockInfo

β_H : Recent block infos. ⟦RecentBlockInfo⟧_{:H}.

accOutputBelt : Array (Option Hash)

β_B : Accumulation-output belt. ⟦ℍ?⟧.

🔗structure
Jar.ValidatorRecord : Type
Jar.ValidatorRecord : Type

Per-validator activity record. GP §13.1.

Constructor

Jar.ValidatorRecord.mk

Fields

blocks : Nat

b : Blocks produced.

tickets : Nat

t : Tickets introduced.

preimageCount : Nat

p : Preimages introduced (count).

preimageSize : Nat

d : Preimage data introduced (bytes).

guarantees : Nat

g : Reports guaranteed.

assurances : Nat

a : Assurances made.

🔗structure
Jar.CoreStatistics : Type
Jar.CoreStatistics : Type

Per-core statistics for a block. GP §13.2.

Constructor

Jar.CoreStatistics.mk

Fields

daLoad : Nat

d : DA bytes written.

popularity : Nat

p : Validators assuring (popularity).

imports : Nat

i : Segments imported.

extrinsicCount : Nat

x : Extrinsic count.

extrinsicSize : Nat

z : Extrinsic size.

exports : Nat

e : Segments exported.

bundleSize : Nat

l : Work bundle size.

gasUsed : Jar.Gas

u : Gas consumed. ℕ_G.

🔗structure
Jar.ServiceStatistics : Type
Jar.ServiceStatistics : Type

Per-service statistics for a block. GP §13.2.

Constructor

Jar.ServiceStatistics.mk

Fields

provided : Nat × Nat

p : Preimages provided (count, size).

refinement : Nat × Jar.Gas

r : Refinement (count, gas).

imports : Nat

i : Segments imported.

extrinsicCount : Nat

x : Extrinsic count.

extrinsicSize : Nat

z : Extrinsic size.

exports : Nat

e : Segments exported.

accumulation : Nat × Jar.Gas

a : Accumulation (count, gas).

🔗structure
Jar.ActivityStatistics : Type
Jar.ActivityStatistics : Type

π : Validator activity statistics. GP §13. π = ⟨π_V, π_L, π_C, π_S⟩

Constructor

Jar.ActivityStatistics.mk

Fields

current : Array Jar.ValidatorRecord

π_V : Current epoch validator stats. ⟦ValidatorRecord⟧_V.

previous : Array Jar.ValidatorRecord

π_L : Previous epoch validator stats. ⟦ValidatorRecord⟧_V.

coreStats : Array Jar.CoreStatistics

π_C : Core statistics (per-block). ⟦CoreStatistics⟧_C.

serviceStats : Dict Jar.ServiceId Jar.ServiceStatistics

π_S : Service statistics (per-block). ⟨ℕ_S → ServiceStatistics⟩.

🔗structure
Jar.State [Jar.JamConfig] : Type
Jar.State [Jar.JamConfig] : Type

σ : Complete chain state. GP eq (6). σ ≡ (α, β, θ, γ, δ, η, ι, κ, λ, ρ, τ, ϕ, χ, ψ, π, ω, ξ)

Constructor

Jar.State.mk

Fields

authPool : Array (Array Hash)

α : Authorization pool. ⟦⟦ℍ⟧_{:O}⟧_C. Per-core pool of authorized code hashes.

recent : Jar.RecentHistory

β : Recent block history.

accOutputs : Jar.AccumulationOutputs

θ : Most recent accumulation outputs.

safrole : Jar.SafroleState

γ : Safrole consensus state.

services : Dict Jar.ServiceId Jar.ServiceAccount

δ : Service accounts. ⟨ℕ_S → 𝔸⟩.

entropy : Jar.Entropy

η : Entropy accumulator. ⟦ℍ⟧_4.

pendingValidators : Array Jar.ValidatorKey

ι : Pending (staging) validator keys for next epoch. ⟦𝕂⟧_V.

currentValidators : Array Jar.ValidatorKey

κ : Current (active) validator keys. ⟦𝕂⟧_V.

previousValidators : Array Jar.ValidatorKey

λ : Previous validator keys. ⟦𝕂⟧_V.

pendingReports : Array (Option Jar.PendingReport)

ρ : Pending work reports per core. ⟦PendingReport?⟧_C.

timeslot : Jar.Timeslot

τ : Current timeslot. ℕ_T.

authQueue : Array (Array Hash)

ϕ : Authorization queue. ⟦⟦ℍ⟧_Q⟧_C. Per-core queue of authorized code hashes.

privileged : Jar.PrivilegedServices

χ : Privileged service identifiers.

judgments : Jar.JudgmentsState

ψ : Past judgments.

statistics : Jar.ActivityStatistics

π : Validator activity statistics.

accQueue : Array (Array (Jar.WorkReport × Array Hash))

ω : Accumulation queue (ready work-reports).

accHistory : Array (Array Hash)

ξ : Accumulated work-package hashes history.