Skip to content

Commit 48b4fd6

Browse files
committed
[Dijkstra] CIP-159-05: Update UTxO rules for direct deposits and balance intervals (#1117)
CIP-159 changes the transaction balancing rules and introduces Phase-1 balance interval validation. This commit updates the UTxO transition system accordingly. `Utxo.lagda.md`: + Add accountBalances : Rewards field to UTxOEnv and SubUTxOEnv for pre-batch account balance lookups; + Add HasAccountBalances type class and instances; + Update producedTx to include direct deposit amounts on the produced side of the preservation-of-value equation; + Add direct deposit registration premise to UTXO and SUBUTXO (`dom DirectDepositsOf ⊆ dom AccountBalancesOf`); + Add balance interval validation premise to UTXO and SUBUTXO (∀ (c,interval) ∈ BalanceIntervalsOf, InBalanceInterval using pre-batch account balances). `Utxo/Properties/Computational.lagda.md`: + Update Computational-UTXO for new premise tuple arity (19+h → 21+h) `Ledger.lagda.md`: + Add accountBalances field to SubLedgerEnv; + Populate accountBalances in SUBLEDGER-V, SUBLEDGER-I, LEDGER-V, LEDGER-I using RewardsOf certState₀ (pre-batch balances).
1 parent ac1bc15 commit 48b4fd6

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/Ledger/Dijkstra/Specification/Utxo.lagda.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ data _⊢_⇀⦇_,SUBUTXO⦈_ : SubUTxOEnv → UTxOState → SubLevelTx → UTxO
506506
∙ MaybeNetworkIdOf txSub ~ just NetworkId
507507
∙ CurrentTreasuryOf txSub ~ just (TreasuryOf Γ)
508508
∙ dom (DirectDepositsOf txSub) ⊆ dom (AccountBalancesOf Γ)
509-
∙ dom (BalanceIntervalsOf txSub) ⊆ dom (AccountBalancesOf Γ)
510509
∙ ∀[ (c , interval) ∈ BalanceIntervalsOf txSub ˢ ]
511510
(InBalanceInterval (maybe id 0 (lookupᵐ? (AccountBalancesOf Γ) c)) interval)
512511
────────────────────────────────

0 commit comments

Comments
 (0)