Documentation ¶
Overview ¶
eth protocol block bodies https://github.com/ethereum/devp2p/blob/master/caps/eth.md#blockbodies-0x06
eth protocol block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#blockheaders-0x04
RLPx disconnect https://github.com/ethereum/devp2p/blob/master/rlpx.md#disconnect-0x01
eth protocol get get block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getblockbodies-0x05
eth protocol get get block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getblockheaders-0x03
eth protocol get get block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getblockheaders-0x03
eth protocol get get block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getblockreceipts-0x05
RLPx hello https://github.com/ethereum/devp2p/blob/master/rlpx.md#hello-0x00
eth protocol new pooled transaction hashes https://github.com/ethereum/devp2p/blob/master/caps/eth.md#newpooledtransactionhashes-0x08
RLPx ping https://github.com/ethereum/devp2p/blob/master/rlpx.md#ping-0x02
RLPx pong https://github.com/ethereum/devp2p/blob/master/rlpx.md#pong-0x03
eth protocol get get block headers https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getblockheaders-0x03
eth protocol block receipts https://github.com/ethereum/devp2p/blob/master/caps/eth.md#blockreceipts-0x06
eth protocol status https://github.com/ethereum/devp2p/blob/master/caps/eth.md#status-0x00
eth protocol transactions https://github.com/ethereum/devp2p/blob/master/caps/eth.md#transactions-0x02
Index ¶
- Constants
- func SupportedEthCaps() []p2p.Cap
- type BlockBodies
- type BlockHeaders
- type Client
- func (c *Client) GetPooledTransactions(ctx context.Context, hashes []common.Hash) (*PooledTransactions, error)
- func (c *Client) OnDisconnect(ctx context.Context, ...)
- func (c *Client) OnHello(ctx context.Context, handler func(ctx context.Context, status *Hello) error)
- func (c *Client) OnNewPooledTransactionHashes(ctx context.Context, ...)
- func (c *Client) OnStatus(ctx context.Context, handler func(ctx context.Context, status *Status) error)
- func (c *Client) OnTransactions(ctx context.Context, ...)
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) Stop(ctx context.Context) error
- func (c *Client) Transactions(ctx context.Context, transactions *Transactions) error
- type Disconnect
- type GetBlockBodies
- type GetBlockHeaders
- type GetPooledTransactions
- type GetReceipts
- type Hello
- type NewPooledTransactionHashes
- type Ping
- type Pong
- type PooledTransactions
- type Receipts
- type Status
- type Transactions
Constants ¶
const ( HelloCode = 0x00 P2PProtocolVersion = 5 ETHCapName = "eth" )
const (
BlockBodiesCode = 0x16
)
const (
BlockHeadersCode = 0x14
)
const (
DisconnectCode = 0x01
)
const (
GetBlockBodiesCode = 0x15
)
const (
GetBlockHeadersCode = 0x13
)
const (
GetPooledTransactionsCode = 0x19
)
const (
GetReceiptsCode = 0x1f
)
const (
NewPooledTransactionHashesCode = 0x18
)
const (
PingCode = 0x02
)
const (
PongCode = 0x03
)
const (
PooledTransactionsCode = 0x1a
)
const (
ReceiptsCode = 0x20
)
const (
StatusCode = 0x10
)
const (
TransactionsCode = 0x12
)
Variables ¶
This section is empty.
Functions ¶
func SupportedEthCaps ¶
Types ¶
type BlockBodies ¶
type BlockBodies eth.BlockBodiesPacket
func (*BlockBodies) Code ¶
func (msg *BlockBodies) Code() int
func (*BlockBodies) ReqID ¶
func (msg *BlockBodies) ReqID() uint64
type BlockHeaders ¶
type BlockHeaders eth.BlockHeadersPacket
func (*BlockHeaders) Code ¶
func (msg *BlockHeaders) Code() int
func (*BlockHeaders) ReqID ¶
func (msg *BlockHeaders) ReqID() uint64
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetPooledTransactions ¶
func (*Client) OnDisconnect ¶
func (*Client) OnNewPooledTransactionHashes ¶
func (*Client) OnTransactions ¶
func (*Client) Transactions ¶
func (c *Client) Transactions(ctx context.Context, transactions *Transactions) error
type Disconnect ¶
type Disconnect struct {
Reason p2p.DiscReason
}
func (*Disconnect) Code ¶
func (h *Disconnect) Code() int
func (*Disconnect) ReqID ¶
func (h *Disconnect) ReqID() uint64
type GetBlockBodies ¶
type GetBlockBodies eth.GetBlockBodiesPacket
func (*GetBlockBodies) Code ¶
func (msg *GetBlockBodies) Code() int
func (*GetBlockBodies) ReqID ¶
func (msg *GetBlockBodies) ReqID() uint64
type GetBlockHeaders ¶
type GetBlockHeaders eth.GetBlockHeadersPacket
func (*GetBlockHeaders) Code ¶
func (msg *GetBlockHeaders) Code() int
func (*GetBlockHeaders) ReqID ¶
func (msg *GetBlockHeaders) ReqID() uint64
type GetPooledTransactions ¶
type GetPooledTransactions eth.GetPooledTransactionsPacket
func (*GetPooledTransactions) Code ¶
func (msg *GetPooledTransactions) Code() int
func (*GetPooledTransactions) ReqID ¶
func (msg *GetPooledTransactions) ReqID() uint64
type GetReceipts ¶
type GetReceipts eth.GetReceiptsPacket
func (*GetReceipts) Code ¶
func (msg *GetReceipts) Code() int
func (*GetReceipts) ReqID ¶
func (msg *GetReceipts) ReqID() uint64
type Hello ¶
type Hello struct { Version uint64 Name string Caps []p2p.Cap ListenPort uint64 ID []byte // secp256k1 public key // Ignore additional fields (for forward compatibility). Rest []rlp.RawValue `rlp:"tail"` }
https://github.com/ethereum/go-ethereum/blob/master/cmd/devp2p/internal/ethtest/types.go
func (*Hello) ETHProtocolVersion ¶
type NewPooledTransactionHashes ¶
type NewPooledTransactionHashes eth.NewPooledTransactionHashesPacket
func (*NewPooledTransactionHashes) Code ¶
func (msg *NewPooledTransactionHashes) Code() int
func (*NewPooledTransactionHashes) ReqID ¶
func (msg *NewPooledTransactionHashes) ReqID() uint64
type PooledTransactions ¶
type PooledTransactions eth.PooledTransactionsPacket
func (*PooledTransactions) Code ¶
func (msg *PooledTransactions) Code() int
func (*PooledTransactions) ReqID ¶
func (msg *PooledTransactions) ReqID() uint64
type Receipts ¶
type Receipts eth.ReceiptsPacket
type Status ¶
type Status eth.StatusPacket
type Transactions ¶
type Transactions eth.TransactionsPacket
func (*Transactions) Code ¶
func (msg *Transactions) Code() int
func (*Transactions) ReqID ¶
func (msg *Transactions) ReqID() uint64
Source Files ¶
- client.go
- message_block_bodies.go
- message_block_headers.go
- message_disconnect.go
- message_get_block_bodies.go
- message_get_block_headers.go
- message_get_pooled_transactions.go
- message_get_receipts.go
- message_hello.go
- message_new_pooled_transaction_hashes.go
- message_ping.go
- message_pong.go
- message_pooled_transactions.go
- message_receipts.go
- message_status.go
- message_transactions.go
- publish.go