-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZIP-221/244 auth data commitment validation in checkpoint verifier (#…
…2633) * Add validation of ZIP-221 and ZIP-244 commitments * Apply suggestions from code review Co-authored-by: teor <[email protected]> * Add auth commitment check in the finalized state * Reset the verifier when comitting to state fails * Add explanation comment * Add test with fake activation heights * Add generate_valid_commitments flag * Enable fake activation heights using env var instead of feature * Also update initial_tip_hash; refactor into progress_from_tip() * Improve comments * Add fake activation heights test to CI * Fix bug that caused commitment trees to not match when generating partial arbitrary chains * Add ChainHistoryBlockTxAuthCommitmentHash::from_commitments to organize and deduplicate code * Remove stale comment, improve readability * Allow overriding with PROPTEST_CASES * partial_chain_strategy(): don't update note commitment trees when not needed; add comment Co-authored-by: teor <[email protected]>
- Loading branch information
1 parent
bacc0f3
commit bc4194f
Showing
18 changed files
with
383 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,15 @@ jobs: | |
with: | ||
command: test | ||
args: --verbose --all | ||
|
||
- name: Run tests with fake activation heights | ||
uses: actions-rs/[email protected] | ||
env: | ||
TEST_FAKE_ACTIVATION_HEIGHTS: | ||
with: | ||
command: test | ||
args: --verbose --all -- with_fake_activation_heights | ||
|
||
# Explicitly run any tests that are usually #[ignored] | ||
|
||
- name: Run zebrad large sync tests | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use std::env; | ||
|
||
fn main() { | ||
let use_fake_heights = env::var_os("TEST_FAKE_ACTIVATION_HEIGHTS").is_some(); | ||
println!("cargo:rerun-if-env-changed=TEST_FAKE_ACTIVATION_HEIGHTS"); | ||
if use_fake_heights { | ||
println!("cargo:rustc-cfg=test_fake_activation_heights"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.