-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --block-{verification,production}-method flags (noop atm) #30746
Add --block-{verification,production}-method flags (noop atm) #30746
Conversation
Codecov Report
@@ Coverage Diff @@
## master #30746 +/- ##
=========================================
- Coverage 81.5% 81.4% -0.1%
=========================================
Files 723 723
Lines 203577 203616 +39
=========================================
- Hits 165923 165913 -10
- Misses 37654 37703 +49 |
i don't imagine the interfaces here are clean enough that we could dyload the impl(s)? |
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.
Think I am missing context, this ability of switching replaying/banking implementation is for testing purpose, or to allow mainnet validators to configure their s/w (practically to have two versions of labs validators in mainnet)?
yep. so i avoided |
@brooksprumo @apfitzge @taozhu-chicago @t-nelson thanks for reviewing! I think I've relied to all. :) the hottest topic would be |
a6fcaea
to
68a0eac
Compare
I defer the naming to y'all. As I haven't worked on much of this code, I trust your judgement as domain experts here! |
this is actually something I'd like to eventually support for bank scheduling (now block-production arg?). Final interface is still in-flight, so not thinking too much about it yet. However, I don't think that option will play very nicely with the use of strum here if we want to pass the library path as a cli arg along lines of |
ledger-tool/src/main.rs
Outdated
.possible_values(ReplayingBackend::cli_names()) | ||
.default_value(ReplayingBackend::default().into()) |
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.
Not super familiar with how clap validation works, or if this is a product of us using strum.
I tested this and passing --replaying-backend
(note I didn't specify the variant) works fine and results in the default.
That seemed a bit odd to me.
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.
68a0eac
to
d1d317e
Compare
49eb374
to
296b909
Compare
@apfitzge could you review this to merge. I've finished off all review comments and renamed. :) |
in short, these will be possible, if desired. clap is very customizable if wanted... |
Yeah, definitely possible with clap. Just not sure we can still use the simple EnumIter stuff from strum |
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.
A few more changes - sorry the review took a while this morning...I always try to give suggestions instead of just saying I don't like something. But it took me a while to figure out how to do it more cleanly (imo)
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 - thanks for all the work to get this ready for us both!
lazy_static! { | ||
static ref MESSAGE: String = format!( | ||
"Switch transaction scheduling method for verifying ledger entries [default: {}]", | ||
BlockVerificationMethod::default() | ||
); | ||
}; | ||
|
||
&MESSAGE |
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.
ref: #35195 (comment)
Problem
There's no way to switch block verification/production implementations from cli in the replay/banking stages.
Summary of Changes
Add minimal cli-side plumbing so that we can add actual impls.
Hope, my unified scheduler for replaying can come soon....
Anyway, let's focus to battle for naming of cli args and descriptions here. :)
Conclusion
bike shed battle ended: