syntax = "proto3";
package org.solana.sealevel.v1;
import "context.proto";
import "txn.proto";
import "metadata.proto";
message CostTracker {
uint64 block_cost = 1;
uint64 vote_cost = 2;
}
message Inflation {
double initial = 1;
double terminal = 2;
double taper = 3;
double foundation = 4;
double foundation_term = 5;
}
message EpochCredit {
uint64 epoch = 1;
uint64 credits = 2;
uint64 prev_credits = 3;
}
enum VoteAccountVersion {
V1_14_11 = 0;
V3 = 1;
V4 = 2;
}
message PrevVoteAccount {
bytes address = 1;
bytes node_pubkey = 2;
uint64 stake = 3;
uint32 commission_bps = 4;
/* Epoch credits are only needed for recalculating partitioned
epoch rewards during the distribution phase. */
repeated EpochCredit epoch_credits = 5;
VoteAccountVersion version = 6;
}
enum WarmupCooldownRate {
RATE_025 = 0; // 0.25
RATE_009 = 1; // 0.09
}
message BlockBank {
/* Up to 300 (actually 301) most recent blockhashes (ordered from oldest to newest) */
repeated BlockhashQueueEntry blockhash_queue = 1;
uint32 rbh_lamports_per_signature = 2;
FeeRateGovernor fee_rate_governor = 3;
/* The slot number of the block being executed */
uint64 slot = 4;
/* 0 <= parent_slot < slot */
uint64 parent_slot = 5;
uint64 capitalization = 6;
/* uint128: nanoseconds per slot */
bytes ns_per_slot = 7;
/*
Constraints (all f64, must be finite and non-negative):
initial: 0.0 - 0.15 (mainnet: 0.08)
terminal: 0.0 - initial (mainnet: 0.015)
taper: 0.0 - 1.0 (mainnet: 0.15)
foundation: 0.0 - 1.0 (mainnet: 0.05)
foundation_term: 0.0 - 100.0 (mainnet: 7.0)
*/
Inflation inflation = 8;
/* 0 <= block_height <= slot */
uint64 block_height = 9;
/* POH (computed right before block execution) */
bytes poh = 10;
/* Parent bank hash */
bytes parent_bank_hash = 11;
/* Parent LT hash */
bytes parent_lt_hash = 12;
uint64 parent_signature_count = 13;
EpochSchedule epoch_schedule = 14;
reserved 15;
FeatureSet features = 16;
repeated PrevVoteAccount vote_accounts_t_1 = 17;
repeated PrevVoteAccount vote_accounts_t_2 = 18;
reserved 19;
}
message BlockContext {
// All transactions in this microblock (can be 0)
repeated SanitizedTransaction txns = 1;
// Input account states
repeated AcctState acct_states = 2;
reserved 3, 4, 5;
// Bank fields for the block fuzzer
BlockBank bank = 6;
}
message LeaderScheduleEffects {
// Epoch number for which this leader schedule applies
uint64 leaders_epoch = 1;
// First slot number covered by this leader schedule
uint64 leaders_slot0 = 2;
// Total number of slots covered by this leader schedule
uint64 leaders_slot_cnt = 3;
// Number of unique validator public keys in the leader schedule
uint64 leader_pub_cnt = 4;
// Number of entries in the leader schedule (slots with assigned leaders)
uint64 leaders_sched_cnt = 5;
// Hash of the leader schedule
bytes leader_schedule_hash = 6;
}
message BlockEffects {
// If block execution failed
bool has_error = 1;
// Slot capitalization
uint64 slot_capitalization = 2;
// Bank hash
bytes bank_hash = 3;
// The cost tracker
CostTracker cost_tracker = 4;
// Leader schedule
LeaderScheduleEffects leader_schedule = 5;
}
message BlockFixture {
FixtureMetadata metadata = 1;
// The block input
BlockContext input = 2;
// The output
BlockEffects output = 3;
}