-
Notifications
You must be signed in to change notification settings - Fork 117
Add support for the simple "sigs-based auth" VSS scheme #755
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
base: main
Are you sure you want to change the base?
Changes from all commits
38ae0f9
fb2b6b7
42c9914
88c6151
1c51a36
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 |
|---|---|---|
|
|
@@ -25,12 +25,7 @@ async fn channel_full_cycle_with_vss_store() { | |
| builder_a.set_chain_source_esplora(esplora_url.clone(), None); | ||
| let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap(); | ||
| let node_a = builder_a | ||
| .build_with_vss_store_and_fixed_headers( | ||
| config_a.node_entropy, | ||
| vss_base_url.clone(), | ||
| "node_1_store".to_string(), | ||
| HashMap::new(), | ||
| ) | ||
| .build_with_vss_store(config_a.node_entropy, vss_base_url.clone(), HashMap::new()) | ||
| .unwrap(); | ||
| node_a.start().unwrap(); | ||
|
|
||
|
|
@@ -39,12 +34,7 @@ async fn channel_full_cycle_with_vss_store() { | |
| let mut builder_b = Builder::from_config(config_b.node_config); | ||
| builder_b.set_chain_source_esplora(esplora_url.clone(), None); | ||
| let node_b = builder_b | ||
| .build_with_vss_store_and_fixed_headers( | ||
| config_b.node_entropy, | ||
| vss_base_url, | ||
| "node_2_store".to_string(), | ||
| HashMap::new(), | ||
| ) | ||
| .build_with_vss_store(config_b.node_entropy, vss_base_url, HashMap::new()) | ||
| .unwrap(); | ||
| node_b.start().unwrap(); | ||
|
|
||
|
|
@@ -66,11 +56,9 @@ async fn vss_v0_schema_backwards_compatibility() { | |
| let esplora_url = format!("http://{}", electrsd.esplora_url.as_ref().unwrap()); | ||
| let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap(); | ||
|
|
||
| let rand_suffix: String = | ||
| (0..7).map(|_| rng().sample(rand::distr::Alphanumeric) as char).collect(); | ||
| let store_id = format!("v0_compat_test_{}", rand_suffix); | ||
|
Collaborator
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. No, please leave this in place, otherwise running this test repeatedly against the same backend won't start from scratch every time.
Contributor
Author
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, sorry, missed that they're using a static seed. I randomized the seed. |
||
| let storage_path = common::random_storage_path().to_str().unwrap().to_owned(); | ||
| let seed_bytes = [42u8; 64]; | ||
| let mut seed_bytes = [42u8; 64]; | ||
| rand::thread_rng().fill_bytes(&mut seed_bytes); | ||
| let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes); | ||
|
|
||
| // Setup a v0.6.2 `Node` persisted with the v0 scheme. | ||
|
|
@@ -81,11 +69,7 @@ async fn vss_v0_schema_backwards_compatibility() { | |
| builder_old.set_entropy_seed_bytes(seed_bytes); | ||
| builder_old.set_chain_source_esplora(esplora_url.clone(), None); | ||
| let node_old = builder_old | ||
| .build_with_vss_store_and_fixed_headers( | ||
| vss_base_url.clone(), | ||
| store_id.clone(), | ||
| HashMap::new(), | ||
| ) | ||
| .build_with_vss_store(node_entropy, vss_base_url.clone(), HashMap::new()) | ||
| .unwrap(); | ||
|
|
||
| node_old.start().unwrap(); | ||
|
|
@@ -119,11 +103,9 @@ async fn vss_v0_schema_backwards_compatibility() { | |
| builder_new.set_chain_source_esplora(esplora_url, None); | ||
|
|
||
| let node_new = builder_new | ||
| .build_with_vss_store_and_fixed_headers( | ||
| .build_with_vss_store( | ||
| node_entropy, | ||
| vss_base_url, | ||
| store_id, | ||
| HashMap::new(), | ||
| ) | ||
| .unwrap(); | ||
|
|
||
|
|
@@ -145,11 +127,9 @@ async fn vss_node_restart() { | |
| let esplora_url = format!("http://{}", electrsd.esplora_url.as_ref().unwrap()); | ||
| let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap(); | ||
|
|
||
| let rand_suffix: String = | ||
| (0..7).map(|_| rng().sample(rand::distr::Alphanumeric) as char).collect(); | ||
| let store_id = format!("restart_test_{}", rand_suffix); | ||
| let storage_path = common::random_storage_path().to_str().unwrap().to_owned(); | ||
| let seed_bytes = [42u8; 64]; | ||
| let mut seed_bytes = [42u8; 64]; | ||
| rand::thread_rng().fill_bytes(&mut seed_bytes); | ||
| let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes); | ||
|
|
||
| // Setup initial node and fund it. | ||
|
|
@@ -159,12 +139,7 @@ async fn vss_node_restart() { | |
| builder.set_storage_dir_path(storage_path.clone()); | ||
| builder.set_chain_source_esplora(esplora_url.clone(), None); | ||
| let node = builder | ||
| .build_with_vss_store_and_fixed_headers( | ||
| node_entropy, | ||
| vss_base_url.clone(), | ||
| store_id.clone(), | ||
| HashMap::new(), | ||
| ) | ||
| .build_with_vss_store(node_entropy, vss_base_url.clone(), HashMap::new()) | ||
| .unwrap(); | ||
|
|
||
| node.start().unwrap(); | ||
|
|
@@ -192,14 +167,7 @@ async fn vss_node_restart() { | |
| builder.set_storage_dir_path(storage_path); | ||
| builder.set_chain_source_esplora(esplora_url, None); | ||
|
|
||
| let node = builder | ||
| .build_with_vss_store_and_fixed_headers( | ||
| node_entropy, | ||
| vss_base_url, | ||
| store_id, | ||
| HashMap::new(), | ||
| ) | ||
| .unwrap(); | ||
| let node = builder.build_with_vss_store(node_entropy, vss_base_url, HashMap::new()).unwrap(); | ||
|
|
||
| node.start().unwrap(); | ||
| node.sync_wallets().unwrap(); | ||
|
|
||
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.
Why are we changing the
store_idhere and below?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.
To demonstrate/test client isolation in VSS by default.