-
Notifications
You must be signed in to change notification settings - Fork 85
Glossary
The Header
object used by the Ethereum protocol
The collection of:
The collection of Transactions and Uncles for a given block.
The Transaction
object used by the Ethereum protocol
The process of creating a fully signed transaction.
- The Account
nonce
must be known. - Typically involves using
eth_estimateGas
to determine thegas
value for the transaction. - Requires a private key to sign.
The Header for a block that was uncled
The set of all historical block headers.
- ~11 million as of 2021/01/29
- ~5GB of storage as of 2021/01/29
- Needed to verify most other chain data.
- Header Accumulator would allow proving historical header inclusion into the canonical chain.
The set of all transactions and uncles for historical blocks.
- ~11 million as of 2021/01/29
- ~120GB of storage as of 2021/01/29
The set of all receipts generated by historical transactions.
- ~1 billion total receipts as of 2021/01/29
- ~60GB of storage as of 2021/01/29
The set of all accounts and contract storage
The objects that are part of the main state trie represented by the Header.state_root
- Fields:
balance/nonce/state_root/code_hash
The individual storage denoted by Account.state_root
for each account.
- All data is keyed to an integer slot number in the range
0 - 2**256-1
Contract code is only referenced by the Account.code_hash
and is not explicitely part of the state.
Refers to the combined set of all historical states. See Archive Node
- Stored using the Naive Database Layout this takes roughly ~7TB
- Stored using really fancy techniques on top of the Flat Database Layout, Turbo Geth takes roughly 800GB
Refers to only the state that is part of a recent state root.
- Recent tends to be on the order of 128-256 blocks.
Maintaining this data requires some form of garbage collection to clean up state that is no longer part of a recent state root.
Refers to pieces of the state that have not been touched (read or modified) for some extended amount of time.
Implementation of the state which store all of the data by individual trie nodes addressed by the node hash.
- Results in poor performance and high disk IO overhead.
- Relatively simple to understand and implement
- Garbage collection under this scheme is more complex
Implementation of the state with stores all of the data by trie path, somewhat akin to a key/value store.
- More performant and reduces disk IO.
- More complex to understand and implement.
State data that is in a format which can be verified.
A Witness that provides all of the data needed to perform Block Execution
A Witness that provides all of the data needed to perform EVM Execution for a specific transaction.
A node which:
- stores the full Header Chain
- stores the full Block Body History
- stores the full Receipt History
- stores the [Recent State](#Recent State)
- maintains a Canonical Block Index
- maintains a Canonical Transaction Index
- participates in the
ETH
DevP2P Protocol
The same as a Full Node except that it store the full Archive State. Typically requires doing a Full Sync.
A client that connects to the LES
DevP2P Protocol in order to follow the chain and expose the JSON-RPC API.
Clients depend on connecting to at least one LES Server to serve requests for data.
A planned type of client that could be built if Block-Witnesses were available.
- Client does not need the State to execute blocks as they are executed statelessly, using witnesses.
TODO: more about what is needed for other capabailities
Terminology to try and distinguish between current light nodes and a new type of light node - Piper
A node which only exposes the JSON-RPC API
P2P protocol on the DevP2P network that serves as the foundation for all mainnet clients
Nodes that are apart of this network are required to:
- Participate in Transaction Gossip
- Participate in Block Gossip
- Have the Recent State
- Have the full Chain History
P2P protocol on the DevP2P network that serves as the foundation for light clients.
A node in the LES network that serves data to LES Clients.
Being a server on this network requires:
- The full Recent State
- The full Chain History
- Both Canonical Indexes
- The ability to participate in Transaction Gossip
- The ability to participate in Block Gossip
A node on the LES network that requests data from LES Servers
- P2P network functionality that facilitates distributing new transactions to all nodes in the network.
- Depends on access to
ETH
DevP2P Protocol or theLES
DevP2P Protocol - Depends on the ability to do Transaction Validation to prevent DOS attacks.
- Computationally expensive
- Gossip of the newest blocks
- Depends on the ability to do Block Validation
- Retrieval of headers
- by hash
- by number
- in batches, either sequential or with consistently spaced gaps
- Retrieval of block bodies
- Data needs to be verified against
Header.transactions_root
andHeader.uncles_root
- Data needs to be verified against
- Retrieval of receipts
- Retrieved in batches by block
- Data needs to be verified against
Header.receipts_root
- Retrieval of individual trie nodes by their hash
- Likely to be removed in a future iteration of the protocol as this retrieval mechanism is not condusive to flat database layout
- depends on access to Block Gossip
- depends on having a recent header from the Header Chain
- depends on being able to perform Block Validation to prevent DOS attacks.
Validation of transactions involves:
- ability to perform the
ecrecover
operation to determine sender - checking that the nonce is the next nonce for the sending account
- checking that the account balance is sufficient to pay for intrinsic gas
- requires knowing EVM rules for computing intrinsic gas value
Validation of a block can involve any of the following things:
- checking the Proof-of-work seal
- Computationaly expensive
- checking the computed total difficulty against other competing blocks at the same height
- execution of the transactions to verify correctness of the
Header.state_root
- Requires Block Execution
- Computationaly expensive
An efficient mechanism for being able to provide concise proofs about historical header inclusion into the canonical chain based on https://ethresear.ch/t/double-batched-merkle-log-accumulator/571
Maps block numbers to the canonical block hash at that height
- Needs to be built from the Header chain.
- 61MB per 1 million blocks
- 64 bytes per entry
- 32 bytes for block number
- Can be reduced with more efficient variable length encoding
- 32 bytes for block hash
- 32 bytes for block number
- 64 bytes per entry
- ~600MB total size as of 2021/01/29
- Only provable by verifying hash against known canonical block hash at that height.
- Can be more efficiently proven with addition of Header accumulator to the protocol
Maps transaction hashes to the canonical block hash and transaction index within that block.
- Needs to be built from the historical block bodies
- ~1 billion total historical transactions as of 2021/01/29
- 70 bytes per entry
- 32 bytes for transaction hash
- 32 bytes for canonical block hash
- 4 bytes for transaction index
- Can be reduced slightly with more efficient variable length encoding
- 65GB as of 2021/01/29
- Can be proven with merkle proof against
Header.transactions_root
The process that a client uses to catch up to the head of the chain. There are a few approaches that can be used depending on the security profile.
- Full verification
- Downloading the full chain of headers
- Checkpointing
- Using a trusted hash of a more recent header and syncing from there.
- Following the HEAD
- A reasonably high degree of confidence can be achieved by simply following the latest headers. The longer this chain grows, the more effort an attacker would need to have invested to fake the chain.
Currently, the full historical chain of headers is required to verify any other parts of the historical data. The Header Accumulator would improve this situation, allowing a client to checkpoint to the tip of the chain, but still be capable of verifying historical data.
The process that a client uses to pull historical transactions and uncles.
- Verifying this data requires access to the Header Chain to check the data against the
Header.transactions_root
andHeader.uncles_root
Clients that do not Full Sync tend to need to acquire the historical receipts by fetching them over the ETH
DevP2P Protocol.
- Verifying this data requires access to the Header Chain to check the data against the
Header.receipts_root
A mechanism for nodes to pull a full copy of the Recent State.
Syncing by downloading all historical blocks and executing them in order.
- The simplest approach to syncing.
- computationally expensive.
- requires Header Syncing
- requires Block Syncing
Syncing by downloading the chain history and a recent copy of the state.
- Operates on the security assumption that the state roots calculated by historical blocks was done correctly.
- requires History Syncing
- Places a heavy load on nodes serving the data
- Difficult to serve from a Flat Database Layout
Syncing by downloading the chain history and a recent copy of the state.
- Operates on the security assumption that the state roots calculated by historical blocks was done correctly.
- requires History Syncing
- Better suited for Flat Database Layout
- Uses orders of magnitute less bandwidth, disk IO, time.
This term is not widely used so the definition may adjust over time
Unlike the other State Syncing approaches, this approach does not actually result in obtaining a full copy of the state. This approach could be used on its own to verify blocks without needing a local copy of the state, or in conjunction with one of the other sync approaches to allow immediate verification of blocks until the full state is available locally.
- Requires Block Gossip
- Requires Block Witnesses
Beam sync is effectively Stateless Sync but without having the network provide Block Witnesses. Instead, the client fetching state on demand as it is needed.
- Requires Block Gossip
- Requires On Demand State Retrieval
- Availability of Access Lists provides significant efficiency gains for this approach.
- Access to the transaction pool
- EVM Execution
The list of accounts and contract storage locations touched during some form of EVM Execution
A property of some EVM Execution where a caller can accurately predict what state would be touched.
A property of some EVM Execution where a caller cannot accurately predict what state would be touched.
- requires EVM Execution
- the process of executing all of the transactions in a given
- Computationaly expensive
- An implementation of the EVM
- requires access to the State that is touched during execution
- Can be done using Recent State
- Can be done using Block Witnesses
- Management of private keys used for Signing Transactions.
- Accounts are typically stored in a Keyfile
A encrypted storage format for private keys
- Eth2 BLS Keystore spec: https://eips.ethereum.org/EIPS/eip-2335
- Eth1 Keystore spec: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
Decryption tends to rely on access to cryptographic primatives like keccak
, scrypt
, pbkdf2
, or ECC/BLS12-381.
The ability retrieve any element from the State from the network.
The ETH
DevP2P Protocol exposes the message pair GetNodeData/NodeData
which allows for retrieval of arbitrary state. This message is likely to be deprecated.
An idea for how we could distribute the state among across all of the nodes in a DHT and make it discoverable and retrievable on demand.
- Meta information to the DevP2P Network.
- Easy to stub/fake for clients that don't implement this functionality
- Meta information about the syncing status of the node.
- Easy to stub/fake for clients that don't implement this functionality
- Denotes the default address that will be used by the client
- Easy to stub/fake for clients that don't implement this functionality
- Only relevant for clients that implement Account Management
- Meta information about the mining status of the client
- Only relevant for clients that mine
- Easy to stub/fake for clients that don't implement this functionality
- Meta information about mining
- Only relevant for clients that mine
- Easy to stub/fake for clients that don't implement this functionality
- Meta information about what the client thinks the gas price is
- Easy to stub/fake for clients that don't implement this functionality
Picking an appropriate gas price is a context dependent operation with no global strategy that can be applied to all use cases.
- Lists all of the account addresses managed by the client.
- Easy to stub/fake for clients that don't implement this functionality
- Only relevant for clients that implement Account Management
- Return the block number for the block this client considers to be latest.
- requires some combination of the Header Chain and Following the Chain
Some ambiguity around whether transactions/receipts/state is available at this height, or whether this is simply a view over the accepted header chain.
- Return the balance of the provided address in units of wei
- Requires access to the Account State
- Return the value at the given storage slot of the given account
- Requires access to the Contract Storage
- Return the
nonce
of the provided address in units of wei - Requires access to the Account State
- Return the number of Transactions in a given block.
- Requires access to the Block Body History
- Return the number of transactions in a given block.
- Requires access to the Block Body History
- Requires access to the Canonical Block Index
- Return the number of Uncles in a given block.
- Requires access to the Block Body History
- Return the number of Uncles in a given block.
- Requires access to the Block Body History
- Requires access to the Canonical Block Index
- Return the bytecode for the given address
- Requires access to the Account State
- Requires access to the Contract Code
- Returns the signature for the provided data
- Only relevant for clients that implement Account Management
- Sign the provided transaction and return the RLP encoded representation of the signed transaction.
- Only relevant for clients that implement Account Management
- Requires access to the Account State to determine transaction nonce.
- Sign the provided transaction and broadcast it.
- Only relevant for clients that implement Account Management
- Requires access to the Account State to determine transaction nonce.
- Requires access to Transaction Gossip
- Broadcast a fully signed transaction.
- Requires access to Transaction Gossip
- Executes the provided transaction against the latest state known by the client and returns the result
- Requires EVM Execution
- Executes the provided transaction against the latest state and return the amount of gas used by the transaction
- Requires EVM Execution
- Used heavily for Transaction Construction.
- Return a representation of the block denoted by the provided hash
- Requires access to the Header Chain
- Requires access to the Block Body History
- Return a representation of the Block denoted by the provided hash
- Requires access to the Header Chain
- Requires access to the Block Body History
- Requires access to the [Canonical Block Index](#Canonical Block Index)
Calls to this endpoint can be mapped directly to an equivalent call to
eth_getBlockByHash
with access to the Canonical Block Index
- Returns a representation of the Transaction denoted by the provided hash
- Requires access to the Header Chain
- Requires access to the Block Body History
- Requires access to the [Canonical Transaction Index](#Canonical Transaction Index)
Calls to this endpoint can be mapped directly to an equivalent call to
eth_getTransactionByBlockHashAndIndex
with access to the Canonical Transaction Index
- Returns a representation of the Transaction denoted by the provided block hash and transaction index
- Requires access to the Header Chain
- Requires access to the Block Body History
- Returns a representation of the Transaction denoted by the provided block number and transaction index
- Requires access to the Header Chain
- Requires access to the Block Body History
- Requires access to the Canonical Block Index
Calls to this endpoint can be mapped directly to an equivalent call to
eth_getTransactionByBlockHashAndIndex
with access to the Canonical Block Index
- Returns a representation of the Receipt for the Transaction denoted by the given hash
- Requires access to the Header Chain
- Requires access to the Block Body History
- Requires access to the Canonical Transaction Index
- Returns a representation of the Receipt for the Transaction denoted by the given block hash and index
- Requires access to the Header Chain
- Requires access to the Block Body History
- Returns a representation of the Receipt for the Transaction denoted by the given block hash and index
- Requires access to the Header Chain
- Requires access to the Block Body History
- Requires access to the Canonical Block Index
Calls to this endpoint can be mapped directy to an equivalent call to
eth_getUncleByBlockHashAndIndex
with access to the Canonical Block Index