Validity and State Changes - Algorand Specifications

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

Algorand Specifications

The new Ledger’s state that results from applying a valid block is the account state that results from applying each transaction in that block, in sequence.

For a block to be valid, each transaction in its transaction sequence MUST be valid at the block’s round rr and for the block’s genesis identifier GenesisIDBGenesisIDB.

For a transaction

Tx=(GenesisID,TxType,rfv,rlv,I,I′,I0,f,a,x,N,pk,sppk,nonpart,…)Tx=(GenesisID,TxType,rfv,rlv,I,I′,I0,f,a,x,N,pk,sppk,nonpart,…)

(where …… represents fields specific to transaction types besides payand keyreg) to be valid at the intermediate state ρρ in round rr for the genesis identifier GenesisIDBGenesisIDB, the following conditions MUST all hold:

Given that a transaction is valid, it produces the following updated account state for intermediate state ρ+1ρ+1:

For transaction types other than pay and keyreg, account state is updated based on the reference logic described in the Transaction section.

Additionally, for all types of transactions, if the rekey to address of the transaction is nonzero and does not match the transaction sender address, then the transaction sender account’s spending key is set to the rekey to address. If the rekey to address of the transaction does match the transaction sender address, then the transaction sender account’s spending key is set to zero.

The rest of this section describes the legacy Distribution Rewards system. If the RrRr rewards rate parameter is 00, all computations keep values constant and no legacy reward distribution is carried out.

The final intermediate account ρkρk state changes the balance of the incentive pool as follows:

aρk,Ipool=aρk−1,Ipool−Rr(Units(r))aρk,Ipool=aρk−1,Ipool−Rr(Units(r))

An account state in the intermediate state ρ+1ρ+1 and at round rr is valid if all following conditions hold: