## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

- Auto
- Light
- Dark

# Algorand Specifications

The commitment is the final stage that updates the copy of the Ledger on the node,
applying all the state deltas (e.g., account balances, application state, etc.)
related to the transactions contained in the committed block proposal.

In the following pseudocode etet denotes the body (transactions) of the
proposal (a.k.a. the _payset_).

* * *

Algorithm8: CommitAlgorithm 8: Commit

1: functionCommit(v)2: e←RetrieveProposal(v)e3: L←L\|\|e4: ApplyDeltas(e)5: TransactionPool.Update(et)6: endfunction1: function Commit(v)2: e←RetrieveProposal(v)e3: L←L\|\|e4: ApplyDeltas(e)5: TransactionPool.Update(et)6: end function

* * *

> Important
>
> **IMPLEMENTATION:**
>
> Commit block proposal [reference implementation](https://github.com/algorand/go-algorand/blob/55011f93fddb181c643f8e3f3d3391b62832e7cd/agreement/player.go#L366-L374).

The function commits to the Ledger the block corresponding to the received
_proposal-value_.

The _proposal-value_ must be committable, which implies both _validity_ and _availability_
of the full block body and seed.

The node retrieves the full block ee related to the _proposal-value_ (Line 2),
and appends it to the Ledger LL (Line 3).

Then, the node updates the Ledger state (and trackers) with all state changes (deltas)
produced by the new committed block.

> For further details, refer to the Ledger [normative section](https://specs.algorand.co/ledger/ledger-apply-data#state-deltas).

The TransactionPoolTransactionPool is then purged of all transactions in the committed block.

> For further details on this process, see the Ledger [non-normative section](https://specs.algorand.co/ledger/non-normative/ledger-nn).
