JAR: JAM Axiomatic Reference

7.3. Recent History (§4.2)🔗

🔗def
Jar.updateParentStateRoot [Jar.JamConfig] (bs : Jar.RecentHistory) (h : Jar.Header) : Jar.RecentHistory
Jar.updateParentStateRoot [Jar.JamConfig] (bs : Jar.RecentHistory) (h : Jar.Header) : Jar.RecentHistory

β† : Update last entry's state root with parent's prior state root. GP eq (24).

🔗def
Jar.computeAccumulateRoot (outputs : Jar.AccumulationOutputs) : Hash
Jar.computeAccumulateRoot (outputs : Jar.AccumulationOutputs) : Hash

Compute accumulate root hash from accumulation outputs. Uses balanced Keccak-256 Merkle tree (GP eq 7.7 / E.4). Matches Grey's compute_output_hash.

🔗def
Jar.collectReportedPackages [Jar.JamConfig] (guarantees : Jar.GuaranteesExtrinsic) : Dict Hash Hash
Jar.collectReportedPackages [Jar.JamConfig] (guarantees : Jar.GuaranteesExtrinsic) : Dict Hash Hash

Collect reported work-package hashes from guarantees. GP §7. Maps package hash → erasure root for each guaranteed report.

🔗def
Jar.updateRecentHistory [Jar.JamConfig] (bdag : Jar.RecentHistory) (headerHash : Hash) (accOutputs : Jar.AccumulationOutputs) (guarantees : Jar.GuaranteesExtrinsic) : Jar.RecentHistory
Jar.updateRecentHistory [Jar.JamConfig] (bdag : Jar.RecentHistory) (headerHash : Hash) (accOutputs : Jar.AccumulationOutputs) (guarantees : Jar.GuaranteesExtrinsic) : Jar.RecentHistory

β' : Full recent history update. GP eq (37–43).

  1. MMR-append the accumulate root to the belt

  2. Compute beefy root as MMR super-peak

  3. Append new block info, truncate to H entries