Skip to content

Commit be9bdcb

Browse files
committed
More cleaning
1 parent c9edeb3 commit be9bdcb

File tree

9 files changed

+337
-403
lines changed

9 files changed

+337
-403
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ tracing = { version = "0.1.41", default-features = false }
2121
try-runtime-cli = { version = "0.42" }
2222

2323
# Local workspace members
24-
bp-people-polkadot = { path = "runtime/src/bridge-primitives", default-features = false }
2524
pallet-relayer-set = { version = "1.0.0", path = "pallets/relayer-set", default-features = false }
2625
pallet-transaction-storage = { version = "4.0.0-dev", path = "pallets/transaction-storage", default-features = false }
2726
pallet-validator-set = { version = "1.0.0", path = "pallets/validator-set", default-features = false }
@@ -91,6 +90,7 @@ bp-bridge-hub-rococo = { git = "https://github.com/paritytech/polkadot-sdk.git",
9190
bp-header-chain = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
9291
bp-messages = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
9392
bp-parachains = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
93+
# TODO: remove this and replace with local runtime/src/bridge-primitives
9494
bp-polkadot-bulletin = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
9595
bp-polkadot-core = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
9696
bp-rococo = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }
@@ -125,7 +125,6 @@ members = [
125125
"pallets/transaction-storage",
126126
"pallets/validator-set",
127127
"runtime",
128-
"runtime/src/bridge-primitives",
129128
]
130129
[profile.release]
131130
# Polkadot runtime requires unwinding.

runtime/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ bp-header-chain = { workspace = true }
6464
bp-messages = { workspace = true }
6565
bp-parachains = { workspace = true }
6666

67-
bp-people-polkadot = { workspace = true }
6867
bp-polkadot-bulletin = { workspace = true }
6968
bp-polkadot-core = { workspace = true }
7069
bp-rococo = { workspace = true }
@@ -154,7 +153,6 @@ std = [
154153
"bp-header-chain/std",
155154
"bp-messages/std",
156155
"bp-parachains/std",
157-
"bp-people-polkadot/std",
158156
"bp-polkadot-bulletin/std",
159157
"bp-polkadot-core/std",
160158
"bp-rococo/std",
@@ -211,7 +209,6 @@ runtime-benchmarks = [
211209
"xcm-executor/runtime-benchmarks",
212210
"xcm/runtime-benchmarks",
213211

214-
"bp-people-polkadot/runtime-benchmarks",
215212
"pallet-staking/runtime-benchmarks",
216213
"pallet-xcm/runtime-benchmarks",
217214
"parachains-common/runtime-benchmarks",

runtime/src/bridge-primitives/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "bp-people-polkadot"
3-
description = "Primitives of PeoplePolkadot parachain runtime."
2+
name = "bp-bulletin-polkadot"
3+
description = "Primitives of Bulletin parachain runtime."
44
repository.workspace = true
55
authors.workspace = true
66
edition.workspace = true

runtime/src/bridge-primitives/src/lib.rs

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -14,86 +14,12 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//! Module with configuration which reflects PeoplePolkadot runtime setup
17+
//! Module with configuration which reflects Bulletin runtime setup
1818
//! (AccountId, Headers, Hashes...)
1919
2020
#![cfg_attr(not(feature = "std"), no_std)]
2121

2222
extern crate alloc;
23-
extern crate bp_bridge_hub_cumulus;
24-
extern crate bp_messages;
25-
extern crate bp_runtime;
26-
extern crate frame_support;
27-
extern crate sp_runtime;
2823

29-
pub use bp_bridge_hub_cumulus::*;
30-
use bp_messages::*;
31-
use bp_runtime::{
32-
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain,
33-
};
34-
use frame_support::dispatch::DispatchClass;
35-
use sp_runtime::{RuntimeDebug, StateVersion};
36-
37-
/// PeoplePolkadot parachain.
38-
#[derive(RuntimeDebug)]
39-
pub struct PeoplePolkadot;
40-
41-
impl Chain for PeoplePolkadot {
42-
const ID: ChainId = *b"phpd";
43-
const STATE_VERSION: StateVersion = StateVersion::V1;
44-
45-
type BlockNumber = BlockNumber;
46-
type Hash = Hash;
47-
type Hasher = Hasher;
48-
type Header = Header;
49-
50-
type AccountId = AccountId;
51-
type Balance = Balance;
52-
type Nonce = Nonce;
53-
type Signature = Signature;
54-
55-
fn max_extrinsic_size() -> u32 {
56-
*BlockLength::get().max.get(DispatchClass::Normal)
57-
}
58-
59-
fn max_extrinsic_weight() -> Weight {
60-
BlockWeights::get()
61-
.get(DispatchClass::Normal)
62-
.max_extrinsic
63-
.unwrap_or(Weight::MAX)
64-
}
65-
}
66-
67-
impl Parachain for PeoplePolkadot {
68-
const PARACHAIN_ID: u32 = PEOPLE_POLKADOT_PARACHAIN_ID;
69-
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
70-
}
71-
72-
impl ChainWithMessages for PeoplePolkadot {
73-
const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str =
74-
WITH_PEOPLE_POLKADOT_MESSAGES_PALLET_NAME;
75-
const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce =
76-
MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
77-
/// This constant limits the maximum number of messages in `receive_messages_proof`.
78-
/// We need to adjust it from 4096 to 2024 due to the actual weights identified by
79-
/// `check_message_lane_weights`. A higher value can be set once we switch
80-
/// `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`.
81-
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024;
82-
}
83-
84-
/// Identifier of PeoplePolkadot in the Polkadot relay chain.
85-
pub const PEOPLE_POLKADOT_PARACHAIN_ID: u32 = 1004;
86-
87-
/// Name of the With-PeoplePolkadot messages pallet instance that is deployed at bridged chains.
88-
pub const WITH_PEOPLE_POLKADOT_MESSAGES_PALLET_NAME: &str = "PeoplePolkadotMessages";
89-
90-
/// Name of the With-PeoplePolkadot bridge-relayers pallet instance that is deployed at bridged
91-
/// chains.
92-
pub const WITH_PEOPLE_POLKADOT_RELAYERS_PALLET_NAME: &str = "PeopleRelayers";
93-
94-
/// Pallet index of `BridgePolkadotBulletinMessages: pallet_bridge_messages::<Instance1>`.
95-
pub const WITH_PEOPLE_POLKADOT_TO_BULLETIN_MESSAGES_PALLET_INDEX: u8 = 61;
96-
97-
98-
decl_bridge_finality_runtime_apis!(people_polkadot);
99-
decl_bridge_messages_runtime_apis!(people_polkadot, LegacyLaneId);
24+
// TODO: move here the stuff from
25+
// bp-polkadot-bulletin = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }

0 commit comments

Comments
 (0)