Skip to content

Instantly share code, notes, and snippets.

View Sword-Smith's full-sized avatar

Thorkil Værge Sword-Smith

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sword-smith on github.
  • I am sword_smith (https://keybase.io/sword_smith) on keybase.
  • I have a public key ASDUzjJc1zGNHELb8M-aY9ns7U9ekY3Y6koHHJrNF6biywo

To claim this, I am signing this object:

@Sword-Smith
Sword-Smith / merkle_tree.rs
Created July 19, 2024 14:09
Rust code for approximating size of compressed authentication structure vs. naive Merkle tree approach
// Add this test to `twenty-first`'s `twenty-first/src/util_types/merkle_tree.rs` to run it.
#[test]
fn size_test_for_swbfi_authentication_path_merging() {
const NUM_SAMPLES: usize = 2000;
const TREE_HEIGHT: usize = 12;
const INDEX_RANGE: usize = 1 << 8;
const BIG_TREE_HEIGHT: usize = 32;
const NUM_LEAFS: usize = 1 << TREE_HEIGHT;
const NUM_OPENED_LEAFS: usize = 45;