package
1.15.2
Repository: https://github.com/ethereum/go-ethereum.git
Documentation: pkg.go.dev

# Functions

Handle is the callback invoked to manage the life cycle of a `snap` peer.
HandleMessage is invoked whenever an inbound message is received from a remote peer on the `snap` protocol.
MakeProtocols constructs the P2P protocol definitions for `snap`.
NewFakePeer creates a fake snap peer without a backing p2p peer, for testing purposes.
NewPeer creates a wrapper for a network connection and negotiated protocol version.
NewSyncer creates a new snapshot syncer to download the Ethereum state over the snap protocol.
ServiceGetAccountRangeQuery assembles the response to an account range query.
ServiceGetByteCodesQuery assembles the response to a byte codes query.
ServiceGetTrieNodesQuery assembles the response to a trie nodes query.

# Constants

ProtocolName is the official short name of the `snap` protocol used during devp2p capability negotiation.
Constants to match up protocol versions and messages.

# Variables

ErrCancelled is returned from snap syncing if the operation was prematurely terminated.
ProtocolVersions are the supported versions of the `snap` protocol (first is primary).

# Structs

AccountData represents a single account in a query response.
AccountRangePacket represents an account query response.
ByteCodesPacket represents a contract bytecode query response.
GetAccountRangePacket represents an account query.
GetByteCodesPacket represents a contract bytecode query.
GetStorageRangesPacket represents an storage slot query.
GetTrieNodesPacket represents a state trie node query.
NodeInfo represents a short summary of the `snap` sub-protocol metadata known about the host peer.
Peer is a collection of relevant information we have about a `snap` peer.
StorageData represents a single storage slot in a query response.
StorageRangesPacket represents a storage slot query response.
Syncer is an Ethereum account and storage trie syncer based on snapshots and the snap protocol.
SyncPending is analogous to SyncProgress, but it's used to report on pending ephemeral sync progress that doesn't get persisted into the database.
SyncProgress is a database entry to allow suspending and resuming a snapshot state sync.
TrieNodesPacket represents a state trie node query response.

# Interfaces

Backend defines the data retrieval methods to serve remote requests and the callback methods to invoke on remote deliveries.
Packet represents a p2p message in the `snap` protocol.
SyncPeer abstracts out the methods required for a peer to be synced against with the goal of allowing the construction of mock peers without the full blown networking.

# Type aliases

Handler is a callback to invoke from an outside runner after the boilerplate exchanges have passed.
TrieNodePathSet is a list of trie node paths to retrieve.