Add parachain pallets to rialto runtime (#1053)

* use BABE to author blocks on Rialto (previously: Aura)

* removed extra script

* use bp_rialto::Moment

* fix tests

* Babe should control session end

* add parachain pallets to Rialto runtime

* add parachain pallets to rialto runtime + add parachains inherent data provider to node

* remove script again

* fmt

* allow unlicensed crates

* spellcheck

* fix compilation
This commit is contained in:
Svyatoslav Nikolsky
2021-09-13 14:00:13 +03:00
committed by Bastian Köcher
parent 74024b028c
commit 79143f6ec6
15 changed files with 1345 additions and 193 deletions
@@ -40,9 +40,9 @@ impl CliEncodeCall for Rialto {
Call::Remark { remark_payload, .. } => rialto_runtime::Call::System(rialto_runtime::SystemCall::remark(
remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
)),
Call::Transfer { recipient, amount } => {
rialto_runtime::Call::Balances(rialto_runtime::BalancesCall::transfer(recipient.raw_id(), amount.0))
}
Call::Transfer { recipient, amount } => rialto_runtime::Call::Balances(
rialto_runtime::BalancesCall::transfer(recipient.raw_id().into(), amount.0),
),
Call::BridgeSendMessage {
lane,
payload,
@@ -209,7 +209,7 @@ mod tests {
// then
assert_eq!(
format!("{:?}", hex),
"0x0400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27de5c0"
"0x040000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27de5c0"
);
}
+2 -2
View File
@@ -100,7 +100,7 @@ impl TransactionSignScheme for Rialto {
let signer: sp_runtime::MultiSigner = signer.public().into();
let (call, extra, _) = raw_payload.deconstruct();
rialto_runtime::UncheckedExtrinsic::new_signed(call, signer.into_account(), signature.into(), extra)
rialto_runtime::UncheckedExtrinsic::new_signed(call, signer.into_account().into(), signature.into(), extra)
}
fn is_signed(tx: &Self::SignedTransaction) -> bool {
@@ -110,7 +110,7 @@ impl TransactionSignScheme for Rialto {
fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool {
tx.signature
.as_ref()
.map(|(address, _, _)| *address == rialto_runtime::Address::from(*signer.public().as_array_ref()))
.map(|(address, _, _)| *address == rialto_runtime::Address::Id(signer.public().into()))
.unwrap_or(false)
}