Skip to content

add votor proto - #130

Merged
lidatong merged 1 commit into
mainfrom
votor
Aug 11, 2026
Merged

add votor proto#130
lidatong merged 1 commit into
mainfrom
votor

Conversation

@lidatong

@lidatong lidatong commented Aug 5, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings August 5, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a protobuf contract for differential fuzzing of Alpenglow Votor consensus-pool behavior.

Changes:

  • Models validators, blocks, votes, certificates, and pool events.
  • Defines replay normalization, action results, and run statuses.
  • Adds fixture metadata integration.
Suppressed comments (2)

proto/votor.proto:103

  • A protobuf oneof may be unset, so an empty VotorVote is valid on the wire and has no Rust Vote preimage, contrary to this contract. Because inputs are fuzzer-controlled, define whether such a vote is skipped, maps to INVALID_INPUT, or has another deterministic result so both implementations handle it identically.
   A oneof is used rather than a flat kind field because the two vote
   shapes carry different fields: this makes it structurally impossible
   to attach a block hash to a skip or final vote, so every value of
   this message has exactly one `Vote` preimage.  The cost is that a

proto/votor.proto:200

  • This conflicts with the earlier exhaustive MUST normalization list, which omits reducing slot_offset: one replay harness may follow this SHOULD and reduce the value while another uses the stated saturating-add semantics. Make modulo reduction mandatory in the normalization list, or direct this recommendation only to corpus/fixture generators.
     [0, 2 * SLOTS_PER_EPOCH) = [0, 36000) and any offset at or beyond
     36000 makes every vote out of bounds.  Harnesses SHOULD reduce this
     field modulo 36000 so the corpus is not wasted on degenerate
     all-rejected fixtures.  Rebasing within the window lets a corpus

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proto/votor.proto
@@ -0,0 +1,483 @@
syntax = "proto3";
Comment thread proto/votor.proto Outdated

* `validators` empty -> substitute a single validator with stake 1
* `validators` truncated to 2048 (`MAX_SIGNERS`)
* each stake clamped so the running total saturates below uint64 max
Comment thread proto/votor.proto Outdated
vacuously met in release)
* `own_id` reduced modulo the validator count (`ValidatorEpochInfo::new`
panics otherwise)
* `key_seed` and every `block_hash` zero-padded or truncated to 32 bytes
Comment thread proto/votor.proto Outdated
Comment on lines +48 to +50
* an `add_block` action whose `parent.slot >= block.slot` is SKIPPED
entirely -- no call, and no entry in `VotorEffects.results`
(`Pool::add_block` asserts `block.slot > parent.slot`)
Comment thread proto/votor.proto
Comment on lines +153 to +154
message VotorAction {
oneof action {
@lidatong
lidatong force-pushed the votor branch 2 times, most recently from 5b1cfd0 to a915598 Compare August 5, 2026 23:28
@lidatong
lidatong merged commit 60c2d5b into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants