2020-07-09 17:38:15 +00:00
|
|
|
package p2p
|
|
|
|
|
|
|
|
const (
|
2021-08-27 01:34:20 +00:00
|
|
|
// GossipProtocolAndDigest represents the protocol and fork digest prefix in a gossip topic.
|
|
|
|
GossipProtocolAndDigest = "/eth2/%x/"
|
|
|
|
|
|
|
|
// Message Types
|
|
|
|
//
|
2021-08-18 04:55:48 +00:00
|
|
|
// GossipAttestationMessage is the name for the attestation message type. It is
|
|
|
|
// specially extracted so as to determine the correct message type from an attestation
|
|
|
|
// subnet.
|
|
|
|
GossipAttestationMessage = "beacon_attestation"
|
|
|
|
// GossipSyncCommitteeMessage is the name for the sync committee message type. It is
|
|
|
|
// specially extracted so as to determine the correct message type from a sync committee
|
|
|
|
// subnet.
|
|
|
|
GossipSyncCommitteeMessage = "sync_committee"
|
2021-08-27 01:34:20 +00:00
|
|
|
// GossipBlockMessage is the name for the block message type.
|
|
|
|
GossipBlockMessage = "beacon_block"
|
|
|
|
// GossipExitMessage is the name for the voluntary exit message type.
|
|
|
|
GossipExitMessage = "voluntary_exit"
|
|
|
|
// GossipProposerSlashingMessage is the name for the proposer slashing message type.
|
|
|
|
GossipProposerSlashingMessage = "proposer_slashing"
|
|
|
|
// GossipAttesterSlashingMessage is the name for the attester slashing message type.
|
|
|
|
GossipAttesterSlashingMessage = "attester_slashing"
|
|
|
|
// GossipAggregateAndProofMessage is the name for the attestation aggregate and proof message type.
|
|
|
|
GossipAggregateAndProofMessage = "beacon_aggregate_and_proof"
|
|
|
|
// GossipContributionAndProofMessage is the name for the sync contribution and proof message type.
|
|
|
|
GossipContributionAndProofMessage = "sync_committee_contribution_and_proof"
|
2022-11-26 19:07:05 +00:00
|
|
|
// GossipBlsToExecutionChangeMessage is the name for the bls to execution change message type.
|
|
|
|
GossipBlsToExecutionChangeMessage = "bls_to_execution_change"
|
2023-05-18 16:13:18 +00:00
|
|
|
// GossipBlobSidecarMessage is the name for the blob sidecar message type.
|
|
|
|
GossipBlobSidecarMessage = "blob_sidecar"
|
2021-08-27 01:34:20 +00:00
|
|
|
// Topic Formats
|
|
|
|
//
|
2020-07-09 17:38:15 +00:00
|
|
|
// AttestationSubnetTopicFormat is the topic format for the attestation subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
AttestationSubnetTopicFormat = GossipProtocolAndDigest + GossipAttestationMessage + "_%d"
|
2021-08-18 04:55:48 +00:00
|
|
|
// SyncCommitteeSubnetTopicFormat is the topic format for the sync committee subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
SyncCommitteeSubnetTopicFormat = GossipProtocolAndDigest + GossipSyncCommitteeMessage + "_%d"
|
2020-07-09 17:38:15 +00:00
|
|
|
// BlockSubnetTopicFormat is the topic format for the block subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
BlockSubnetTopicFormat = GossipProtocolAndDigest + GossipBlockMessage
|
2020-07-09 17:38:15 +00:00
|
|
|
// ExitSubnetTopicFormat is the topic format for the voluntary exit subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
ExitSubnetTopicFormat = GossipProtocolAndDigest + GossipExitMessage
|
2020-07-09 17:38:15 +00:00
|
|
|
// ProposerSlashingSubnetTopicFormat is the topic format for the proposer slashing subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
ProposerSlashingSubnetTopicFormat = GossipProtocolAndDigest + GossipProposerSlashingMessage
|
2020-07-09 17:38:15 +00:00
|
|
|
// AttesterSlashingSubnetTopicFormat is the topic format for the attester slashing subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
AttesterSlashingSubnetTopicFormat = GossipProtocolAndDigest + GossipAttesterSlashingMessage
|
2020-07-09 17:38:15 +00:00
|
|
|
// AggregateAndProofSubnetTopicFormat is the topic format for the aggregate and proof subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
AggregateAndProofSubnetTopicFormat = GossipProtocolAndDigest + GossipAggregateAndProofMessage
|
2021-08-18 04:55:48 +00:00
|
|
|
// SyncContributionAndProofSubnetTopicFormat is the topic format for the sync aggregate and proof subnet.
|
2021-08-27 01:34:20 +00:00
|
|
|
SyncContributionAndProofSubnetTopicFormat = GossipProtocolAndDigest + GossipContributionAndProofMessage
|
2022-11-26 19:07:05 +00:00
|
|
|
// BlsToExecutionChangeSubnetTopicFormat is the topic format for the bls to execution change subnet.
|
|
|
|
BlsToExecutionChangeSubnetTopicFormat = GossipProtocolAndDigest + GossipBlsToExecutionChangeMessage
|
2023-05-18 16:13:18 +00:00
|
|
|
// BlobSubnetTopicFormat is the topic format for the blob subnet.
|
|
|
|
BlobSubnetTopicFormat = GossipProtocolAndDigest + GossipBlobSidecarMessage + "_%d"
|
2020-07-09 17:38:15 +00:00
|
|
|
)
|