Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dvc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/config.local
/tmp
/cache
Empty file added .dvc/config
Empty file.
3 changes: 3 additions & 0 deletions .dvcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add patterns of files dvc should ignore, which could improve
# the performance. Learn more at
# https://dvc.org/doc/user-guide/dvcignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ test-scripts/src/config/wasms/*.wasm
.DS_Store

test-scripts/yarn.lock
/substrate-fixtures
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

4 changes: 2 additions & 2 deletions contracts/anchor/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ pub fn setup_environment(curve: Curve) -> (Vec<u8>, Vec<u8>) {
match curve {
Curve::Bn254 => {
let pk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/fixed-anchor/bn254/x5/2/proving_key_uncompressed.bin"
"../../../substrate-fixtures/fixed-anchor/bn254/x5/2/proving_key_uncompressed.bin"
);
let vk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/fixed-anchor/bn254/x5/2/verifying_key.bin"
"../../../substrate-fixtures/fixed-anchor/bn254/x5/2/verifying_key.bin"
);

(pk_bytes.to_vec(), vk_bytes.to_vec())
Expand Down
4 changes: 2 additions & 2 deletions contracts/mixer/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ pub fn setup_environment(curve: Curve) -> (Vec<u8>, Vec<u8>) {
match curve {
Curve::Bn254 => {
let pk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/mixer/bn254/x5/proving_key_uncompressed.bin"
"../../../substrate-fixtures/mixer/bn254/x5/proving_key_uncompressed.bin"
);
let vk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/mixer/bn254/x5/verifying_key.bin"
"../../../substrate-fixtures/mixer/bn254/x5/verifying_key.bin"
);

(pk_bytes.to_vec(), vk_bytes.to_vec())
Expand Down
8 changes: 4 additions & 4 deletions contracts/vanchor/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ pub fn setup_environment_2_2_2(curve: Curve) -> (Vec<u8>, Vec<u8>) {
match curve {
Curve::Bn254 => {
let pk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-2-2/proving_key_uncompressed.bin"
"../../../substrate-fixtures/vanchor/bn254/x5/2-2-2/proving_key_uncompressed.bin"
)
.to_vec();
let vk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-2-2/verifying_key.bin"
"../../../substrate-fixtures/vanchor/bn254/x5/2-2-2/verifying_key.bin"
)
.to_vec();

Expand All @@ -66,11 +66,11 @@ pub fn setup_environment_2_16_2(curve: Curve) -> (Vec<u8>, Vec<u8>) {
match curve {
Curve::Bn254 => {
let pk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-16-2/proving_key_uncompressed.bin"
"../../../substrate-fixtures/vanchor/bn254/x5/2-16-2/proving_key_uncompressed.bin"
)
.to_vec();
let vk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-16-2/verifying_key.bin"
"../../../substrate-fixtures/vanchor/bn254/x5/2-16-2/verifying_key.bin"
)
.to_vec();

Expand Down
6 changes: 3 additions & 3 deletions packages/protocol_cosmwasm/src/anchor_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub mod anchor_verifier {
impl AnchorVerifier {
pub fn new(max_edges: u32) -> StdResult<Self> {
let vk_bytes: &[u8] = match max_edges {
2 => include_bytes!("../../../protocol-substrate-fixtures/fixed-anchor/bn254/x5/2/verifying_key.bin"),
16 => include_bytes!("../../../protocol-substrate-fixtures/fixed-anchor/bn254/x5/16/verifying_key.bin"),
32 => include_bytes!("../../../protocol-substrate-fixtures/fixed-anchor/bn254/x5/32/verifying_key.bin"),
2 => include_bytes!("../../../substrate-fixtures/fixed-anchor/bn254/x5/2/verifying_key.bin"),
16 => include_bytes!("../../../substrate-fixtures/fixed-anchor/bn254/x5/16/verifying_key.bin"),
32 => include_bytes!("../../../substrate-fixtures/fixed-anchor/bn254/x5/32/verifying_key.bin"),
_ => return Err( StdError::GenericErr { msg: "Invalid max_edges".to_string() } ),
};
Ok(Self {
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol_cosmwasm/src/mixer_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub mod mixer_verifier {
/// Constructor that initializes the `bool` value to the given `init_value`.
pub fn new() -> Self {
let vk_bytes = include_bytes!(
"../../../protocol-substrate-fixtures/mixer/bn254/x5/verifying_key.bin"
"../../../substrate-fixtures/mixer/bn254/x5/verifying_key.bin"
);
Self {
vk_bytes: vk_bytes.to_vec(),
Expand Down
8 changes: 4 additions & 4 deletions packages/protocol_cosmwasm/src/vanchor_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ pub mod vanchor_verifier {
impl VAnchorVerifier {
pub fn new(max_edges: u32, ins: u32, outs: u32) -> StdResult<Self> {
let vk_bytes: &[u8] = match (max_edges, ins, outs) {
(2, 2, 2) => include_bytes!("../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-2-2/verifying_key.bin"),
(2, 16, 2) => include_bytes!("../../../protocol-substrate-fixtures/vanchor/bn254/x5/2-16-2/verifying_key.bin"),
(32, 2, 2) => include_bytes!("../../../protocol-substrate-fixtures/vanchor/bn254/x5/32-2-2/verifying_key.bin"),
(32, 16, 2) => include_bytes!("../../../protocol-substrate-fixtures/vanchor/bn254/x5/32-16-2/verifying_key.bin"),
(2, 2, 2) => include_bytes!("../../../substrate-fixtures/vanchor/bn254/x5/2-2-2/verifying_key.bin"),
(2, 16, 2) => include_bytes!("../../../substrate-fixtures/vanchor/bn254/x5/2-16-2/verifying_key.bin"),
(32, 2, 2) => include_bytes!("../../../substrate-fixtures/vanchor/bn254/x5/32-2-2/verifying_key.bin"),
(32, 16, 2) => include_bytes!("../../../substrate-fixtures/vanchor/bn254/x5/32-16-2/verifying_key.bin"),
_ => return Err(StdError::GenericErr { msg: format!("Invalid ({}, {}, {}) group", max_edges, ins, outs) }),
};
Ok(Self {
Expand Down
1 change: 0 additions & 1 deletion protocol-substrate-fixtures
Submodule protocol-substrate-fixtures deleted from e33553
12 changes: 12 additions & 0 deletions substrate-fixtures.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
md5: 556aaf5231aabec2aca01802ccba23d6
frozen: true
deps:
- path: substrate-fixtures
repo:
url: https://github.com/webb-tools/substrate-fixtures
rev_lock: 2ee2d9448af09772aedefd22972d4230f7fdc14f
outs:
- md5: 9c00cd97c42bef50fcfdb4b8878be0fb.dir
size: 240092288
nfiles: 35
path: substrate-fixtures