eth¶
Namespaces¶
| Name |
|---|
| eth::abi |
| eth::protocol |
| eth::codec |
| eth::cli |
Classes¶
| Name | |
|---|---|
| class | eth::ChainTracker Tracks the chain tip and deduplicates block processing requests. |
| struct | eth::ForkId |
| struct | eth::StatusMessage68 ETH/68 Status message. Wire: [version, networkid, td, blockhash, genesis, forkid]. |
| struct | eth::StatusMessage69 ETH/69 Status message. Wire: [version, networkid, genesis, forkid, earliestBlock, latestBlock, latestBlockHash]. |
| struct | eth::CommonStatusFields Fields common to both ETH/68 and ETH/69 Status messages. |
| struct | eth::NewBlockHashEntry |
| struct | eth::NewBlockHashesMessage |
| struct | eth::NewPooledTransactionHashesMessage |
| struct | eth::GetBlockHeadersMessage |
| struct | eth::BlockHeadersMessage |
| struct | eth::GetReceiptsMessage |
| struct | eth::ReceiptsMessage |
| struct | eth::GetPooledTransactionsMessage |
| struct | eth::PooledTransactionsMessage |
| struct | eth::GetBlockBodiesMessage Request for block bodies by hash (message id 0x05). |
| struct | eth::BlockBody A single block body: transactions + ommers (uncle headers). |
| struct | eth::BlockBodiesMessage Response to GetBlockBodies (message id 0x06). |
| struct | eth::NewBlockMessage Full new block announcement (message id 0x07). |
| class | eth::EthWatchService Ties together EventWatcher, ABI decoding, and eth message dispatch. |
| struct | eth::EventFilter Specifies which logs to accept: by emitting address(es) and/or topic(s). |
| struct | eth::MatchedEvent A matched event: the original log decorated with block context. |
| class | eth::EventWatcher Registers filters and dispatches matching logs to callbacks. |
Types¶
| Name | |
|---|---|
| enum class | StatusValidationError { kProtocolVersionMismatch, kNetworkIDMismatch, kGenesisMismatch, kInvalidBlockRange} Errors returned by validate_status(), mirroring go-ethereum's readStatus error values from eth/protocols/eth/handshake.go. |
| using rlp::Hash256 | Hash256 |
| using rlp::Address | Address |
| using rlp::Bloom | Bloom |
| using std::variant< StatusMessage68, StatusMessage69 > | StatusMessage Dual-version Status message (ETH/68 or ETH/69). |
| using WatchId | EventWatchId Subscription handle returned by EthWatchService::watch_event(). |
| using std::function< void( const MatchedEvent &, const std::vector< abi::AbiValue > &)> | DecodedEventCallback Typed callback for a decoded event log. |
| using std::function< void(uint8_t eth_msg_id, std::vector< uint8_t > payload)> | SendCallback Callback used by EthWatchService to send an outgoing eth message. |
| using uint32_t | WatchId Registration handle returned by EventWatcher::watch(). Passed back to EventWatcher::unwatch() to remove a subscription. |
| using std::function< void(const MatchedEvent &)> | EventCallback Callback invoked for every log that matches a registered filter. |
Functions¶
| Name | |
|---|---|
| CommonStatusFields | get_common_fields(const StatusMessage & msg) Extract fields common to both ETH/68 and ETH/69 Status messages. |
Attributes¶
| Name | |
|---|---|
| size_t | kAbiWordSize EVM ABI encoding constants (ABI spec: https://docs.soliditylang.org/en/latest/abi-spec.html). |
| size_t | kAbiAddressSize Ethereum address is 20 bytes. |
| size_t | kAbiAddressPadding 12 bytes of left-padding |
| size_t | kAbiBoolByteIndex Canonical bool lives in rightmost byte (index 31). |
| uint8_t | kRlpListPrefixMin EVM / RLP encoding thresholds. |
| size_t | kTypedTxPrefixSize EIP-2718 typed transaction envelope. |
| uint64_t | kDefaultChainId Default chain ID used when none is specified (Ethereum mainnet). |
| size_t | kKeccak256Size Keccak-256 digest size (bytes). |
| uint8_t | kEthProtocolVersion66 |
| uint8_t | kEthProtocolVersion67 |
| uint8_t | kEthProtocolVersion68 |
| uint8_t | kEthProtocolVersion69 |
Types Documentation¶
enum StatusValidationError¶
| Enumerator | Value | Description |
|---|---|---|
| kProtocolVersionMismatch | status.ProtocolVersion != negotiated version | |
| kNetworkIDMismatch | status.NetworkID != expected network ID | |
| kGenesisMismatch | status.Genesis != our genesis hash | |
| kInvalidBlockRange | status.EarliestBlock > status.LatestBlock |
Errors returned by validate_status(), mirroring go-ethereum's readStatus error values from eth/protocols/eth/handshake.go.
using Hash256¶
using Address¶
using Bloom¶
using StatusMessage¶
Dual-version Status message (ETH/68 or ETH/69).
using EventWatchId¶
Subscription handle returned by EthWatchService::watch_event().
using DecodedEventCallback¶
using eth::DecodedEventCallback = std::function<void(
const MatchedEvent&,
const std::vector<abi::AbiValue>&)>;
Typed callback for a decoded event log.
using SendCallback¶
Callback used by EthWatchService to send an outgoing eth message.
Parameters:
- eth_msg_id Eth-layer message id (before adding the rlpx offset).
- payload Encoded message bytes.
using WatchId¶
Registration handle returned by EventWatcher::watch(). Passed back to EventWatcher::unwatch() to remove a subscription.
using EventCallback¶
Callback invoked for every log that matches a registered filter.
Functions Documentation¶
function get_common_fields¶
Extract fields common to both ETH/68 and ETH/69 Status messages.
Attributes Documentation¶
variable kAbiWordSize¶
EVM ABI encoding constants (ABI spec: https://docs.soliditylang.org/en/latest/abi-spec.html).
Every ABI head/tail slot is 32 bytes
variable kAbiAddressSize¶
Ethereum address is 20 bytes.
variable kAbiAddressPadding¶
12 bytes of left-padding
variable kAbiBoolByteIndex¶
Canonical bool lives in rightmost byte (index 31).
variable kRlpListPrefixMin¶
EVM / RLP encoding thresholds.
First byte >= 0xC0 signals an RLP list
variable kTypedTxPrefixSize¶
EIP-2718 typed transaction envelope.
One type-byte precedes the RLP payload
variable kDefaultChainId¶
Default chain ID used when none is specified (Ethereum mainnet).
variable kKeccak256Size¶
Keccak-256 digest size (bytes).
variable kEthProtocolVersion66¶
variable kEthProtocolVersion67¶
variable kEthProtocolVersion68¶
variable kEthProtocolVersion69¶
Updated on 2026-04-13 at 23:22:46 -0700