Skip to content

Commit 706c704

Browse files
authored
Merge pull request #11 from joii2020/rename1
Rename testcase project to sphincsplus_rust_test
2 parents 7412db6 + 76a576e commit 706c704

File tree

18 files changed

+107
-55
lines changed

18 files changed

+107
-55
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ jobs:
1515
run: ./tests/sphincsplus/all_run.sh
1616
- name: Run sphincs+ rust tests
1717
run: ./tests/sphincsplus_rust/run_rust.sh
18+
- name: Run Tools tests
19+
run: cd tools/ckb-sphincs-tools && cargo test

tests/sphincsplus_rust/Cargo.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/sphincsplus_rust/Cargo.toml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
[package]
22
edition = "2021"
3-
name = "sphincsplus_rust"
3+
name = "sphincsplus_rust_test"
44
version = "0.1.0"
55

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

88
[features]
99
default = ["shake", "hash_128", "hash_options_f", "thashes_simple"]
10-
haraka = []
11-
sha2 = []
12-
shake = []
10+
haraka = ["ckb_sphincs_utils/haraka"]
11+
sha2 = ["ckb_sphincs_utils/sha2"]
12+
shake = ["ckb_sphincs_utils/shake"]
1313

14-
hash_128 = []
15-
hash_192 = []
16-
hash_256 = []
14+
hash_128 = ["ckb_sphincs_utils/hash_128"]
15+
hash_192 = ["ckb_sphincs_utils/hash_192"]
16+
hash_256 = ["ckb_sphincs_utils/hash_256"]
1717

18-
hash_options_f = []
19-
hash_options_s = []
18+
hash_options_f = ["ckb_sphincs_utils/hash_options_f"]
19+
hash_options_s = ["ckb_sphincs_utils/hash_options_s"]
20+
21+
thashes_robust = ["ckb_sphincs_utils/thashes_robust"]
22+
thashes_simple = ["ckb_sphincs_utils/thashes_simple"]
2023

21-
thashes_robust = []
22-
thashes_simple = []
2324

2425
[dependencies]
26+
ckb_sphincs_utils = { path = "../../tools/ckb-sphincs-utils", default-features = false }
2527
ckb-chain-spec = "0.107.0"
2628
ckb-hash = "0.107.0"
2729
ckb-script = "0.107.0"
@@ -31,6 +33,3 @@ lazy_static = "1.4.0"
3133
libc = "0.2.139"
3234
num_enum = "0.5.10"
3335
rand = "0.8.5"
34-
35-
[build-dependencies]
36-
cc = "1.0.79"

tests/sphincsplus_rust/examples/run_base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ckb_script::TransactionScriptsVerifier;
22
use ckb_types::packed::Byte32;
3-
use sphincsplus_rust::dummy_data_loader::DummyDataLoader;
4-
use sphincsplus_rust::utils::*;
3+
use sphincsplus_rust_test::dummy_data_loader::DummyDataLoader;
4+
use sphincsplus_rust_test::utils::*;
55

66
pub fn debug_printer(_script: &Byte32, msg: &str) {
77
print!("{}", msg);

tests/sphincsplus_rust/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
pub mod dummy_data_loader;
2-
pub mod sphincsplus;
32
pub mod utils;
4-
5-
pub use sphincsplus::SphincsPlus;

tests/sphincsplus_rust/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::dummy_data_loader::DummyDataLoader;
2-
use super::sphincsplus::*;
2+
use ckb_sphincs_utils::sphincsplus::*;
33
use ckb_hash::blake2b_256;
44
use ckb_types::core::{
55
cell::{CellMetaBuilder, ResolvedTransaction},

tests/sphincsplus_rust/tests/test_sphincsplus.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ckb_script::TransactionScriptsVerifier;
22
use ckb_types::packed::Byte32;
3-
use sphincsplus_rust::dummy_data_loader::DummyDataLoader;
4-
use sphincsplus_rust::utils::*;
3+
use sphincsplus_rust_test::dummy_data_loader::DummyDataLoader;
4+
use sphincsplus_rust_test::utils::*;
55

66
pub fn debug_printer(_script: &Byte32, msg: &str) {
77
print!("{}", msg);

tools/ckb-sphincs-tools/Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/ckb-sphincs-tools/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ version = "0.1.0"
77

88
[features]
99
default = ["shake", "hash_128", "hash_options_f", "thashes_simple"]
10-
haraka = ["sphincsplus_rust/haraka"]
11-
sha2 = ["sphincsplus_rust/sha2"]
12-
shake = ["sphincsplus_rust/shake"]
10+
haraka = ["ckb_sphincs_utils/haraka"]
11+
sha2 = ["ckb_sphincs_utils/sha2"]
12+
shake = ["ckb_sphincs_utils/shake"]
1313

14-
hash_128 = ["sphincsplus_rust/hash_128"]
15-
hash_192 = ["sphincsplus_rust/hash_192"]
16-
hash_256 = ["sphincsplus_rust/hash_256"]
14+
hash_128 = ["ckb_sphincs_utils/hash_128"]
15+
hash_192 = ["ckb_sphincs_utils/hash_192"]
16+
hash_256 = ["ckb_sphincs_utils/hash_256"]
1717

18-
hash_options_f = ["sphincsplus_rust/hash_options_f"]
19-
hash_options_s = ["sphincsplus_rust/hash_options_s"]
18+
hash_options_f = ["ckb_sphincs_utils/hash_options_f"]
19+
hash_options_s = ["ckb_sphincs_utils/hash_options_s"]
2020

21-
thashes_robust = ["sphincsplus_rust/thashes_robust"]
22-
thashes_simple = ["sphincsplus_rust/thashes_simple"]
21+
thashes_robust = ["ckb_sphincs_utils/thashes_robust"]
22+
thashes_simple = ["ckb_sphincs_utils/thashes_simple"]
2323

2424
[dependencies]
2525
ckb-crypto = "0.106.0"
@@ -30,4 +30,4 @@ ckb-types = "0.106.0"
3030
clap = {version = "4.1.7", features = ["derive"]}
3131
lazy_static = "1.4.0"
3232
serde_json = "1.0.93"
33-
sphincsplus_rust = {path = "../../tests/sphincsplus_rust", default-features = false}
33+
ckb_sphincs_utils = {path = "../ckb-sphincs-utils", default-features = false}

tools/ckb-sphincs-tools/src/sub_conversion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use ckb_types::{
1414
H256,
1515
};
1616
use lazy_static::lazy_static;
17-
use sphincsplus_rust::SphincsPlus;
17+
use ckb_sphincs_utils::SphincsPlus;
1818

1919
lazy_static! {
2020
pub static ref SPHINCSPLUS_EXAMPLE_BIN: Bytes =

0 commit comments

Comments
 (0)