Skip to content

Commit 6d9af80

Browse files
committed
wip
Signed-off-by: Eval EXEC <[email protected]>
1 parent 9ce2bb0 commit 6d9af80

File tree

6 files changed

+32
-13
lines changed

6 files changed

+32
-13
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ ckb-spawn = { path = "util/spawn", version = "=0.202.0-pre" }
182182
ckb-stop-handler = { path = "util/stop-handler", version = "=0.202.0-pre" }
183183
ckb-store = { path = "store", version = "=0.202.0-pre" }
184184
ckb-sync = { path = "sync", version = "=0.202.0-pre" }
185-
ckb-system-scripts = "=0.5.4"
185+
ckb-system-scripts-v0_5_4 = { package="ckb-system-scripts", version="=0.5.4" }
186+
ckb-system-scripts-v0_6_0 = { package="ckb-system-scripts", git="https://github.com/nervosnetwork/ckb-system-scripts", branch="master" }
186187
ckb-systemtime = { path = "util/systemtime", version = "=0.202.0-pre" }
187188
ckb-test-chain-utils = { path = "util/test-chain-utils", version = "=0.202.0-pre" }
188189
ckb-traits = { path = "traits", version = "=0.202.0-pre" }

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ckb-hash.workspace = true
2323
ckb-test-chain-utils.workspace = true
2424
ckb-dao-utils.workspace = true
2525
ckb-dao.workspace = true
26-
ckb-system-scripts.workspace = true
26+
ckb-system-scripts-v0_5_4.workspace = true
2727
ckb-crypto.workspace = true
2828
ckb-jsonrpc-types.workspace = true
2929
ckb-verification.workspace = true

benches/benches/benchmarks/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use ckb_dao::DaoCalculator;
55
use ckb_dao_utils::genesis_dao_data;
66
use ckb_shared::{Shared, SharedBuilder, Snapshot};
77
use ckb_store::ChainStore;
8-
use ckb_system_scripts::BUNDLED_CELL;
8+
use ckb_system_scripts_v0_5_4::BUNDLED_CELL;
99
use ckb_test_chain_utils::always_success_cell;
1010
use ckb_types::{
1111
H160, H256, U256,

resource/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ phf = "0.8.0" # ckb-resource's build script need this, and cargo shear think ckb
1414
includedir.workspace = true
1515
serde = { workspace = true, features = ["derive"] }
1616
ckb-types.workspace = true
17-
ckb-system-scripts.workspace = true
17+
ckb-system-scripts-v0_5_4.workspace = true
1818

1919
[build-dependencies]
2020
includedir_codegen.workspace = true
2121
walkdir.workspace = true
2222
ckb-types.workspace = true
23-
ckb-system-scripts.workspace = true
23+
ckb-system-scripts-v0_5_4.workspace = true
24+
ckb-system-scripts-v0_6_0.workspace = true
2425

2526
[dev-dependencies]
2627
tempfile.workspace = true

resource/build.rs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ use std::io::{BufWriter, Write};
77
use std::path::Path;
88
use walkdir::WalkDir;
99

10-
use ckb_system_scripts::{
11-
CODE_HASH_DAO, CODE_HASH_SECP256K1_BLAKE160_MULTISIG_ALL,
12-
CODE_HASH_SECP256K1_BLAKE160_SIGHASH_ALL, CODE_HASH_SECP256K1_DATA,
10+
use ckb_system_scripts_v_0_5_4::{
11+
CODE_HASH_DAO, CODE_HASH_SECP256K1_BLAKE160_SIGHASH_ALL, CODE_HASH_SECP256K1_DATA,
1312
};
1413

14+
use ckb_system_scripts_v_0_6_4::CODE_HASH_SECP256K1_BLAKE160_MULTISIG_ALL as CODE_HASH_SECP256K1_BLAKE160_MULTISIG_LEGACY_ALL;
15+
use ckb_system_scripts_v_0_6_4::CODE_HASH_SECP256K1_BLAKE160_MULTISIG_ALL as CODE_HASH_SECP256K1_BLAKE160_MULTISIG_V1_ALL;
16+
1517
fn main() {
1618
let mut bundled = includedir_codegen::start("BUNDLED");
1719

@@ -58,9 +60,17 @@ fn main() {
5860

5961
writeln!(
6062
&mut out_file,
61-
"/// Data hash of the cell containing secp256k1 blake160 multisig all lock script.\n\
62-
pub const CODE_HASH_SECP256K1_BLAKE160_MULTISIG_ALL: H256 = {:?};",
63-
H256(CODE_HASH_SECP256K1_BLAKE160_MULTISIG_ALL)
63+
"/// Data hash of the cell containing secp256k1 blake160 multisig(legacy) all lock script.\n\
64+
pub const CODE_HASH_SECP256K1_BLAKE160_MULTISIG_LEGACY_ALL: H256 = {:?};",
65+
H256(CODE_HASH_SECP256K1_BLAKE160_MULTISIG_LEGACY_ALL)
66+
)
67+
.expect("write to code_hashes.rs");
68+
69+
writeln!(
70+
&mut out_file,
71+
"/// Data hash of the cell containing secp256k1 blake160 multisig(v1) all lock script.\n\
72+
pub const CODE_HASH_SECP256K1_BLAKE160_MULTISIG_V1_ALL: H256 = {:?};",
73+
H256(CODE_HASH_SECP256K1_BLAKE160_MULTISIG_V1_ALL)
6474
)
6575
.expect("write to code_hashes.rs");
6676

resource/specs/dev.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ file = { bundled = "specs/cells/secp256k1_data" }
3333
create_type_id = false
3434
capacity = 1_048_617_0000_0000
3535
[[genesis.system_cells]]
36-
file = { bundled = "specs/cells/secp256k1_blake160_multisig_all" }
36+
file = { bundled = "specs/cells/secp256k1_blake160_multisig_legacy_all" }
37+
create_type_id = true
38+
capacity = 100_000_0000_0000
39+
40+
# TODO: @eval-exec , bundle multisig v1 to resources
41+
[[genesis.system_cells]]
42+
file = { bundled = "specs/cells/secp256k1_blake160_multisig_v1_all" }
3743
create_type_id = true
3844
capacity = 100_000_0000_0000
3945

@@ -53,7 +59,8 @@ files = [
5359
name = "secp256k1_blake160_multisig_all"
5460
files = [
5561
{ bundled = "specs/cells/secp256k1_data" },
56-
{ bundled = "specs/cells/secp256k1_blake160_multisig_all" },
62+
{ bundled = "specs/cells/secp256k1_blake160_multisig_legacy_all" },
63+
{ bundled = "specs/cells/secp256k1_blake160_multisig_v1_all" },
5764
]
5865

5966
# For first 11 block

0 commit comments

Comments
 (0)