-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/refactor politest #212
Conversation
@@ -20,12 +20,19 @@ | |||
use std::{sync::Arc, time::Duration}; | |||
|
|||
use cumulus_client_cli::CollatorOptions; | |||
#[cfg(not(feature = "async-backing"))] | |||
// Local Runtime Types | |||
use polimec_runtime::{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default we use the polimec_runtime
// Local Runtime Types | ||
use polimec_runtime::{ | ||
opaque::{Block, Hash}, | ||
RuntimeApi, | ||
}; | ||
|
||
#[cfg(feature = "async-backing")] | ||
use politest_runtime::{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we enable the async-backing
feature we have to use the politest_runtime
since it implements a RuntimeApi
needed by the task_manager
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good, just a few small optional things.
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< | ||
Runtime, | ||
RELAY_CHAIN_SLOT_DURATION_MILLIS, | ||
BLOCK_PROCESSING_VELOCITY, | ||
UNINCLUDED_SEGMENT_CAPACITY, | ||
>; | ||
#[cfg(feature = "async-backing")] | ||
type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; | ||
type ConsensusHook = ConsensusHook; | ||
type DmpQueue = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the extraction of ConensusHook into a separate type into polimec runtime too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 926710c
runtimes/politest/src/lib.rs
Outdated
match asset { | ||
AssetName::DOT => (AcceptedFundingAsset::DOT.to_assethub_id(), price), | ||
AssetName::USDC => (AcceptedFundingAsset::USDC.to_assethub_id(), price), | ||
AssetName::USDT => (AcceptedFundingAsset::USDT.to_assethub_id(), price), | ||
AssetName::PLMC => (pallet_funding::PLMC_FOREIGN_ID, price), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use hardcoded values in the polimec runtime. Add these changes there too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 926710c
[pallet_linear_release, LinearRelease] | ||
); | ||
} | ||
|
||
impl_runtime_apis! { | ||
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime { | ||
fn slot_duration() -> sp_consensus_aura::SlotDuration { | ||
sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) | ||
sp_consensus_aura::SlotDuration::from_millis(parachains_common::SLOT_DURATION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be fully aligned with https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-1---update-parachain-runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What?
The
politest
runtime is now aligned with thepolimec
one, with the following additions:async-backing
feature since Rococo has Asynchronous Backing enabled.Why?
We need a runtime available online so the frontend can test the pallet funding more easily.
Testing and Screenshots
The new
politest
runtime is now running and producing blocks on Rococo.Anything Else?
I can recommend https://test.lastic.xyz/bulkcore1 to buy and assign a
Core
to a Para ID on Rococo!A Politest runtime is now running @ wss://beta.rolimec.org