-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Define tick related helper test methods #33537
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4211,6 +4211,22 @@ impl Bank { | |
self.tick_height.fetch_add(1, Relaxed); | ||
} | ||
|
||
#[cfg(feature = "dev-context-only-utils")] | ||
pub fn register_tick_for_test(&self, hash: &Hash) { | ||
// currently meaningless wrapper; upcoming pr will make it an actual helper... | ||
self.register_tick(hash) | ||
} | ||
|
||
#[cfg(feature = "dev-context-only-utils")] | ||
pub fn register_default_tick_for_test(&self) { | ||
self.register_tick(&Hash::default()) | ||
} | ||
|
||
#[cfg(feature = "dev-context-only-utils")] | ||
pub fn register_unique_tick(&self) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
self.register_tick(&Hash::new_unique()) | ||
} | ||
|
||
pub fn is_complete(&self) -> bool { | ||
self.tick_height() == self.max_tick_height() | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ source ci/rust-version.sh nightly | |
# reason to bend dev-context-only-utils's original intention and that listed | ||
# package isn't part of released binaries. | ||
declare tainted_packages=( | ||
solana-ledger-tool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after very loong thought since hacking on dcou, i've finally decided to regard it contains very dangerous code, which i'd like to guard under dcou. for one, the touched code in this pr is literally arbitrarily mangling snapshot with new bank... so, i think it's okay to blacklist it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Marking ledger-tool as a tainted package might warrant some wider discussion from ledger-tool focussed people: @steviez @brooksprumo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for bringing this up apfitzge. I'm not sure I understand the full consequences of adding
I'd mostly agree with this statement, with the caveat that you already mentioned of operators needing this in cluster-restart scenarios. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as a quick recap, dcou-ed code ( to accomplish the aforementioned goals, dcou-ed code is opt-in only after explicitly enabling the dcou was introduced recently as an experiment, but working as intended. so, it's expected to dcou code will increase. hope the story is straightforward so far. :) then, there's some fine prints.... sometimes we want exceptions. specifically, we want to protect some code under
using this pr as an example, i think tainting it is okay instead of not dcou-ing the that's because there will be more similar situations, considering the nature of
on contrast, definitely we want to avoid to add all in all, I'm saying aggressively protecting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, didn't give my ship-it before you pushed. But in any case ...
Yep, everything up to that point I was aware of
This is what I was unaware of, so thank you for calling it out explicitly!
Agree with this sentiment, and while I can't give a retro-active ship it, I'm onboard with the decision / change. Thanks again for the heads up apfitzge & for the explanation ryoqun There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as ☝️ for me too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. err, thanks for polite post-merge replies... as i have tons of code to rebase and ship (#33070), i was aggressive in hindsight... |
||
) | ||
|
||
# convert to comma separeted (ref: https://stackoverflow.com/a/53839433) | ||
|
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.
dcou with inner attr is kinda cool.