Crate snarkvm_ledger_debug

Source

Re-exports§

pub use ledger_authority as authority;
pub use ledger_block as block;
pub use ledger_coinbase as coinbase;
pub use ledger_committee as committee;
pub use ledger_narwhal_debug as narwhal;
pub use ledger_query as query;
pub use ledger_store as store;

Modules§

header
ratifications
ratify
transaction
transactions
transition

Structs§

Block
Deployment
Execution
Fee
Header
The header for the block contains metadata that uniquely identifies the block.
Ledger
Metadata
Ratifications
Transactions
Transition

Enums§

ConfirmedTransaction
The confirmed transaction.
Input
The transition input.
Output
The transition output.
Ratify
RecordsFilter
Rejected
A wrapper around the rejected deployment or execution.
Transaction

Constants§

MAX_COINBASE_REWARD
A safety bound (sanity-check) for the coinbase reward.

Functions§

block_height_at_year
Returns the block height after a given number of years for a specific block time.
block_reward
Calculate the block reward, given the total supply, block time, coinbase reward, and transaction fees. R_staking = floor((0.05 * S) / H_Y1) + CR / 2 + TX_F. S = Total supply. H_Y1 = Expected block height at year 1. CR = Coinbase reward. TX_F = Transaction fees.
coinbase_reward
Calculates the coinbase reward for a given block. R_coinbase = max(0, H_Y10 - H) * R_anchor * min(P, C_R) / C R_anchor = Anchor reward. H_Y10 = Anchor block height at year 10. H = Current block height. P = Combined proof target. C_R = Remaining coinbase target. C = Coinbase target.
coinbase_target
Calculate the coinbase target for the given block timestamps and target.
decouple_transmissions
Takes in an iterator of transmissions and returns a tuple of ratifications, solutions, and transactions.
proof_target
Calculate the minimum proof target for the given coinbase target.
puzzle_reward
Calculate the puzzle reward, given the coinbase reward.
update_total_supply
Returns the next total supply in microcredits, given the starting total supply and newly-confirmed transactions.

Type Aliases§

NumFinalizeSize
RecordMap