diff --git a/Cargo.lock b/Cargo.lock index 9aa92b9..3b00a7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -399,7 +399,7 @@ dependencies = [ [[package]] name = "protosol" -version = "18.0.0" +version = "20.0.0" dependencies = [ "prost", "prost-build", diff --git a/Cargo.toml b/Cargo.toml index b7ca46f..ac78ed8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "protosol" -version = "18.0.0" +version = "20.0.0" edition = "2021" license = "Apache-2.0" description = "Protobuf definitions for the SVM fuzzing project." diff --git a/proto/repair.options b/proto/repair.options new file mode 100644 index 0000000..0dd1107 --- /dev/null +++ b/proto/repair.options @@ -0,0 +1,21 @@ +repair.proto package:"fd_exec_test" +repair.proto include:"../../../../ballet/nanopb/pb_firedancer.h" + +fd_exec_test.RepairContextV1.slots type:FT_POINTER +fd_exec_test.RepairContextV1.gaps type:FT_POINTER +fd_exec_test.RepairContextV1.insertion_order type:FT_POINTER +fd_exec_test.RepairContextV1.turbine_slots type:FT_POINTER +fd_exec_test.RepairContextV1.peers type:FT_POINTER + +fd_exec_test.RepairEffectsV1.recovered type:FT_POINTER +fd_exec_test.RepairEffectsV1.dropped_slots type:FT_POINTER + +fd_exec_test.RepairContextV2.peer_ids type:FT_POINTER +fd_exec_test.RepairContextV2.chain type:FT_POINTER +fd_exec_test.RepairContextV2.events type:FT_POINTER + +fd_exec_test.RepairSnapshot.slots type:FT_POINTER + +fd_exec_test.RepairEffectsV2.snapshots type:FT_POINTER +fd_exec_test.RepairEffectsV2.requests type:FT_POINTER +fd_exec_test.RepairEffectsV2.evicted_slots type:FT_POINTER diff --git a/proto/repair.proto b/proto/repair.proto new file mode 100644 index 0000000..60661ee --- /dev/null +++ b/proto/repair.proto @@ -0,0 +1,267 @@ +syntax = "proto3"; +package org.solana.sealevel.v1; + +import "metadata.proto"; + +// Differential harness for repair (sol_compat_repair_v1). + +message RepairSlotDescV1 { + uint64 slot = 1; + // Parent registered before any shreds arrive (cf. shred_parent_slot). + uint64 parent_slot = 2; + uint32 fec_set_cnt = 3; + // Data shreds per FEC set; must be 32 (DATA_SHREDS_PER_FEC_BLOCK). + uint32 shreds_per_fec = 4; + // Parent actually embedded in delivered shreds, if it disagrees with + // parent_slot (equivocation). + optional uint64 shred_parent_slot = 5; +} + +message RepairGapShredV1 { + uint64 slot = 1; + uint32 shred_idx = 2; +} + +message RepairGapFecSetV1 { + uint64 slot = 1; + uint32 fec_set_idx = 2; +} + +// Determined at startup, before any repair round runs. +message RepairGapV1 { + oneof gap { + RepairGapShredV1 shred = 1; + RepairGapFecSetV1 fec_set = 2; + // All shreds in the slot, not just one FEC set. + uint64 slot = 3; + } +} + +message RepairPeerV1 { + // 2..255; peer 1 always exists. + uint32 peer_id = 1; + // If set, simulate a repair response with this RTT (ns), aging the peer into + // the fast/slow list. + optional int64 rtt_ns = 2; +} + +message RepairContextV1 { + uint64 root_slot = 1; + repeated RepairSlotDescV1 slots = 2; + repeated RepairGapV1 gaps = 3; + // Max repair requests per round (default 32). + optional uint32 max_requests_per_round = 4; + // Override fd_forest slot_max (must be a power of two); models pool pressure + // to reach the eviction path's force-root escape hatch. + optional uint64 slot_max_override = 5; + // Override fd_reqlim dedup_max (default 1024). + optional uint64 dedup_max_override = 6; + // Insert slots in this order (indices into `slots`) instead of natural order. + repeated uint32 insertion_order = 7; + // Advance the root to this slot after the first gap shred is delivered. + optional uint64 publish_slot = 8; + // Slots whose non-gap shreds are delivered as turbine source (sets ref_tick=1 + // on FD's side). + repeated uint64 turbine_slots = 9; + // Slots >= this are subject to the turbine throttle. + optional uint64 turbine_slot0 = 10; + repeated RepairPeerV1 peers = 11; + // Simulated ms elapsed since a slot's first shred, for repair-eligibility + // throttles; unset = fully elapsed. + optional uint64 elapsed_ms = 12; +} + +message RepairShredIdV1 { + uint64 slot = 1; + uint32 shred_idx = 2; +} + +message RepairEffectsV1 { + // True if the internal driver reached completion within its round budget. + bool converged = 1; + // Sorted by (slot, shred_idx). + repeated RepairShredIdV1 recovered = 2; + // Slots dropped by the implementation (e.g. FD bounded-pool eviction); sorted + // ascending. + repeated uint64 dropped_slots = 3; +} + +message RepairFixtureV1 { + FixtureMetadata metadata = 1; + RepairContextV1 input = 2; + RepairEffectsV1 output = 3; +} + +// Differential harness for repair (sol_compat_repair_v2). The context contains +// ground truth information (`chain`) plus an ordered `RepairEvent` trace that +// describes the test scenario. + +// The responder serves shreds from this. +message RepairChainSlot { + uint64 slot = 1; + uint64 parent_slot = 2; + // Number of FEC sets, 1..=8; each is exactly 32 data shreds. + uint32 fec_set_cnt = 3; +} + +enum RepairShredSource { + REPAIR_SRC_TURBINE = 0; + REPAIR_SRC_REPAIR = 1; +} + +enum RepairShredKind { + REPAIR_SHRED_DATA = 0; + REPAIR_SHRED_CODE = 1; +} + +// Inject part of one FEC set regardless of whether it was requested -- the +// adversarial channel: arrival ordering, equivocating versions, premature slot +// completion, orphan creation. Unit is a FEC set, not a shred, since that's +// the unit both implementations work in. fec_set_idx and slot_complete are +// derived (fec_idx*32; index == fec_set_cnt*32-1), not stored. +message DeliverShred { + uint64 slot = 1; + // Parent these shreds CLAIM; may disagree with the chain (equivocation), not + // clamped. + uint64 parent_slot = 2; + // 0-based. + uint32 fec_idx = 3; + // Bit i selects shred i of the FEC set (absolute index fec_idx*32 + i); a + // cleared bit is a gap. + uint32 shred_mask = 4; + // Byte-version of the block these shreds belong to (its merkle root); + // differing versions model equivocation. + uint32 version = 5; + // FEC-set count of the version these shreds belong to; unset = ground truth's + // count. Models false slot completion. + optional uint32 fec_set_cnt = 6; + // Sets ref_tick (1 if turbine, 0 if repair), FD's per-shred receipt-time feed + // into eligibility timing. + RepairShredSource src = 7; + // Peer these shreds are attributed to; 1 (the default peer) or listed in + // RepairContextV2.peer_ids. + uint32 peer_id = 8; + // Coding shreds count toward the Reed-Solomon recovery threshold. + RepairShredKind kind = 9; +} + +// Feeds the implementation's own outbound requests through the ground-truth +// responder, answering up to `max_n`. +message ServeRequests { + uint32 max_n = 1; +} + +// Consensus signal: the slot was confirmed at `level` (gates FD's +// chain_confirmed / confirmed_bid bookkeeping). +message Confirm { + uint64 slot = 1; + // Byte-version of the block that was confirmed. + uint32 version = 2; + uint32 level = 3; +} + +// Advance the root, as a consensus-driven root change would. Not clamped; +// the repair driver gates the actual advance. +message SetRoot { + uint64 slot = 1; +} + +// Fields apply independently. +message PeerFault { + uint32 peer_id = 1; + // If set, record a repair response with this RTT (ns), aging the peer into + // the fast/slow list. + optional int64 rtt_ns = 2; + // If true, drop requests hashing to this peer, by a predicate both targets + // run identically. + bool unresponsive = 3; +} + +// Simulate wall-clock time passing for both sides' repair-eligibility +// throttles, by back-dating timestamps (never sleeping). +message AdvanceTime { + uint64 ms = 1; +} + +message RepairEvent { + oneof event { + DeliverShred deliver = 1; + ServeRequests serve = 2; + Confirm confirm = 3; + SetRoot set_root = 4; + PeerFault fault = 5; + AdvanceTime time = 6; + } +} + +message RepairContextV2 { + uint64 root_slot = 1; + // FD forest pool size, rounded up to a power of two; 0 = default. Not clamped + // to the trace's slot count -- models pool pressure to reach the eviction + // path's force-root escape hatch. + uint32 slot_max = 2; + // fd_reqlim dedup map size (power of two). 0 selects a default. + uint32 dedup_max = 3; + // 2..=255; peer 1 always exists. + repeated uint32 peer_ids = 4; + repeated RepairChainSlot chain = 5; + repeated RepairEvent events = 6; + // Slots >= this are subject to FD's turbine grace period; unset leaves the + // throttle inactive. + optional uint64 turbine_slot0 = 7; +} + +// One slot's observable state; deliberately raw (indices, not a derived "is +// complete" bit). +message RepairSlotState { + uint64 slot = 1; + uint64 parent_slot = 2; + // Highest contiguous buffered data shred index; UINT32_MAX if none. + uint32 buffered_idx = 3; + // Index carrying SLOT_COMPLETE; UINT32_MAX if not yet known. + uint32 complete_idx = 4; + // Every FEC set in the slot has been chain-verified. + bool chain_confirmed = 5; +} + +// The implementation's live state after one event; `slots` is the set the hard +// check diffs against the other target. +message RepairSnapshot { + // Index into RepairContextV2.events of the event that produced this snapshot. + uint32 event_idx = 1; + uint64 root = 2; + // Sorted ascending by slot. + repeated RepairSlotState slots = 3; + // Diagnostic only: most recent ServeRequests fetched nothing new on this + // side. + bool settled = 4; +} + +enum RepairRequestKind { + REPAIR_REQ_SHRED = 0; + REPAIR_REQ_HIGHEST_SHRED = 1; + REPAIR_REQ_ORPHAN = 2; +} + +// One outbound repair request; metric only, never equality-checked. +message RepairRequest { + RepairRequestKind kind = 1; + uint64 slot = 2; + uint32 shred_idx = 3; + uint32 event_idx = 4; +} + +message RepairEffectsV2 { + repeated RepairSnapshot snapshots = 1; + // Metrics tier, never equality-checked. + repeated RepairRequest requests = 2; + // Slots dropped without the root advancing past them (FD bounded-pool + // eviction); sorted ascending. + repeated uint64 evicted_slots = 3; +} + +message RepairFixtureV2 { + FixtureMetadata metadata = 1; + RepairContextV2 input = 2; + RepairEffectsV2 output = 3; +} diff --git a/src/generated/file_descriptor_set.bin b/src/generated/file_descriptor_set.bin index 4aa17bb..502c720 100644 Binary files a/src/generated/file_descriptor_set.bin and b/src/generated/file_descriptor_set.bin differ diff --git a/src/generated/org.solana.sealevel.v1.rs b/src/generated/org.solana.sealevel.v1.rs index 81a83bf..70e92a3 100644 --- a/src/generated/org.solana.sealevel.v1.rs +++ b/src/generated/org.solana.sealevel.v1.rs @@ -1046,6 +1046,427 @@ pub struct InstrFixture { #[prost(message, optional, tag = "3")] pub output: ::core::option::Option, } +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairSlotDescV1 { + #[prost(uint64, tag = "1")] + pub slot: u64, + /// Parent registered before any shreds arrive (cf. shred_parent_slot). + #[prost(uint64, tag = "2")] + pub parent_slot: u64, + #[prost(uint32, tag = "3")] + pub fec_set_cnt: u32, + /// Data shreds per FEC set; must be 32 (DATA_SHREDS_PER_FEC_BLOCK). + #[prost(uint32, tag = "4")] + pub shreds_per_fec: u32, + /// Parent actually embedded in delivered shreds, if it disagrees with + /// parent_slot (equivocation). + #[prost(uint64, optional, tag = "5")] + pub shred_parent_slot: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairGapShredV1 { + #[prost(uint64, tag = "1")] + pub slot: u64, + #[prost(uint32, tag = "2")] + pub shred_idx: u32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairGapFecSetV1 { + #[prost(uint64, tag = "1")] + pub slot: u64, + #[prost(uint32, tag = "2")] + pub fec_set_idx: u32, +} +/// Determined at startup, before any repair round runs. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairGapV1 { + #[prost(oneof = "repair_gap_v1::Gap", tags = "1, 2, 3")] + pub gap: ::core::option::Option, +} +/// Nested message and enum types in `RepairGapV1`. +pub mod repair_gap_v1 { + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)] + pub enum Gap { + #[prost(message, tag = "1")] + Shred(super::RepairGapShredV1), + #[prost(message, tag = "2")] + FecSet(super::RepairGapFecSetV1), + /// All shreds in the slot, not just one FEC set. + #[prost(uint64, tag = "3")] + Slot(u64), + } +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairPeerV1 { + /// 2..255; peer 1 always exists. + #[prost(uint32, tag = "1")] + pub peer_id: u32, + /// If set, simulate a repair response with this RTT (ns), aging the peer into + /// the fast/slow list. + #[prost(int64, optional, tag = "2")] + pub rtt_ns: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairContextV1 { + #[prost(uint64, tag = "1")] + pub root_slot: u64, + #[prost(message, repeated, tag = "2")] + pub slots: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub gaps: ::prost::alloc::vec::Vec, + /// Max repair requests per round (default 32). + #[prost(uint32, optional, tag = "4")] + pub max_requests_per_round: ::core::option::Option, + /// Override fd_forest slot_max (must be a power of two); models pool pressure + /// to reach the eviction path's force-root escape hatch. + #[prost(uint64, optional, tag = "5")] + pub slot_max_override: ::core::option::Option, + /// Override fd_reqlim dedup_max (default 1024). + #[prost(uint64, optional, tag = "6")] + pub dedup_max_override: ::core::option::Option, + /// Insert slots in this order (indices into `slots`) instead of natural order. + #[prost(uint32, repeated, tag = "7")] + pub insertion_order: ::prost::alloc::vec::Vec, + /// Advance the root to this slot after the first gap shred is delivered. + #[prost(uint64, optional, tag = "8")] + pub publish_slot: ::core::option::Option, + /// Slots whose non-gap shreds are delivered as turbine source (sets ref_tick=1 + /// on FD's side). + #[prost(uint64, repeated, tag = "9")] + pub turbine_slots: ::prost::alloc::vec::Vec, + /// Slots >= this are subject to the turbine throttle. + #[prost(uint64, optional, tag = "10")] + pub turbine_slot0: ::core::option::Option, + #[prost(message, repeated, tag = "11")] + pub peers: ::prost::alloc::vec::Vec, + /// Simulated ms elapsed since a slot's first shred, for repair-eligibility + /// throttles; unset = fully elapsed. + #[prost(uint64, optional, tag = "12")] + pub elapsed_ms: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairShredIdV1 { + #[prost(uint64, tag = "1")] + pub slot: u64, + #[prost(uint32, tag = "2")] + pub shred_idx: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairEffectsV1 { + /// True if the internal driver reached completion within its round budget. + #[prost(bool, tag = "1")] + pub converged: bool, + /// Sorted by (slot, shred_idx). + #[prost(message, repeated, tag = "2")] + pub recovered: ::prost::alloc::vec::Vec, + /// Slots dropped by the implementation (e.g. FD bounded-pool eviction); sorted + /// ascending. + #[prost(uint64, repeated, tag = "3")] + pub dropped_slots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairFixtureV1 { + #[prost(message, optional, tag = "1")] + pub metadata: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub input: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub output: ::core::option::Option, +} +/// The responder serves shreds from this. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairChainSlot { + #[prost(uint64, tag = "1")] + pub slot: u64, + #[prost(uint64, tag = "2")] + pub parent_slot: u64, + /// Number of FEC sets, 1..=8; each is exactly 32 data shreds. + #[prost(uint32, tag = "3")] + pub fec_set_cnt: u32, +} +/// Inject part of one FEC set regardless of whether it was requested -- the +/// adversarial channel: arrival ordering, equivocating versions, premature slot +/// completion, orphan creation. Unit is a FEC set, not a shred, since that's +/// the unit both implementations work in. fec_set_idx and slot_complete are +/// derived (fec_idx*32; index == fec_set_cnt*32-1), not stored. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeliverShred { + #[prost(uint64, tag = "1")] + pub slot: u64, + /// Parent these shreds CLAIM; may disagree with the chain (equivocation), not + /// clamped. + #[prost(uint64, tag = "2")] + pub parent_slot: u64, + /// 0-based. + #[prost(uint32, tag = "3")] + pub fec_idx: u32, + /// Bit i selects shred i of the FEC set (absolute index fec_idx*32 + i); a + /// cleared bit is a gap. + #[prost(uint32, tag = "4")] + pub shred_mask: u32, + /// Byte-version of the block these shreds belong to (its merkle root); + /// differing versions model equivocation. + #[prost(uint32, tag = "5")] + pub version: u32, + /// FEC-set count of the version these shreds belong to; unset = ground truth's + /// count. Models false slot completion. + #[prost(uint32, optional, tag = "6")] + pub fec_set_cnt: ::core::option::Option, + /// Sets ref_tick (1 if turbine, 0 if repair), FD's per-shred receipt-time feed + /// into eligibility timing. + #[prost(enumeration = "RepairShredSource", tag = "7")] + pub src: i32, + /// Peer these shreds are attributed to; 1 (the default peer) or listed in + /// RepairContextV2.peer_ids. + #[prost(uint32, tag = "8")] + pub peer_id: u32, + /// Coding shreds count toward the Reed-Solomon recovery threshold. + #[prost(enumeration = "RepairShredKind", tag = "9")] + pub kind: i32, +} +/// Feeds the implementation's own outbound requests through the ground-truth +/// responder, answering up to `max_n`. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ServeRequests { + #[prost(uint32, tag = "1")] + pub max_n: u32, +} +/// Consensus signal: the slot was confirmed at `level` (gates FD's +/// chain_confirmed / confirmed_bid bookkeeping). +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct Confirm { + #[prost(uint64, tag = "1")] + pub slot: u64, + /// Byte-version of the block that was confirmed. + #[prost(uint32, tag = "2")] + pub version: u32, + #[prost(uint32, tag = "3")] + pub level: u32, +} +/// Advance the root, as a consensus-driven root change would. Not clamped; +/// the repair driver gates the actual advance. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SetRoot { + #[prost(uint64, tag = "1")] + pub slot: u64, +} +/// Fields apply independently. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PeerFault { + #[prost(uint32, tag = "1")] + pub peer_id: u32, + /// If set, record a repair response with this RTT (ns), aging the peer into + /// the fast/slow list. + #[prost(int64, optional, tag = "2")] + pub rtt_ns: ::core::option::Option, + /// If true, drop requests hashing to this peer, by a predicate both targets + /// run identically. + #[prost(bool, tag = "3")] + pub unresponsive: bool, +} +/// Simulate wall-clock time passing for both sides' repair-eligibility +/// throttles, by back-dating timestamps (never sleeping). +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AdvanceTime { + #[prost(uint64, tag = "1")] + pub ms: u64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairEvent { + #[prost(oneof = "repair_event::Event", tags = "1, 2, 3, 4, 5, 6")] + pub event: ::core::option::Option, +} +/// Nested message and enum types in `RepairEvent`. +pub mod repair_event { + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)] + pub enum Event { + #[prost(message, tag = "1")] + Deliver(super::DeliverShred), + #[prost(message, tag = "2")] + Serve(super::ServeRequests), + #[prost(message, tag = "3")] + Confirm(super::Confirm), + #[prost(message, tag = "4")] + SetRoot(super::SetRoot), + #[prost(message, tag = "5")] + Fault(super::PeerFault), + #[prost(message, tag = "6")] + Time(super::AdvanceTime), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairContextV2 { + #[prost(uint64, tag = "1")] + pub root_slot: u64, + /// FD forest pool size, rounded up to a power of two; 0 = default. Not clamped + /// to the trace's slot count -- models pool pressure to reach the eviction + /// path's force-root escape hatch. + #[prost(uint32, tag = "2")] + pub slot_max: u32, + /// fd_reqlim dedup map size (power of two). 0 selects a default. + #[prost(uint32, tag = "3")] + pub dedup_max: u32, + /// 2..=255; peer 1 always exists. + #[prost(uint32, repeated, tag = "4")] + pub peer_ids: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub chain: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub events: ::prost::alloc::vec::Vec, + /// Slots >= this are subject to FD's turbine grace period; unset leaves the + /// throttle inactive. + #[prost(uint64, optional, tag = "7")] + pub turbine_slot0: ::core::option::Option, +} +/// One slot's observable state; deliberately raw (indices, not a derived "is +/// complete" bit). +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairSlotState { + #[prost(uint64, tag = "1")] + pub slot: u64, + #[prost(uint64, tag = "2")] + pub parent_slot: u64, + /// Highest contiguous buffered data shred index; UINT32_MAX if none. + #[prost(uint32, tag = "3")] + pub buffered_idx: u32, + /// Index carrying SLOT_COMPLETE; UINT32_MAX if not yet known. + #[prost(uint32, tag = "4")] + pub complete_idx: u32, + /// Every FEC set in the slot has been chain-verified. + #[prost(bool, tag = "5")] + pub chain_confirmed: bool, +} +/// The implementation's live state after one event; `slots` is the set the hard +/// check diffs against the other target. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairSnapshot { + /// Index into RepairContextV2.events of the event that produced this snapshot. + #[prost(uint32, tag = "1")] + pub event_idx: u32, + #[prost(uint64, tag = "2")] + pub root: u64, + /// Sorted ascending by slot. + #[prost(message, repeated, tag = "3")] + pub slots: ::prost::alloc::vec::Vec, + /// Diagnostic only: most recent ServeRequests fetched nothing new on this + /// side. + #[prost(bool, tag = "4")] + pub settled: bool, +} +/// One outbound repair request; metric only, never equality-checked. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RepairRequest { + #[prost(enumeration = "RepairRequestKind", tag = "1")] + pub kind: i32, + #[prost(uint64, tag = "2")] + pub slot: u64, + #[prost(uint32, tag = "3")] + pub shred_idx: u32, + #[prost(uint32, tag = "4")] + pub event_idx: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairEffectsV2 { + #[prost(message, repeated, tag = "1")] + pub snapshots: ::prost::alloc::vec::Vec, + /// Metrics tier, never equality-checked. + #[prost(message, repeated, tag = "2")] + pub requests: ::prost::alloc::vec::Vec, + /// Slots dropped without the root advancing past them (FD bounded-pool + /// eviction); sorted ascending. + #[prost(uint64, repeated, tag = "3")] + pub evicted_slots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RepairFixtureV2 { + #[prost(message, optional, tag = "1")] + pub metadata: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub input: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub output: ::core::option::Option, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RepairShredSource { + RepairSrcTurbine = 0, + RepairSrcRepair = 1, +} +impl RepairShredSource { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::RepairSrcTurbine => "REPAIR_SRC_TURBINE", + Self::RepairSrcRepair => "REPAIR_SRC_REPAIR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "REPAIR_SRC_TURBINE" => Some(Self::RepairSrcTurbine), + "REPAIR_SRC_REPAIR" => Some(Self::RepairSrcRepair), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RepairShredKind { + RepairShredData = 0, + RepairShredCode = 1, +} +impl RepairShredKind { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::RepairShredData => "REPAIR_SHRED_DATA", + Self::RepairShredCode => "REPAIR_SHRED_CODE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "REPAIR_SHRED_DATA" => Some(Self::RepairShredData), + "REPAIR_SHRED_CODE" => Some(Self::RepairShredCode), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RepairRequestKind { + RepairReqShred = 0, + RepairReqHighestShred = 1, + RepairReqOrphan = 2, +} +impl RepairRequestKind { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::RepairReqShred => "REPAIR_REQ_SHRED", + Self::RepairReqHighestShred => "REPAIR_REQ_HIGHEST_SHRED", + Self::RepairReqOrphan => "REPAIR_REQ_ORPHAN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "REPAIR_REQ_SHRED" => Some(Self::RepairReqShred), + "REPAIR_REQ_HIGHEST_SHRED" => Some(Self::RepairReqHighestShred), + "REPAIR_REQ_ORPHAN" => Some(Self::RepairReqOrphan), + _ => None, + } + } +} /// Any features that needed to be fuzzed should be manually added here. /// Once they're cleaned up / activated on all clusters, they can be /// removed via a reserved tag.