-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1598 from zancas/publish_testvectors_as_crate
define a public testvectors crate.
- Loading branch information
Showing
24 changed files
with
1,244 additions
and
1,256 deletions.
There are no files selected for viewing
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
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
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,8 @@ | ||
[package] | ||
name = "testvectors" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
zcash_primitives.workspace = true | ||
bip0039 = { workspace = true } |
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,58 @@ | ||
//! A public crate that provides access to testvectors | ||
/// The number of blocks most tests start with. | ||
pub const BASE_HEIGHT: u32 = 3; | ||
|
||
/// TODO: Add Mod Description Here! | ||
pub mod seeds { | ||
|
||
/// TODO: Add Doc Comment Here! | ||
pub const DARKSIDE_SEED: &str = | ||
"still champion voice habit trend flight survey between bitter process artefact blind carbon truly provide dizzy crush flush breeze blouse charge solid fish spread"; | ||
#[test] | ||
fn validate_seeds() { | ||
let abandon_art_seed = bip0039::Mnemonic::<bip0039::English>::from_entropy([0; 32]) | ||
.unwrap() | ||
.to_string(); | ||
assert_eq!(ABANDON_ART_SEED, abandon_art_seed); | ||
// TODO user get_zaddr_from_bip39seed to generate this address from that seed. | ||
} | ||
|
||
/// Generate test seed | ||
/// TODO: Add Doc Comment Here! | ||
pub const ABANDON_ART_SEED: &str = | ||
"abandon abandon abandon abandon abandon abandon abandon abandon \ | ||
abandon abandon abandon abandon abandon abandon abandon abandon \ | ||
abandon abandon abandon abandon abandon abandon abandon art"; | ||
/// TODO: Add Doc Comment Here! | ||
pub const HOSPITAL_MUSEUM_SEED: &str = "hospital museum valve antique skate museum \ | ||
unfold vocal weird milk scale social vessel identify \ | ||
crowd hospital control album rib bulb path oven civil tank"; | ||
/// TODO: Add Doc Comment Here! | ||
pub const CHIMNEY_BETTER_SEED: &str = "chimney better bulb horror rebuild whisper improve intact letter giraffe brave rib appear bulk aim burst snap salt hill sad merge tennis phrase raise"; | ||
} | ||
|
||
/// faucet addresses | ||
/// TODO: Add Doc Comment Here! | ||
pub const REG_O_ADDR_FROM_ABANDONART: &str = "uregtest1zkuzfv5m3yhv2j4fmvq5rjurkxenxyq8r7h4daun2zkznrjaa8ra8asgdm8wwgwjvlwwrxx7347r8w0ee6dqyw4rufw4wg9djwcr6frzkezmdw6dud3wsm99eany5r8wgsctlxquu009nzd6hsme2tcsk0v3sgjvxa70er7h27z5epr67p5q767s2z5gt88paru56mxpm6pwz0cu35m"; | ||
/// TODO: Add Doc Comment Here! | ||
pub const REG_Z_ADDR_FROM_ABANDONART: &str = | ||
"zregtestsapling1fmq2ufux3gm0v8qf7x585wj56le4wjfsqsj27zprjghntrerntggg507hxh2ydcdkn7sx8kya7p"; | ||
/// TODO: Add Doc Comment Here! | ||
pub const REG_T_ADDR_FROM_ABANDONART: &str = "tmBsTi2xWTjUdEXnuTceL7fecEQKeWaPDJd"; | ||
|
||
/// Regtest block rewards | ||
pub mod block_rewards { | ||
/// TODO: Add Doc Comment Here! | ||
pub const SAPLING: u64 = 500_000_000; | ||
/// TODO: Add Doc Comment Here! | ||
pub const BLOSSOM: u64 = 500_000_000; | ||
/// TODO: Add Doc Comment Here! | ||
pub const CANOPY: u64 = 625_000_000; | ||
} | ||
|
||
/// Burn-to regtest address generated by `zcash-cli getnewaddress` | ||
pub const EXT_TADDR: &str = "tmJTBtMwPU96XteSiP89xDz1WARNgRddEHq"; | ||
|
||
/// A test txid | ||
pub const TEST_TXID: &str = "d5eaac5563f8bc1a0406588e05953977ad768d02f1cf8449e9d7d9cc8de3801c"; |
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
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.