Skip to content

Commit

Permalink
chore: change dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ashWhiteHat committed Dec 26, 2023
1 parent 019b895 commit 5f9d318
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 36 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
"grumpkin",
"nova",
"zkstd",
"nova_pallet"
"pallet/nova"
]

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ We provide the composable layer 2 technologies by **Recursive Snarks** on top of
- [x] R1cs
- [x] Groth16
- [x] Nova nifs
- [ ] Nova IVC
- [x] Nova IVC
- [ ] Spartan
- [ ] Hyper Nova
- [ ] Lookup
Expand Down
12 changes: 5 additions & 7 deletions nova_pallet/Cargo.toml → pallet/nova/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
[package]
name = "nova-ivc-pallet"
name = "pallet-nova"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
frame-system = { branch = 'v3.0.0', default-features = false, git = "https://github.com/KogarashiNetwork/zksubstrate" }
frame-support = { branch = 'v3.0.0', default-features = false, git = "https://github.com/KogarashiNetwork/zksubstrate" }
zkstd = { path = "../zkstd", default-features = false }
zknova = { path = "../nova", default-features = false }
bn-254 = { path = "../bn254", default-features = false }
zkstd = { path = "../../zkstd", default-features = false }
zknova = { path = "../../nova", default-features = false }
bn-254 = { path = "../../bn254", default-features = false }
rand_xorshift = { version = '0.2.0', default-features = false, package = 'fullcodec_rand_xorshift' }

[dev-dependencies]
Expand All @@ -30,4 +28,4 @@ std = [
'sp-core/std',
'sp-io/std',
'sp-runtime/std',
]
]
6 changes: 3 additions & 3 deletions nova_pallet/src/lib.rs → pallet/nova/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
//! through RPC client.
//!
//! ### Introduction
//! There four steps to use `nova-pallet`.
//! There four steps to use `pallet-nova`.
//!
//! 1. Import `nova-ivc-pallet` to your substrate runtime and node
//! 2. Use `nova-ivc-pallet` in your pallet
//! 1. Import `pallet-nova` to your substrate runtime and node
//! 2. Use `pallet-nova` in your pallet
//! 3. Open `get_public_parameters` RPC
//!
//! `get_public_parameters` is an RPC method and, `trusted_setup` and `verify` are
Expand Down
File renamed without changes.
13 changes: 7 additions & 6 deletions nova_pallet/src/tests.rs → pallet/nova/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::mock::{new_test_ext, ExampleFunction};
use crate::*;
use crate::{self as nova_ivc};
use crate::{self as pallet_nova};

use frame_support::{construct_runtime, parameter_types};
use sp_core::H256;
Expand All @@ -19,7 +19,7 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Config, Storage, Event<T>},
IvcPallet: nova_ivc::{Module, Call, Storage},
Nova: pallet_nova::{Module, Call, Storage},
}
);

Expand Down Expand Up @@ -92,12 +92,13 @@ mod ivc_pallet_tests {
z0_primary,
z0_secondary,
);
(0..2).for_each(|_| {
ivc.prove_step(&pp);
});
let proof = ivc.prove_step(&pp);

new_test_ext().execute_with(|| {
for _ in 0..3 {
let proof = ivc.prove_step(&pp);
assert!(IvcPallet::verify(Origin::signed(1), proof, pp.clone()).is_ok());
}
assert!(Nova::verify(Origin::signed(1), proof, pp.clone()).is_ok());
});
}
}
File renamed without changes.
File renamed without changes.

0 comments on commit 5f9d318

Please sign in to comment.