-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add subcommand "compute-slot-cost" to ledger tool #17181
Add subcommand "compute-slot-cost" to ledger tool #17181
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17181 +/- ##
========================================
Coverage 82.7% 82.7%
========================================
Files 421 419 -2
Lines 117926 118112 +186
========================================
+ Hits 97574 97776 +202
+ Misses 20352 20336 -16 |
0d91203
to
afb1fe4
Compare
Using this branch and ledger downloaded from mainnet, ran two things are interesting (from the spreadsheet):
To improve cluster throughput efficiency with cost_model, my thought is to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm overall, just some minor nits. Note that I'm only reviewing the ledger-tool/ changes in this PR, since the rest of this code is from another PR
ledger-tool/Cargo.toml
Outdated
@@ -35,6 +35,7 @@ solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.7.0" } | |||
solana-transaction-status = { path = "../transaction-status", version = "=1.7.0" } | |||
solana-version = { path = "../version", version = "=1.7.0" } | |||
solana-vote-program = { path = "../programs/vote", version = "=1.7.0" } | |||
solana-core = { path = "../core", version = "=1.7.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, it hurts to see this dependency come into ledger-tool. Oh well, we need to refactor core/ more at some point anyway I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, see your point, core
should be internal and unexposed. Maybe make sense to move cost model
from core
to other better suited crates, I am not sure where though, maybe sdk
or runtime
?
…ost-model on slots in ledger Co-authored-by: Michael Vines <[email protected]>
41b19d4
to
44c0038
Compare
@mvines cost_model PR has been merged to master, rebased this PR, it's ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
* include cost_model and cost_tracker from banking stage * add positional subcommand, compute-slot-cost, to ledger-tool to run cost-model on slots in ledger Co-authored-by: Michael Vines <[email protected]> Co-authored-by: Michael Vines <[email protected]> (cherry picked from commit 3a12f92) # Conflicts: # ledger-tool/Cargo.toml
Problem
Want a way to run banking-stage's cost-model over the block of given slot(s), to compute how expensive each block was, which is used as input for tuning the cost_model that banking_stage uses to feeds its banks.
Summary of Changes
compute-slot-cost
subcommand to ledger tool, it runs on all slot if no slots given on command line;Fixes #