-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore(torture): address multiple left todos #725
Conversation
b0fd3e2
to
e13fc49
Compare
076aa0c
to
2a5a9ba
Compare
e13fc49
to
b222b2c
Compare
2a5a9ba
to
6ac611e
Compare
b222b2c
to
f810061
Compare
6ac611e
to
1b5865f
Compare
f810061
to
209d0cb
Compare
e5bdf19
to
55aa3de
Compare
209d0cb
to
d718b70
Compare
55aa3de
to
da7991a
Compare
@@ -47,7 +47,8 @@ pub struct InitPayload { | |||
/// Only used upon creation a new NOMT db. | |||
pub bitbox_seed: [u8; 16], | |||
/// Whether the agent is supposed to handle rollbacks. | |||
pub rollback: bool, | |||
/// If `Some`, the maximum amount of supported blocks in a single rollback is specified. |
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.
/// If `Some`, the maximum amount of supported blocks in a single rollback is specified. | |
/// If `Some`, the maximum number of supported blocks in a single rollback is specified. |
async fn schedule_rollback(&mut self, should_crash: bool) -> anyhow::Result<()> { | ||
let n_commits_to_rollback = self.commits_to_rollback(); | ||
let n_commits_to_rollback = self.state.rng.gen_range(1..self.max_rollback_commits) as usize; |
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.
This makes line below stale
// | ||
// - Different power of two sizes. | ||
// - Change it to be a non-even. | ||
// MAX_LEAF_VALUE_SIZE is 1332, |
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.
perhaps we should consider re-exporting it with doc(hidden)
?
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.
Yes, I can't recall where or when but I had to hardcode MAX_LEAF_VALUE_SIZE
also another time. It could be useful, yes!
+ more sophisticated new key generation + more sophisticated value generation + use the `max_rollback_blocks` cli argument as nomt option for `max_rollback_log_len`
da7991a
to
acf4507
Compare
More sophisticated value generation.
Use the
max_rollback_blocks
cli argument as nomt option formax_rollback_log_len
.More sophisticated new key generation.
To prove my claim on the amount of probabilities for a given amount of shared bytes, you can check some tests I did here.