Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cbd075e
add bridge GRANDPA pallets to Kusama and Polkadot
svyatonik Sep 1, 2021
57ca5f5
add bridge messages pallets to Polkadot & Kusama runtimes
svyatonik Sep 6, 2021
e217659
fix compilation
svyatonik Sep 7, 2021
9985195
add missed runtime APIs for messaging
svyatonik Sep 9, 2021
7f0a28d
only accept messages from given user
svyatonik Sep 22, 2021
e42b0b3
only dispatch balances::transfer messages
svyatonik Sep 22, 2021
8111117
reject all inbound messages except coming vial lane 00000000
svyatonik Oct 22, 2021
6240a84
post-merge fix
svyatonik Jan 27, 2022
720aa72
initial council members
svyatonik Jan 28, 2022
5fbf733
allow council to send messages using given account for payment
svyatonik Jan 28, 2022
9eec8d8
add benchmarks to kusama
svyatonik Feb 4, 2022
b082dd7
add benchmarks to polkadot runtime
svyatonik Feb 7, 2022
8edb535
couple of useful (ignored) tests
svyatonik Feb 9, 2022
c109034
forbid message send by regular accounts (tests still need to be fixed)
svyatonik Feb 9, 2022
407ae6b
prepare migrations to initialize bridge
svyatonik Mar 15, 2022
d5c60f8
post-update fix
svyatonik Mar 17, 2022
8fd7701
fixed/updated/removed some tests
svyatonik Mar 21, 2022
5ef944b
real pallet owners account ids
svyatonik Mar 21, 2022
b2ff652
another post-merge fix
svyatonik Mar 21, 2022
deb5e10
revert council members = initial authorities
svyatonik Mar 21, 2022
e7ff166
fix benchmarks
svyatonik Mar 22, 2022
7a3e9f7
cargo fmt
svyatonik Mar 22, 2022
d0bc34e
fix tests vs benchmarks
svyatonik Mar 22, 2022
4850b22
tests vs benchmarks again
svyatonik Mar 22, 2022
5b99e16
fix try-runtime
svyatonik Mar 22, 2022
1da3326
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 22, 2022
54e9464
cargo run --quiet --profile=production --features=runtime-benchmarks…
Mar 22, 2022
420cbf8
cargo run --quiet --profile=production --features=runtime-benchmarks…
Mar 22, 2022
f5b64ed
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Mar 23, 2022
012ea41
cargo run --quiet --profile=production --features=runtime-benchmarks…
Mar 23, 2022
3d51011
cargo run --quiet --profile=production --features=runtime-benchmarks…
Mar 23, 2022
0a583df
use Polkadot/Kusama weights
svyatonik Apr 7, 2022
80650ff
some fixes for Polkadot/Kusama weights
svyatonik Apr 7, 2022
fb42cb2
Merge branch 'master' into sv-bridges-finally
svyatonik Apr 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions bridges/modules/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
// Runtime-generated enums
#![allow(clippy::large_enum_variant)]

use crate::weights::WeightInfo;

use bp_header_chain::{justification::GrandpaJustification, InitializationData};
use bp_runtime::{BlockNumberOf, Chain, HashOf, HasherOf, HeaderOf};
use finality_grandpa::voter_set::VoterSet;
Expand All @@ -58,6 +56,7 @@ pub mod benchmarking;

// Re-export in crate namespace for `construct_runtime!`
pub use pallet::*;
pub use weights::WeightInfo;

/// Block number of the bridged chain.
pub type BridgedBlockNumber<T, I> = BlockNumberOf<<T as Config<I>>::BridgedChain>;
Expand Down
4 changes: 2 additions & 2 deletions bridges/modules/messages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
// Generated by `decl_event!`
#![allow(clippy::unused_unit)]

pub use crate::weights_ext::{
pub use weights::WeightInfo;
pub use weights_ext::{
ensure_able_to_receive_confirmation, ensure_able_to_receive_message,
ensure_weights_are_correct, WeightInfoExt, EXPECTED_DEFAULT_MESSAGE_LENGTH,
};

use crate::{
inbound_lane::{InboundLane, InboundLaneStorage, ReceivalResult},
outbound_lane::{OutboundLane, OutboundLaneStorage, ReceivalConfirmationResult},
weights::WeightInfo,
};

use bp_messages::{
Expand Down
32 changes: 32 additions & 0 deletions node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::Gene
},
paras: Default::default(),
xcm_pallet: Default::default(),
bridge_kusama_grandpa: polkadot_runtime::BridgeKusamaGrandpaConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
bridge_kusama_messages: polkadot_runtime::BridgeKusamaMessagesConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
}
}

Expand Down Expand Up @@ -768,6 +776,14 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
gilt: Default::default(),
paras: Default::default(),
xcm_pallet: Default::default(),
bridge_polkadot_grandpa: kusama_runtime::BridgePolkadotGrandpaConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
bridge_polkadot_messages: kusama_runtime::BridgePolkadotMessagesConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
}
}

Expand Down Expand Up @@ -1338,6 +1354,14 @@ pub fn polkadot_testnet_genesis(
},
paras: Default::default(),
xcm_pallet: Default::default(),
bridge_kusama_grandpa: polkadot_runtime::BridgeKusamaGrandpaConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
bridge_kusama_messages: polkadot_runtime::BridgeKusamaMessagesConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
}
}

Expand Down Expand Up @@ -1425,6 +1449,14 @@ pub fn kusama_testnet_genesis(
gilt: Default::default(),
paras: Default::default(),
xcm_pallet: Default::default(),
bridge_polkadot_grandpa: kusama_runtime::BridgePolkadotGrandpaConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
bridge_polkadot_messages: kusama_runtime::BridgePolkadotMessagesConfig {
owner: Some(endowed_accounts[0].clone()),
..Default::default()
},
}
}

Expand Down
19 changes: 19 additions & 0 deletions runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ smallvec = "1.8.0"
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
bp-kusama = { path = "../../bridges/primitives/chain-kusama", default-features = false }
bp-messages = { path = "../../bridges/primitives/messages", default-features = false }
bp-polkadot = { path = "../../bridges/primitives/chain-polkadot", default-features = false }
bp-runtime = { path = "../../bridges/primitives/runtime", default-features = false }
kusama-runtime-constants = { package = "kusama-runtime-constants", path = "./constants", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand All @@ -41,6 +45,9 @@ pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "maste
pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-bridge-dispatch = { path = "../../bridges/modules/dispatch", default-features = false }
pallet-bridge-grandpa = { path = "../../bridges/modules/grandpa", default-features = false }
pallet-bridge-messages = { path = "../../bridges/modules/messages", default-features = false }
pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand Down Expand Up @@ -85,6 +92,7 @@ pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate",
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
hex-literal = { version = "0.3.4", optional = true }

bridge-runtime-common = { path = "../../bridges/bin/runtime-common", default-features = false }
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
Expand All @@ -94,6 +102,7 @@ xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", defa
xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false }

[dev-dependencies]
bp-message-dispatch = { path = "../../bridges/primitives/message-dispatch" }
hex-literal = "0.3.4"
tiny-keccak = "2.0.2"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
Expand All @@ -111,6 +120,11 @@ only-staking = []
std = [
"authority-discovery-primitives/std",
"bitvec/std",
"bp-kusama/std",
"bp-messages/std",
"bp-polkadot/std",
"bp-runtime/std",
"bridge-runtime-common/std",
"primitives/std",
"rustc-hex/std",
"parity-scale-codec/std",
Expand All @@ -130,6 +144,9 @@ std = [
"pallet-bags-list/std",
"pallet-balances/std",
"pallet-bounties/std",
"pallet-bridge-dispatch/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-child-bounties/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
Expand Down Expand Up @@ -184,6 +201,7 @@ std = [
"frame-election-provider-support/std",
]
runtime-benchmarks = [
"bridge-runtime-common/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
Expand All @@ -192,6 +210,7 @@ runtime-benchmarks = [
"pallet-babe/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bounties/runtime-benchmarks",
"pallet-bridge-grandpa/runtime-benchmarks",
"pallet-child-bounties/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
Expand Down
Loading