Skip to content

Commit

Permalink
Remove bridge staking (#23)
Browse files Browse the repository at this point in the history
* Add node rpc code.

* Remove staking.

* Remove bridge.

* Remove broken session benchmark.

* Babe PoA (#24)

* Only use babe's secondary selector.

* Use babe secondary VRF.

* Add PoA ValidatorSet support.

* Use public url for Confidential asset repo.

* Enable primary selection in BABE again.

* Fixup comment.
  • Loading branch information
Neopallium authored May 23, 2024
1 parent 361f3ee commit ff291d6
Show file tree
Hide file tree
Showing 27 changed files with 454 additions and 1,697 deletions.
227 changes: 45 additions & 182 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pallet-preimage = { git = "https://github.com/PolymeshAssociation/polkadot-sdk",
pallet-insecure-randomness-collective-flip = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
pallet-scheduler = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
pallet-session = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
pallet-staking-reward-curve = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
pallet-timestamp = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sc-authority-discovery = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sc-basic-authorship = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
Expand Down Expand Up @@ -84,7 +83,6 @@ sp-runtime = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", bran
sp-weights = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-runtime-interface = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-session = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-staking = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-state-machine = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-std = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
sp-storage = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }
Expand All @@ -101,10 +99,12 @@ substrate-build-script-utils = { git = "https://github.com/PolymeshAssociation/p
substrate-wasm-builder = { git = "https://github.com/PolymeshAssociation/polkadot-sdk", branch = "polymesh-v6-monthly-2023-03" }

bulletproofs = { version = "4.0.0", git = "https://github.com/PolymeshAssociation/bulletproofs", branch = "polymesh" }
confidential_assets = { git = "ssh://git@github.com/PolymeshAssociation/confidential_assets.git", branch = "main" }
confidential_assets = { git = "https://github.com/PolymeshAssociation/confidential_assets", branch = "main" }
#confidential_assets = { path = "../confidential_assets" }
curve25519-dalek-ng = { git = "https://github.com/atouchet/curve25519-dalek-ng.git", branch = "simd" }

substrate-validator-set = { git = "https://github.com/PolymeshAssociation/substrate-validator-set", branch = "polymesh-v6-monthly-2023-03" }

[workspace]
members = [
"pallets/confidential-asset",
Expand All @@ -124,7 +124,6 @@ exclude = [
pallet-asset = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-balances = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-base = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-bridge = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-committee = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-compliance-manager = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-confidential-asset = { path = "pallets/confidential-asset/", default-features = false }
Expand All @@ -142,7 +141,6 @@ pallet-protocol-fee = { git = "https://github.com/PolymeshAssociation/Polymesh.g
pallet-relayer = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-sto = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-settlement = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-staking = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-statistics = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-test-utils = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-transaction-payment = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
Expand All @@ -165,8 +163,6 @@ pallet-group-rpc = { git = "https://github.com/PolymeshAssociation/Polymesh.git"
pallet-group-rpc-runtime-api = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-protocol-fee-rpc = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-protocol-fee-rpc-runtime-api = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
pallet-staking-rpc-runtime-api = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
polymesh-node-rpc = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }

# Build tool
polymesh-build-tool = { git = "https://github.com/PolymeshAssociation/Polymesh.git", tag = "v6.3.0", default-features = false }
Expand All @@ -190,7 +186,6 @@ pallet-preimage = { version = "4.0.0-dev", default-features = false }
pallet-insecure-randomness-collective-flip = { version = "4.0.0-dev", default-features = false }
pallet-scheduler = { version = "4.0.0-dev", default-features = false }
pallet-session = { version = "4.0.0-dev", default-features = false }
pallet-staking-reward-curve = { version = "4.0.0-dev", default-features = false }
pallet-timestamp = { version = "4.0.0-dev", default-features = false }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
sp-api = { version = "4.0.0-dev", default-features = false }
Expand All @@ -212,7 +207,6 @@ sp-runtime = { version = "7.0.0", default-features = false }
sp-runtime-interface = { version = "7.0.0", default-features = false }
sp-timestamp = { version = "4.0.0-dev", default-features = false }
sp-session = { version = "4.0.0-dev", default-features = false }
sp-staking = { version = "4.0.0-dev", default-features = false }
sp-std = { version = "5.0.0", default-features = false }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false }
sp-version = { version = "5.0.0", default-features = false }
Expand All @@ -223,12 +217,14 @@ rand_core = { version = "0.6", default-features = false }
rand_chacha = { version = "0.3", default-features = false }
confidential_assets = { version = "1.0.0", default-features = false }

# Validator set (PoA)
validator-set = { version = "0.9.42", package = "substrate-validator-set", default-features = false }

[dependencies]
# Our pallets
pallet-asset = { workspace = true, default-features = false }
pallet-balances = { workspace = true, default-features = false }
pallet-base = { workspace = true, default-features = false }
pallet-bridge = { workspace = true, default-features = false }
pallet-committee = { workspace = true, default-features = false }
pallet-compliance-manager = { workspace = true, default-features = false }
pallet-confidential-asset = { workspace = true, default-features = false }
Expand All @@ -246,8 +242,6 @@ pallet-protocol-fee = { workspace = true, default-features = false }
pallet-relayer = { workspace = true, default-features = false }
pallet-sto = { workspace = true, default-features = false }
pallet-settlement = { workspace = true, default-features = false }
pallet-staking = { workspace = true, default-features = false }
pallet-staking-reward-curve = { workspace = true, default-features = false }
pallet-statistics = { workspace = true, default-features = false }
pallet-test-utils = { workspace = true, default-features = false }
pallet-transaction-payment = { workspace = true, default-features = false }
Expand All @@ -263,15 +257,16 @@ polymesh-primitives = { workspace = true, default-features = false }
polymesh-weights = { workspace = true, default-features = false }
polymesh-extensions = { workspace = true, default-features = false }

# PoA
validator-set = { workspace = true, default-features = false }

# RPC
node-rpc = { workspace = true }
node-rpc-runtime-api = { workspace = true }
pallet-group-rpc = { workspace = true }
pallet-group-rpc-runtime-api = { workspace = true }
pallet-protocol-fee-rpc = { workspace = true }
pallet-protocol-fee-rpc-runtime-api = { workspace = true }
pallet-staking-rpc-runtime-api = { workspace = true }
polymesh-node-rpc = { workspace = true }

# Runtimes
polymesh-private-runtime-develop = { path = "runtime/develop" }
Expand All @@ -294,16 +289,24 @@ sc-cli = { version = "0.10.0-dev" }
sc-client-api = "4.0.0-dev"
sc-consensus = "0.10.0-dev"
sc-consensus-babe = "0.10.0-dev"
sc-consensus-babe-rpc = "0.10.0-dev"
sc-consensus-epochs = { version = "0.10.0-dev" }
sc-consensus-slots = "0.10.0-dev"
sc-consensus-grandpa = "0.10.0-dev"
sc-consensus-grandpa-rpc = "0.10.0-dev"
sc-executor = { version = "0.10.0-dev" }
sc-network = "0.10.0-dev"
sc-network-common = { version = "0.10.0-dev" }
sc-rpc = "4.0.0-dev"
sc-rpc-api = "0.10.0-dev"
sc-rpc-spec-v2 = "0.10.0-dev"
sc-service = { version = "0.10.0-dev" }
sc-telemetry = "4.0.0-dev"
sc-transaction-pool = "4.0.0-dev"
sc-sync-state-rpc = { version = "0.10.0-dev" }
grandpa = { package = "sc-consensus-grandpa", version = "0.10.0-dev" }
sc-transaction-pool-api = { version = "4.0.0-dev" }
substrate-frame-rpc-system = { version = "4.0.0-dev" }
substrate-state-trie-migration-rpc = { version = "4.0.0-dev" }

# Substrate
codec = { workspace = true, package = "parity-scale-codec" }
Expand All @@ -323,6 +326,7 @@ sp-consensus = { workspace = true }
sp-consensus-babe = { workspace = true }
sp-consensus-slots = { workspace = true }
sp-keyring = { workspace = true }
sp-keystore = { version = "0.13.0" }
sp-core = { workspace = true }
sp-inherents = { workspace = true }
sp-transaction-storage-proof = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion pallets/confidential-asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ avx2_backend = [
]

no_std = ["confidential_assets/no_std", "polymesh-host-functions/no_std", "u64_backend"]
only-staking = []
std = [
"rand_core/std",
"rand_chacha/std",
Expand Down
2 changes: 0 additions & 2 deletions pallets/weights/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ sp-std = { workspace = true, default-features = false }
# our pallets
pallet-asset = { workspace = true, default-features = false }
pallet-balances = { workspace = true, default-features = false }
pallet-staking = { workspace = true, default-features = false }
pallet-committee = { workspace = true, default-features = false }
pallet-compliance-manager = { workspace = true, default-features = false }
pallet-corporate-actions = { workspace = true, default-features = false }
Expand Down Expand Up @@ -52,7 +51,6 @@ std = [
"frame-system/std",
"pallet-asset/std",
"pallet-babe/std",
"pallet-staking/std",
"pallet-balances/std",
"pallet-compliance-manager/std",
"pallet-corporate-actions/std",
Expand Down
1 change: 0 additions & 1 deletion pallets/weights/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub mod pallet_relayer;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_settlement;
pub mod pallet_staking;
pub mod pallet_statistics;
pub mod pallet_sto;
pub mod pallet_test_utils;
Expand Down
Loading

0 comments on commit ff291d6

Please sign in to comment.