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
2222extern 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