Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error)
- func EncodeGossip(topic string, msg fastssz.Marshaler) ([]byte, []byte, error)
- func PublishTopic(ctx context.Context, topicHandle *pubsub.Topic, data []byte, ...) error
- type BeaconClientPeer
- type ENR
- type Goodbye
- type PingData
- type TestP2P
- type TestPeer
- func (p *TestPeer) BroadcastSignedBeaconBlockDeneb(signedBeaconBlockDeneb *eth.SignedBeaconBlockDeneb) error
- func (p *TestPeer) BroadcastSignedBlobSidecar(signedBlobSidecar *eth.SignedBlobSidecar, subnet *uint64) error
- func (p *TestPeer) Close() error
- func (p *TestPeer) Connect(ctx context.Context, peer *BeaconClientPeer) error
- func (p *TestPeer) Goodbye(ctx context.Context, peer peer.ID) error
- func (p *TestPeer) SendInitialStatus(ctx context.Context, peer peer.ID) error
- func (p *TestPeer) SetupStreams() error
- func (p *TestPeer) WaitForP2PConnection(ctx context.Context) error
- type TestPeerIndex
- type TestPeers
Constants ¶
View Source
const ( StatusProtocolID = "/eth2/beacon_chain/req/status/1/" + encoder.ProtocolSuffixSSZSnappy GoodbyeProtocolID = "/eth2/beacon_chain/req/goodbye/1/" + encoder.ProtocolSuffixSSZSnappy PingProtocolID = "/eth2/beacon_chain/req/ping/1/" + encoder.ProtocolSuffixSSZSnappy MetaDataProtocolID = "/eth2/beacon_chain/req/metadata/2/" + encoder.ProtocolSuffixSSZSnappy )
Variables ¶
View Source
var ( MESSAGE_DOMAIN_INVALID_SNAPPY = [4]byte{0x00, 0x00, 0x00, 0x00} MESSAGE_DOMAIN_VALID_SNAPPY = [4]byte{0x01, 0x00, 0x00, 0x00} )
Functions ¶
func ConvertFromInterfacePrivKey ¶
func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error)
Types ¶
type BeaconClientPeer ¶
type BeaconClientPeer struct {
BeaconClient ENR
}
func (*BeaconClientPeer) GetPeerAddrInfo ¶
type Goodbye ¶
type Goodbye = primitives.SSZUint64
type PingData ¶
type PingData = primitives.SSZUint64
type TestP2P ¶
type TestP2P struct {
InstanceID uint64
// State objects
ChainStatus *common.Status
// Config
ExternalIP net.IP
BeaconPortStart int64
MaxDevP2PSessionReuses int
// contains filtered or unexported fields
}
func (*TestP2P) GetNextPeerIDs ¶
func (*TestP2P) GetTestPeer ¶
type TestPeer ¶
type TestPeer struct {
ID TestPeerIndex
Host host.Host
PubSub *pubsub.PubSub
PrivateKey crypto.PrivKey
PublicKey crypto.PubKey
LocalNode *enode.LocalNode
MetaData *eth.MetaDataV1
// contains filtered or unexported fields
}
func (*TestPeer) BroadcastSignedBeaconBlockDeneb ¶
func (p *TestPeer) BroadcastSignedBeaconBlockDeneb(signedBeaconBlockDeneb *eth.SignedBeaconBlockDeneb) error
func (*TestPeer) BroadcastSignedBlobSidecar ¶
func (p *TestPeer) BroadcastSignedBlobSidecar(signedBlobSidecar *eth.SignedBlobSidecar, subnet *uint64) error
func (*TestPeer) Connect ¶
func (p *TestPeer) Connect(ctx context.Context, peer *BeaconClientPeer) error
func (*TestPeer) SendInitialStatus ¶
func (*TestPeer) SetupStreams ¶
type TestPeerIndex ¶
type TestPeerIndex uint64
func (TestPeerIndex) PeerID ¶
func (id TestPeerIndex) PeerID(instanceID uint64) string
func (TestPeerIndex) String ¶
func (id TestPeerIndex) String() string
type TestPeers ¶
type TestPeers []*TestPeer
func (TestPeers) BroadcastSignedBeaconBlockDeneb ¶
func (p TestPeers) BroadcastSignedBeaconBlockDeneb(signedBeaconBlockDeneb *eth.SignedBeaconBlockDeneb) error
func (TestPeers) BroadcastSignedBlobSidecar ¶
func (p TestPeers) BroadcastSignedBlobSidecar(signedBlobSidecar *eth.SignedBlobSidecar, subnet *uint64) error
Click to show internal directories.
Click to hide internal directories.