syntax = "proto3"; package ethereum.beacon.p2p.v1; import "google/protobuf/timestamp.proto"; enum Topic { UNKNOWN = 0; BEACON_BLOCK_HASH_ANNOUNCE = 1; BEACON_BLOCK_REQUEST = 2; BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER = 3; BEACON_BLOCK_RESPONSE = 4; CRYSTALLIZED_STATE_HASH_ANNOUNCE = 5; CRYSTALLIZED_STATE_REQUEST = 6; CRYSTALLIZED_STATE_RESPONSE = 7; ACTIVE_STATE_HASH_ANNOUNCE = 8; ACTIVE_STATE_REQUEST = 9; ACTIVE_STATE_RESPONSE = 10; } message BeaconBlockHashAnnounce { bytes hash = 1; } message BeaconBlockRequest { bytes hash = 1; } message BeaconBlockRequestBySlotNumber{ uint64 slot_number = 1; } message BeaconBlockResponse { BeaconBlock block = 1; AggregatedAttestation attestation = 2; } message BeaconBlock { bytes parent_hash = 1; uint64 slot_number = 2; bytes randao_reveal = 3; bytes pow_chain_ref = 4; bytes active_state_hash = 5; bytes crystallized_state_hash = 6; google.protobuf.Timestamp timestamp = 7; repeated AggregatedAttestation attestations = 8; } message CrystallizedStateHashAnnounce { bytes hash = 1; } message CrystallizedStateRequest { bytes hash = 1; } message CrystallizedStateResponse { CrystallizedState crystallized_state = 1; } message CrystallizedState { uint64 last_state_recalc = 1; uint64 justified_streak = 2; uint64 last_justified_slot = 3; uint64 last_finalized_slot = 4; uint64 current_dynasty = 5; bytes dynasty_seed = 6; uint64 dynasty_start = 7; repeated CrosslinkRecord crosslink_records = 8; repeated ValidatorRecord validators = 9; repeated ShardAndCommitteeArray shard_and_committees_for_slots = 10; } message ShardAndCommitteeArray { repeated ShardAndCommittee array_shard_and_committee = 1; } message ActiveStateHashAnnounce { bytes hash = 1; } message ActiveStateRequest { bytes hash = 1; } message ShardAndCommittee { uint64 shard_id = 1; repeated uint32 committee = 2; } message ActiveStateResponse { ActiveState active_state = 1; } message ActiveState { repeated AggregatedAttestation pending_attestations = 1; repeated bytes recent_block_hashes = 2; } message ValidatorRecord { uint64 public_key = 1; uint64 withdrawal_shard = 2; bytes withdrawal_address = 3; bytes randao_commitment = 4; uint64 balance = 5; uint64 start_dynasty = 6; uint64 end_dynasty = 7; } message AggregatedAttestation { uint64 slot = 1; uint64 shard_id = 2; uint64 justified_slot = 3; bytes justified_block_hash = 4; bytes shard_block_hash = 5; bytes attester_bitfield = 6; repeated bytes oblique_parent_hashes = 7; repeated uint64 aggregate_sig = 8; } message CrosslinkRecord { uint64 dynasty = 1; bytes blockhash = 2; uint64 slot = 3; } message AttestationHashes { repeated bytes attestation_hash = 1; }