Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "protosol"
version = "18.0.0"
version = "19.0.0"
edition = "2021"
license = "Apache-2.0"
description = "Protobuf definitions for the SVM fuzzing project."
Expand Down
32 changes: 18 additions & 14 deletions proto/votor.options
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
votor.proto package:"fd_exec_test"
votor.proto include:"../../../../ballet/nanopb/pb_firedancer.h"

fd_exec_test.VotorBlockId.block_hash max_size:32 fixed_length:true
fd_exec_test.VotorVote.block_id max_size:32 fixed_length:true
fd_exec_test.VotorVote.signature max_size:192 fixed_length:true

fd_exec_test.VotorBlockVote.block_hash max_size:32 fixed_length:true
fd_exec_test.VotorCert.block_id max_size:32 fixed_length:true
fd_exec_test.VotorCert.primary_bitmap max_size:253
fd_exec_test.VotorCert.fallback_bitmap max_size:253
fd_exec_test.VotorCert.signature max_size:192 fixed_length:true

fd_exec_test.VotorContext.validators type:FT_POINTER
fd_exec_test.VotorContext.key_seed max_size:32 fixed_length:true
fd_exec_test.VotorContext.actions type:FT_POINTER
fd_exec_test.VotorReceiveCert.block_id max_size:32 fixed_length:true
fd_exec_test.VotorReceiveCert.primary_bitmap max_size:253
fd_exec_test.VotorReceiveCert.fallback_bitmap max_size:253

fd_exec_test.VotorAggSig.signers type:FT_POINTER
fd_exec_test.VotorDatagram.data max_size:1280

fd_exec_test.VotorBlockCert.block_hash max_size:32 fixed_length:true
fd_exec_test.VotorReceiveContext.datagrams type:FT_POINTER
fd_exec_test.VotorReceiveContext.validator_stakes max_count:16

fd_exec_test.VotorNotarFallbackCert.block_hash max_size:32 fixed_length:true
fd_exec_test.VotorReceiveEffects.results type:FT_POINTER
fd_exec_test.VotorReceiveEffects.certs type:FT_POINTER
fd_exec_test.VotorReceiveEffects.banned type:FT_POINTER

fd_exec_test.VotorStandstill.certs type:FT_POINTER
fd_exec_test.VotorStandstill.votes type:FT_POINTER
fd_exec_test.VotorVoteSerializeEffects.wire max_size:236
fd_exec_test.VotorVoteSerializeEffects.signing_payload max_size:43

fd_exec_test.VotorActionResult.pool_events type:FT_POINTER
fd_exec_test.VotorActionResult.repair_requests type:FT_POINTER

fd_exec_test.VotorEffects.results type:FT_POINTER
fd_exec_test.VotorCertSerializeEffects.wire max_size:1280
246 changes: 105 additions & 141 deletions proto/votor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,166 +3,130 @@ package org.solana.sealevel.v1;

import "metadata.proto";

message VotorBlockId {
uint64 slot = 1;
bytes block_hash = 2;
}

message VotorBlockVote {
uint64 slot = 1;
bytes block_hash = 2;
uint64 signer = 3;
}

message VotorSlotVote {
uint64 slot = 1;
uint64 signer = 2;
/* Field numbers match the wire tags */
enum VotorVoteKind {
VOTOR_VOTE_KIND_UNSPECIFIED = 0;
VOTOR_VOTE_KIND_NOTAR = 1;
VOTOR_VOTE_KIND_FINAL = 2;
VOTOR_VOTE_KIND_SKIP = 3;
VOTOR_VOTE_KIND_NOTAR_FALLBACK = 4;
VOTOR_VOTE_KIND_SKIP_FALLBACK = 5;
}

message VotorVote {
oneof vote {
VotorBlockVote notar = 1;
VotorBlockVote notar_fallback = 2;
VotorSlotVote skip = 3;
VotorSlotVote skip_fallback = 4;
VotorSlotVote final_vote = 5;
}
}

message VotorValidator {
uint64 stake = 1;
}

message VotorBlock {
VotorBlockId block = 1;
VotorBlockId parent = 2;
}

message VotorAction {
oneof action {
VotorVote vote = 1;
VotorBlock block = 2;
bool standstill = 3;
}
}

message VotorContext {
repeated VotorValidator validators = 1;
bytes key_seed = 2;
uint64 own_id = 3;
uint64 slot_offset = 4;
repeated VotorAction actions = 5;
}

message VotorAggSig {
repeated uint64 signers = 2;
}

message VotorBlockCert {
uint64 slot = 1;
bytes block_hash = 2;
VotorAggSig agg_sig = 3;
uint64 stake = 4;
}

message VotorNotarFallbackCert {
uint64 slot = 1;
bytes block_hash = 2;
VotorAggSig agg_sig_notar = 3;
VotorAggSig agg_sig_notar_fallback = 4;
uint64 stake = 5;
}

message VotorSkipCert {
uint64 slot = 1;
VotorAggSig agg_sig_skip = 2;
VotorAggSig agg_sig_skip_fallback = 3;
uint64 stake = 4;
VotorVoteKind kind = 1;
uint64 slot = 2;
/* Exactly 32 bytes; ignored for kinds that carry no block */
bytes block_id = 3;
/* 192 bytes, an uncompressed G2 point, as on the wire */
bytes signature = 4;
}

message VotorFinalCert {
uint64 slot = 1;
VotorAggSig agg_sig = 2;
uint64 stake = 3;
/* Field numbers are the wire tag minus six */
enum VotorCertKind {
VOTOR_CERT_KIND_UNSPECIFIED = 0;
VOTOR_CERT_KIND_FINAL = 1;
VOTOR_CERT_KIND_FAST_FINAL = 2;
VOTOR_CERT_KIND_NOTAR = 3;
VOTOR_CERT_KIND_NOTAR_FALLBACK = 4;
VOTOR_CERT_KIND_SKIP = 5;
}

message VotorCert {
oneof cert {
VotorBlockCert notar = 1;
VotorNotarFallbackCert notar_fallback = 2;
VotorSkipCert skip = 3;
VotorBlockCert fast_final = 4;
VotorFinalCert final_cert = 5;
}
}

message VotorParentReady {
uint64 slot = 1;
VotorBlockId parent = 2;
}

message VotorStandstill {
uint64 slot = 1;
repeated VotorCert certs = 2;
repeated VotorVote votes = 3;
}

message VotorPoolEvent {
oneof event {
VotorParentReady parent_ready = 1;
VotorBlockId safe_to_notar = 2;
uint64 safe_to_skip = 3;
VotorCert cert_created = 4;
VotorStandstill standstill = 5;
}
}

enum VotorAddVoteError {
VOTOR_ADD_VOTE_ERROR_OK = 0;
VOTOR_ADD_VOTE_ERROR_SLOT_OUT_OF_BOUNDS = 1;
VOTOR_ADD_VOTE_ERROR_DUPLICATE = 2;
VOTOR_ADD_VOTE_ERROR_SLASHABLE = 3;
VOTOR_ADD_VOTE_ERROR_UNKNOWN_SIGNER = 4;
VotorCertKind kind = 1;
uint64 slot = 2;
/* Exactly 32 bytes; zero for kinds that carry no block */
bytes block_id = 3;
/* Base2 signer bitmaps by rank; fallback only for notar fallback and skip */
bytes primary_bitmap = 4;
bytes fallback_bitmap = 5;
/* Aggregate signature, 192 bytes uncompressed, as on the wire */
bytes signature = 6;
}

/* Receive: datagrams run in order through each node's receive path and pool */
message VotorDatagram {
/* Index into validator_stakes; out of range is an unknown sender */
uint32 sender = 1;
/* Raw wire bytes, a vote or a cert */
bytes data = 2;
}

message VotorReceiveContext {
/* Processed in this order */
repeated VotorDatagram datagrams = 1;
uint64 root_slot = 2;
uint32 shred_version = 3;
uint64 highest_parent_ready_slot = 4;
/* Stake of validator i (at most 16); its keys are fixed by the harness */
repeated uint64 validator_stakes = 5;
}

/* A cert the pool holds, with its signature as an 8-byte XXH64 hash (seed 0) */
message VotorReceiveCert {
VotorCertKind kind = 1;
uint64 slot = 2;
/* Exactly 32 bytes; zero for kinds that carry no block */
bytes block_id = 3;
/* Base2 signer bitmaps by rank; fallback only for notar fallback and skip */
bytes primary_bitmap = 4;
bytes fallback_bitmap = 5;
fixed64 signature_hash = 6;
}

message VotorReceiveEffects {
/* One per datagram: was it added to the consensus pool */
repeated bool results = 1;
/* Certs the pool holds at the end, sorted by kind, slot, block_id */
repeated VotorReceiveCert certs = 2;
/* Senders banned at the end, sorted */
repeated uint32 banned = 3;
}

message VotorReceiveFixture {
FixtureMetadata metadata = 1;
VotorReceiveContext input = 2;
VotorReceiveEffects output = 3;
}

enum VotorSlashableOffence {
VOTOR_SLASHABLE_OFFENCE_UNSET = 0;
VOTOR_SLASHABLE_OFFENCE_NOTAR_DIFFERENT_HASH = 1;
VOTOR_SLASHABLE_OFFENCE_SKIP_AND_NOTARIZE = 2;
VOTOR_SLASHABLE_OFFENCE_SKIP_AND_FINALIZE = 3;
VOTOR_SLASHABLE_OFFENCE_NOTAR_FALLBACK_AND_FINALIZE = 4;
/* Vote serialize: the wire message and signing payload of a vote */
message VotorVoteSerializeContext {
VotorVote vote = 1;
uint32 shred_version = 2;
}

message VotorSlashable {
VotorSlashableOffence offence = 1;
uint64 validator = 2;
uint64 slot = 3;
message VotorVoteSerializeEffects {
/* Wire message as sent over QUIC */
bytes wire = 1;
/* Bytes the BLS signature is computed over */
bytes signing_payload = 2;
/* Not a vote production builds; nothing was serialized */
bool skipped = 3;
/* The serializer rejected a vote production builds */
bool refused = 4;
}

message VotorActionResult {
VotorAddVoteError error = 1;
VotorSlashable slashable = 2;
repeated VotorPoolEvent pool_events = 3;
repeated VotorBlockId repair_requests = 4;
message VotorVoteSerializeFixture {
FixtureMetadata metadata = 1;
VotorVoteSerializeContext input = 2;
VotorVoteSerializeEffects output = 3;
}

enum VotorRunStatus {
VOTOR_RUN_STATUS_UNSET = 0;
VOTOR_RUN_STATUS_OK = 1;
VOTOR_RUN_STATUS_PANIC = 2;
VOTOR_RUN_STATUS_INVALID_INPUT = 3;
VOTOR_RUN_STATUS_TIMEOUT = 4;
/* Cert serialize: the wire message of a cert */
message VotorCertSerializeContext {
VotorCert cert = 1;
uint32 shred_version = 2;
}

message VotorEffects {
VotorRunStatus status = 1;
repeated VotorActionResult results = 2;
uint64 finalized_slot = 3;
uint64 first_unpruned_slot = 4;
message VotorCertSerializeEffects {
/* Wire message as sent over QUIC */
bytes wire = 1;
/* Not a cert a pool builds; nothing was serialized */
bool skipped = 2;
}

message VotorFixture {
message VotorCertSerializeFixture {
FixtureMetadata metadata = 1;
VotorContext input = 2;
VotorEffects output = 3;
VotorCertSerializeContext input = 2;
VotorCertSerializeEffects output = 3;
}
Binary file modified src/generated/file_descriptor_set.bin
Binary file not shown.
Loading
Loading