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 Marshaler
- type Status
- type TestP2P
- type TestPeer
- func (p *TestPeer) BroadcastBlobSidecar(spec *common.Spec, blobSidecar *deneb.BlobSidecar, subnet *uint64) error
- func (p *TestPeer) BroadcastBlobSidecars(spec *common.Spec, blobSidecars ...*deneb.BlobSidecar) error
- func (p *TestPeer) BroadcastSignedBeaconBlock(spec *common.Spec, signedBeaconBlock *deneb.SignedBeaconBlock) 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
- func (p TestPeers) BroadcastBlobSidecar(spec *common.Spec, blobSidecar *deneb.BlobSidecar, subnet *uint64) error
- func (p TestPeers) BroadcastBlobSidecars(spec *common.Spec, blobSidecars ...*deneb.BlobSidecar) error
- func (p TestPeers) BroadcastSignedBeaconBlock(spec *common.Spec, signedBeaconBlockDeneb *deneb.SignedBeaconBlock) error
- func (pl TestPeers) Close() error
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 Marshaler ¶ added in v1.0.5
type Marshaler interface { fastssz.Marshaler fastssz.Unmarshaler }
func WrapSSZObject ¶ added in v1.0.5
type Status ¶ added in v1.0.5
func (*Status) GetForkDigest ¶ added in v1.0.5
func (s *Status) GetForkDigest() common.ForkDigest
func (*Status) SetFinalizedCheckpoint ¶ added in v1.0.5
func (s *Status) SetFinalizedCheckpoint(c common.Checkpoint)
func (*Status) SetForkDigest ¶ added in v1.0.5
func (s *Status) SetForkDigest(d common.ForkDigest)
type TestP2P ¶
type TestP2P struct { InstanceID uint64 // State objects ChainStatus *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 *common.MetaData // contains filtered or unexported fields }
func (*TestPeer) BroadcastBlobSidecar ¶ added in v1.0.5
func (*TestPeer) BroadcastBlobSidecars ¶ added in v1.0.5
func (*TestPeer) BroadcastSignedBeaconBlock ¶ added in v1.0.5
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) BroadcastBlobSidecar ¶ added in v1.0.5
func (TestPeers) BroadcastBlobSidecars ¶ added in v1.0.5
func (TestPeers) BroadcastSignedBeaconBlock ¶ added in v1.0.5
Click to show internal directories.
Click to hide internal directories.