Ledger - 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
- Auto
- Light
- Dark
Algorand Specifications
An entry is a pair e=(o,Q) where oo is some opaque object, and QQ is a 256-bit integer called a seed.
For a detailed definition of this object, see the Algorand Ledger Specification.
The following functions are defined on ee:
Encoding: Encoding(e)=x where xx is a variable-length bitstring.
Summarizing: Digest(e)=h where hh is a 256-bit integer. hh should be a cryptographic commitment to the contents of ee.
A ledger is a sequence of entries L=(e1,e2,…,en).
A round rr is some 64-bit index into this sequence.
The following functions are defined on LL:
Validating: ValidEntry(L,o)=1 if and only if oo is valid with respect to LL. This validity property is opaque.
Seed Lookup: If er=(or,Qr), then Seed(L,r)=Qr.
Record Lookup: Record(L,r,Ik)=(pkk,r,Bk,r,rfirst,rlast) for some address Ik, some public key pkk,r, and some 64-bit integer Bk,r. rfirst and rlast define the first valid and last valid rounds for this participating account.
Digest Lookup: DigestLookup(L,r)=Digest(er).
Total Stake Lookup: We use Krb,rv to represent all players with participation keys at r that are eligible to vote at rv. Let Krb,rv be the set of all kk for which (pkk,rb,Bk,rb,rfirst,rlast)=Record(L,rb,Ik) and rfirst≤rv≤rlast holds. Then Stake(L,rb,rv)=∑k∈Krb,rvBk,rb.
A ledger may support an opaque entry generation procedure:
o:=Entry(L,Q)
which produces an object oo for which ValidEntry(L,o)=1.
For implementation details on this procedure, see the block assembly section in the Algorand Ledger non-normative specification.