Skip to content
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

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

gabriele-0201
Copy link
Contributor

  • More sophisticated value generation.

  • Use the max_rollback_blocks cli argument as nomt option for max_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.

@gabriele-0201 gabriele-0201 force-pushed the gm_adderess_some_left_todos branch from 076aa0c to 2a5a9ba Compare January 24, 2025 11:43
@gabriele-0201 gabriele-0201 force-pushed the gm_adderess_some_left_todos branch from 2a5a9ba to 6ac611e Compare January 24, 2025 11:46
@gabriele-0201 gabriele-0201 force-pushed the gm_adderess_some_left_todos branch from 6ac611e to 1b5865f Compare January 24, 2025 11:49
@gabriele-0201 gabriele-0201 force-pushed the gm_adderess_some_left_todos branch 2 times, most recently from e5bdf19 to 55aa3de Compare January 24, 2025 12:34
@gabriele-0201 gabriele-0201 force-pushed the gm_adderess_some_left_todos branch from 55aa3de to da7991a Compare January 24, 2025 13:51
@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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;
Copy link
Contributor

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,
Copy link
Contributor

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)?

Copy link
Contributor Author

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!

Copy link
Contributor

pepyakin commented Jan 28, 2025

Merge activity

  • Jan 28, 5:24 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 28, 5:32 AM EST: Graphite rebased this pull request as part of a merge.
  • Jan 28, 5:33 AM EST: A user merged this pull request with Graphite.

@pepyakin pepyakin changed the base branch from gm_long_rollback_test to graphite-base/725 January 28, 2025 10:28
@pepyakin pepyakin changed the base branch from graphite-base/725 to master January 28, 2025 10:30
+ more sophisticated new key generation
+ more sophisticated value generation
+ use the `max_rollback_blocks` cli argument as nomt option
  for `max_rollback_log_len`
@pepyakin pepyakin force-pushed the gm_adderess_some_left_todos branch from da7991a to acf4507 Compare January 28, 2025 10:31
@pepyakin pepyakin merged commit f1395ff into master Jan 28, 2025
8 checks passed
@pepyakin pepyakin deleted the gm_adderess_some_left_todos branch January 28, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants