Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit 651b202

Browse files
authored
[fix] address SBP fixes - part 2 (#291)
1 parent a16d875 commit 651b202

54 files changed

Lines changed: 718 additions & 686 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14+
env:
15+
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
16+
1417
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1518
jobs:
1619
ci:

.taplo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
exclude = ["target/*"]
2+
[formatting]
3+
array_auto_collapse = false
4+
array_auto_expand = false
5+
reorder_keys = true

Cargo.lock

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

Cargo.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
[profile.release]
2+
lto = "thin"
23
panic = "unwind"
34
strip = "symbols"
4-
lto = "thin"
55

66
[profile.dev]
7-
strip = "symbols"
87
debug = 0
8+
strip = "symbols"
99

1010
[workspace]
1111
members = [
12-
"client",
13-
"primitives",
14-
"pallets/anonymity-mining-rewards",
15-
"pallets/anonymity-mining-claims",
16-
"pallets/asset-registry",
17-
"pallets/hasher",
18-
"pallets/verifier",
19-
"pallets/mt",
20-
"pallets/linkable-tree",
21-
"pallets/mixer",
22-
"pallets/signature-bridge",
23-
"pallets/vanchor",
24-
"pallets/vanchor-handler",
25-
"pallets/vanchor-verifier",
26-
# "pallets/xanchor",
27-
"pallets/token-wrapper",
28-
"pallets/token-wrapper-handler",
29-
"pallets/relayer-registry",
30-
"pallets/key-storage",
31-
"standalone/*",
32-
]
12+
"client",
13+
"primitives",
14+
"pallets/anonymity-mining-rewards",
15+
"pallets/anonymity-mining-claims",
16+
"pallets/asset-registry",
17+
"pallets/hasher",
18+
"pallets/verifier",
19+
"pallets/mt",
20+
"pallets/linkable-tree",
21+
"pallets/mixer",
22+
"pallets/signature-bridge",
23+
"pallets/vanchor",
24+
"pallets/vanchor-handler",
25+
"pallets/vanchor-verifier",
26+
# "pallets/xanchor",
27+
"pallets/token-wrapper",
28+
"pallets/token-wrapper-handler",
29+
"pallets/relayer-registry",
30+
"pallets/key-storage",
31+
"standalone/*",
32+
]

client/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
[package]
2+
edition = "2021"
23
name = "webb-client"
34
version = "0.1.0"
4-
edition = "2021"
55

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

88
[dependencies]
9-
subxt = { version = "0.25.0" }
109
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full", "bit-vec"] }
10+
subxt = { version = "0.25.0" }
1111

1212
[dev-dependencies]
1313
hex = "0.4"
14+
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
1415
serde = { version = "1.0.119" }
1516
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
1617
sp-keyring = { default-features = false, version = "7.0.0" }
17-
tokio = { version = "1.17.0", features = ["full"] }
1818
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
19-
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
19+
tokio = { version = "1.17.0", features = ["full"] }
2020

2121
# arkworks related deps
2222
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = ["curve"] }
2323
ark-bn254 = { version = "^0.3.0", default-features = false, features = ["curve"] }
24-
ark-crypto-primitives = { version = "^0.3.0", features = ["r1cs"], default-features = false}
25-
ark-ec = { version = "^0.3.0", default-features = false}
26-
ark-ff = { version = "^0.3.0", default-features = false}
27-
ark-relations = { version = "^0.3.0", default-features = false}
28-
ark-serialize = { version = "^0.3.0", default-features = false, features = ["derive"]}
29-
ark-std = { version = "^0.3.0", default-features = false}
24+
ark-crypto-primitives = { version = "^0.3.0", features = ["r1cs"], default-features = false }
25+
ark-ec = { version = "^0.3.0", default-features = false }
26+
ark-ff = { version = "^0.3.0", default-features = false }
27+
ark-relations = { version = "^0.3.0", default-features = false }
28+
ark-serialize = { version = "^0.3.0", default-features = false, features = ["derive"] }
29+
ark-std = { version = "^0.3.0", default-features = false }
3030

3131
# Webb deps
32-
webb-primitives = { path = "../primitives", features = ["hashing", "verifying", "field_ops"] }
33-
arkworks-setups = { version = "1.2.1", features = ["r1cs"], default-features = false }
3432
arkworks-native-gadgets = { version = "1.2.0", default-features = false }
33+
arkworks-setups = { version = "1.2.1", features = ["r1cs"], default-features = false }
34+
webb-primitives = { path = "../primitives", features = ["hashing", "verifying", "field_ops"] }

client/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
#![allow(clippy::too_many_arguments)]
12
#[subxt::subxt(runtime_metadata_path = "metadata/protocol_substrate_runtime.scale")]
23
pub mod webb_runtime {}

pallets/anonymity-mining-claims/Cargo.toml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ targets = ["x86_64-unknown-linux-gnu"]
1515
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
1616
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
1717

18-
pallet-vanchor = { path = "../vanchor", default-features = false }
19-
pallet-vanchor-handler = {path = "../../pallets/vanchor-handler", default-features = false }
20-
pallet-signature-bridge = { path = "../../pallets/signature-bridge", default-features = false }
18+
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
2119
pallet-asset-registry = { path = "../asset-registry", default-features = false }
2220
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
23-
pallet-mt = { path = "../mt", default-features = false }
2421
pallet-linkable-tree = { path = "../linkable-tree", default-features = false }
22+
pallet-mt = { path = "../mt", default-features = false }
23+
pallet-signature-bridge = { path = "../../pallets/signature-bridge", default-features = false }
2524
pallet-token-wrapper = { path = "../token-wrapper", default-features = false }
26-
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
25+
pallet-vanchor = { path = "../vanchor", default-features = false }
26+
pallet-vanchor-handler = { path = "../../pallets/vanchor-handler", default-features = false }
2727

2828
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2929
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
@@ -32,51 +32,51 @@ sp-std = { default-features = false, git = "https://github.com/paritytech/substr
3232
webb-primitives = { path = "../../primitives", default-features = false }
3333

3434
[dev-dependencies]
35-
hex = "0.4"
36-
serde = { version = "1.0.119" }
37-
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
38-
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
39-
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
35+
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = ["curve"] }
36+
ark-bn254 = { version = "^0.3.0", default-features = false, features = ["curve"] }
4037
ark-crypto-primitives = { version = "^0.3.0", features = ["r1cs"], default-features = false }
41-
ark-ff = { version = "^0.3.0", default-features = false }
4238
ark-ec = { version = "^0.3.0", default-features = false }
43-
ark-std = { version = "^0.3.0", default-features = false }
39+
ark-ff = { version = "^0.3.0", default-features = false }
4440
ark-relations = { version = "^0.3.0", default-features = false }
45-
ark-serialize = { version = "^0.3.0", default-features = false, features = [ "derive" ] }
46-
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
47-
ark-bn254 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
41+
ark-serialize = { version = "^0.3.0", default-features = false, features = ["derive"] }
42+
ark-std = { version = "^0.3.0", default-features = false }
4843
arkworks-setups = { version = "1.2.1", features = ["r1cs"], default-features = false }
44+
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
45+
hex = "0.4"
4946
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
5047
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
5148
pallet-hasher = { path = "../hasher", default-features = false }
52-
pallet-key-storage = {path = "../key-storage"}
49+
pallet-key-storage = { path = "../key-storage" }
5350
pallet-timestamp = { default-features = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
5451
pallet-vanchor-verifier = { path = "../vanchor-verifier", default-features = false }
55-
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
52+
serde = { version = "1.0.119" }
53+
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
54+
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
55+
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
5656

5757
[features]
5858
default = ["std"]
59+
runtime-benchmarks = [
60+
"frame-system/runtime-benchmarks",
61+
"frame-support/runtime-benchmarks",
62+
]
5963
std = [
60-
"codec/std",
61-
"frame-support/std",
62-
"frame-system/std",
63-
"sp-runtime/std",
64-
"sp-std/std",
65-
"webb-primitives/std",
66-
"webb-primitives/hashing",
67-
"frame-benchmarking/std",
68-
"orml-currencies/std",
69-
"orml-tokens/std",
70-
"orml-traits/std",
71-
"pallet-asset-registry/std",
72-
"pallet-balances/std",
73-
"pallet-vanchor/std",
74-
"pallet-mt/std",
75-
"pallet-vanchor-verifier/std",
76-
"pallet-token-wrapper/std"
64+
"codec/std",
65+
"frame-support/std",
66+
"frame-system/std",
67+
"sp-runtime/std",
68+
"sp-std/std",
69+
"webb-primitives/std",
70+
"webb-primitives/hashing",
71+
"frame-benchmarking/std",
72+
"orml-currencies/std",
73+
"orml-tokens/std",
74+
"orml-traits/std",
75+
"pallet-asset-registry/std",
76+
"pallet-balances/std",
77+
"pallet-vanchor/std",
78+
"pallet-mt/std",
79+
"pallet-vanchor-verifier/std",
80+
"pallet-token-wrapper/std",
7781

7882
]
79-
runtime-benchmarks = [
80-
"frame-system/runtime-benchmarks",
81-
"frame-support/runtime-benchmarks",
82-
]

pallets/anonymity-mining-rewards/Cargo.toml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ targets = ["x86_64-unknown-linux-gnu"]
1515
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
1616
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
1717

18-
pallet-vanchor = { path = "../vanchor", default-features = false }
19-
pallet-vanchor-handler = {path = "../../pallets/vanchor-handler", default-features = false }
20-
pallet-signature-bridge = { path = "../../pallets/signature-bridge", default-features = false }
18+
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
2119
pallet-asset-registry = { path = "../asset-registry", default-features = false }
2220
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
23-
pallet-mt = { path = "../mt", default-features = false }
2421
pallet-linkable-tree = { path = "../linkable-tree", default-features = false }
22+
pallet-mt = { path = "../mt", default-features = false }
23+
pallet-signature-bridge = { path = "../../pallets/signature-bridge", default-features = false }
2524
pallet-token-wrapper = { path = "../token-wrapper", default-features = false }
26-
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
25+
pallet-vanchor = { path = "../vanchor", default-features = false }
26+
pallet-vanchor-handler = { path = "../../pallets/vanchor-handler", default-features = false }
2727

2828
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2929
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
@@ -32,51 +32,51 @@ sp-std = { default-features = false, git = "https://github.com/paritytech/substr
3232
webb-primitives = { path = "../../primitives", default-features = false }
3333

3434
[dev-dependencies]
35-
hex = "0.4"
36-
serde = { version = "1.0.119" }
37-
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
38-
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
39-
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
35+
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = ["curve"] }
36+
ark-bn254 = { version = "^0.3.0", default-features = false, features = ["curve"] }
4037
ark-crypto-primitives = { version = "^0.3.0", features = ["r1cs"], default-features = false }
41-
ark-ff = { version = "^0.3.0", default-features = false }
4238
ark-ec = { version = "^0.3.0", default-features = false }
43-
ark-std = { version = "^0.3.0", default-features = false }
39+
ark-ff = { version = "^0.3.0", default-features = false }
4440
ark-relations = { version = "^0.3.0", default-features = false }
45-
ark-serialize = { version = "^0.3.0", default-features = false, features = [ "derive" ] }
46-
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
47-
ark-bn254 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
41+
ark-serialize = { version = "^0.3.0", default-features = false, features = ["derive"] }
42+
ark-std = { version = "^0.3.0", default-features = false }
4843
arkworks-setups = { version = "1.2.1", features = ["r1cs"], default-features = false }
44+
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
45+
hex = "0.4"
4946
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
5047
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", branch = "polkadot-v0.9.36", default-features = false }
5148
pallet-hasher = { path = "../hasher", default-features = false }
52-
pallet-key-storage = {path = "../key-storage"}
49+
pallet-key-storage = { path = "../key-storage" }
5350
pallet-timestamp = { default-features = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
5451
pallet-vanchor-verifier = { path = "../vanchor-verifier", default-features = false }
55-
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
52+
serde = { version = "1.0.119" }
53+
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
54+
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
55+
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
5656

5757
[features]
5858
default = ["std"]
59+
runtime-benchmarks = [
60+
"frame-system/runtime-benchmarks",
61+
"frame-support/runtime-benchmarks",
62+
]
5963
std = [
60-
"codec/std",
61-
"frame-support/std",
62-
"frame-system/std",
63-
"sp-runtime/std",
64-
"sp-std/std",
65-
"webb-primitives/std",
66-
"webb-primitives/hashing",
67-
"frame-benchmarking/std",
68-
"orml-currencies/std",
69-
"orml-tokens/std",
70-
"orml-traits/std",
71-
"pallet-asset-registry/std",
72-
"pallet-balances/std",
73-
"pallet-vanchor/std",
74-
"pallet-mt/std",
75-
"pallet-vanchor-verifier/std",
76-
"pallet-token-wrapper/std"
64+
"codec/std",
65+
"frame-support/std",
66+
"frame-system/std",
67+
"sp-runtime/std",
68+
"sp-std/std",
69+
"webb-primitives/std",
70+
"webb-primitives/hashing",
71+
"frame-benchmarking/std",
72+
"orml-currencies/std",
73+
"orml-tokens/std",
74+
"orml-traits/std",
75+
"pallet-asset-registry/std",
76+
"pallet-balances/std",
77+
"pallet-vanchor/std",
78+
"pallet-mt/std",
79+
"pallet-vanchor-verifier/std",
80+
"pallet-token-wrapper/std",
7781

7882
]
79-
runtime-benchmarks = [
80-
"frame-system/runtime-benchmarks",
81-
"frame-support/runtime-benchmarks",
82-
]

pallets/asset-registry/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[package]
2-
name = "pallet-asset-registry"
3-
version = "0.1.0"
4-
description = "Pallet for asset registry management"
52
authors = ["GalacticCouncil"]
3+
description = "Pallet for asset registry management"
64
edition = "2018"
75
homepage = "https://github.com/galacticcouncil/basilisk-node"
86
license = "Apache 2.0"
7+
name = "pallet-asset-registry"
98
repository = "https://github.com/galacticcouncil/basilisk-node"
9+
version = "0.1.0"
1010

1111
[package.metadata.docs.rs]
1212
targets = ["x86_64-unknown-linux-gnu"]
1313

1414
[dependencies]
15-
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
1615
codec = { default-features = false, features = ["derive", "max-encoded-len"], package = "parity-scale-codec", version = "3" }
1716
primitive-types = { default-features = false, version = "0.8.0" }
17+
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
1818
serde = { features = ["derive"], optional = true, version = "1.0.101" }
1919

2020
# ORML dependencies
@@ -23,8 +23,8 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li
2323
# Substrate dependencies
2424
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2525
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
26-
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2726
sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
27+
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2828
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
2929
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" }
3030

@@ -40,6 +40,7 @@ webb-primitives = { path = "../../primitives", default-features = false }
4040
[features]
4141
default = ["std"]
4242
runtime-benchmarks = [
43+
"frame-benchmarking",
4344
"frame-system/runtime-benchmarks",
4445
"frame-support/runtime-benchmarks",
4546
]
@@ -55,4 +56,4 @@ std = [
5556
"sp-std/std",
5657
"sp-api/std",
5758
"sp-arithmetic/std",
58-
]
59+
]

0 commit comments

Comments
 (0)