The ledger
World State Icarus Network is a transaction-based generic state machine. Every smart contract or Dapp built on Icarus has its own state, and the state of the Icarus network is composed of all the states of all the Dapps built upon it. Together, we refer to the entirety of the Icarus ledger as the world state; formally noted as σ . Outside of application-speci fic states, the Icarus world state includes two specific state subsets: (1) Account States (σ [a]) and (2) Election States (σ [e])
Account State
The fundamental native functionality of the Icarus ledger is to maintain a state of account balances. Balances are fundamental in the maintenance of the Icarus network and underlie core functionality like Delegate Elections and Rate-Limiting. Accounts can exist either under the control of an external actor or as an automated smart contract which executes code upon the receipt of a Transaction. The Account State is comprised of the following six fields:
Address: The 160-bit address of the account holder generated from the keccak-256 hash of an external actors private key, or in the case of a smart-contract account, the address is the Transaction hash of a contract creation transaction; formally σ [a]
Balance: A 128-bit scalar integer value equal to the number of Divvitos owned by this address; formally σ [a]b .
Bookkeeper: The boolean identifier of an accounts intent to contribute the network by executing accepted Transactions. Accounts with a Bookkeeper value of 1 are eligible to be elected as Delegates. Conversely, a Delegate can remove themselves from candidacy by setting their Bookkeeper value to 0; formally σ [a]d .
CodeHash: The hash of the IVM code of a smart-contract account, or Ø for an account held by an external actor. This is the code that gets executed should a smart-contract address receive an interact Transaction. CodeHash is immutable and thus, unlike all other fields, cannot be changed after construction; formally denoted σ [a]c . The code associated with the account may be denoted as b, so that KEC(b) = σ [a]c .
Root: A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account (a mapping between 256-bit integer values), encoded into the tree as a mapping from the Keccak 256-bit hash of the 256-bit integer keys to the RLP-encoded 256-bit integer values; formally σ [a]
Name: An ascii-encoded unlimited-size byte array that operates as a human-readable username to be associated with accounts controlled by external actors or, for a smart-contract account, Ø; formally σ [a]
Copy link