prysm-pulse/proto/beacon/p2p/v1/messages.proto
Preston Van Loon 83130358a9
Rollback state to handle side chain with skip blocks (#2147)
* Add initial test

* chkpt

* add failing test

* add span to historical state lookup

* use db.HighestBlockSlot()

* fix comment

* update comment

* i wrote a test like a good programmer.

* add test back

* add assertion and unskip test, something new failing tho

* trying to fix test

* remove -1, not sure if i need it yet

* Revert "remove -1, not sure if i need it yet"

This reverts commit 2cfcbb8108b28bb3d7135a993d9053150d5f1e6e.

* save historical state on every save state

* fix hsitorical states

* set historical state in initialize state

* change to a bool

* fix error with empty retrieval of states

* Add missing import

* fix test

* lock in receive block

* remove state generator

* Revert "lock in receive block"

This reverts commit 151b10829d70b2dad3055a8db36d0e1269a853f2.

* Fix Initial Sync Not Processing Canonical Block to Produce Canonical State (#2152)

* fix init sync

* fatal if highest observed root does not match

* proto fields

* Update beacon-chain/sync/initial-sync/service.go

* confirm canonical state root

* fix most tests

* failing test

* fix PR tests

* lint

* no simbackend changes

* logf revert

* add todo

* fix off by one

* fix test with deleted property

* merge #2157

* passing tests :)
2019-04-04 22:39:51 -05:00

141 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
package ethereum.beacon.p2p.v1;
import "proto/beacon/p2p/v1/types.proto";
enum Topic {
UNKNOWN = 0;
BEACON_BLOCK_ANNOUNCE = 1;
BEACON_BLOCK_REQUEST = 2;
BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER = 3;
BEACON_BLOCK_RESPONSE = 4;
BATCHED_BEACON_BLOCK_REQUEST = 5;
BATCHED_BEACON_BLOCK_RESPONSE = 6;
CHAIN_HEAD_REQUEST = 7;
CHAIN_HEAD_RESPONSE = 8;
BEACON_STATE_HASH_ANNOUNCE = 9;
BEACON_STATE_REQUEST = 10;
BEACON_STATE_RESPONSE = 11;
ATTESTATION_ANNOUNCE = 12;
ATTESTATION_REQUEST = 13;
ATTESTATION_RESPONSE = 14;
}
message Envelope {
bytes span_context = 1;
bytes payload = 2;
}
message BeaconBlockAnnounce {
bytes hash = 1;
uint64 slot_number = 2;
}
message BeaconBlockRequest {
bytes hash = 1;
}
message BeaconBlockRequestBySlotNumber{
uint64 slot_number = 1;
}
message BeaconBlockResponse {
BeaconBlock block = 1;
Attestation attestation = 2;
}
message BatchedBeaconBlockRequest {
uint64 start_slot = 1;
uint64 end_slot =2;
}
message BatchedBeaconBlockResponse {
repeated BeaconBlock batched_blocks = 1;
}
message ChainHeadRequest {}
message ChainHeadResponse {
uint64 canonical_slot = 1;
bytes canonical_state_root_hash32 = 2;
bytes finalized_state_root_hash32s = 3;
}
message BeaconStateHashAnnounce {
bytes hash = 1;
}
message BeaconStateRequest {
bytes finalized_state_root_hash32s = 1;
}
message BeaconStateResponse {
BeaconState finalized_state = 1;
}
message AttestationAnnounce {
bytes hash = 1;
}
message AttestationRequest {
bytes hash = 1;
}
message AttestationResponse {
bytes hash = 1;
Attestation attestation = 2;
}
message ProposerSlashingAnnounce {
bytes hash = 1;
}
message ProposerSlashingRequest {
bytes hash = 1;
}
message ProposerSlashingResponse {
bytes hash = 1;
ProposerSlashing proposer_slashing = 2;
}
message AttesterSlashingAnnounce {
bytes hash = 1;
}
message AttesterSlashingRequest {
bytes hash = 1;
}
message AttesterSlashingResponse {
bytes hash = 1;
AttesterSlashing Attester_slashing = 2;
}
message DepositAnnounce {
bytes hash = 1;
}
message DepositRequest {
bytes hash = 1;
}
message DepositResponse {
bytes hash = 1;
Deposit deposit = 2;
}
message ExitAnnounce {
bytes hash = 1;
}
message ExitRequest {
bytes hash = 1;
}
message ExitResponse {
bytes hash = 1;
VoluntaryExit voluntary_exit = 2;
}