Skip to content
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

Merged
merged 16 commits into from
Mar 27, 2024
Merged

Feat/refactor politest #212

merged 16 commits into from
Mar 27, 2024

Conversation

lrazovic
Copy link
Member

@lrazovic lrazovic commented Mar 25, 2024

What?

The politest runtime is now aligned with the polimec one, with the following additions:

  • Pallet Funding
  • Pallet Sudo
  • A new 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.
image

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

@lrazovic lrazovic self-assigned this Mar 25, 2024
@lrazovic lrazovic marked this pull request as ready for review March 26, 2024 15:01
@@ -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::{
Copy link
Member Author

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::{
Copy link
Member Author

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.

Copy link
Contributor

@JuaniRios JuaniRios left a 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.

Comment on lines -323 to 438
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>;
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 926710c

Comment on lines 792 to 797
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),
}
Copy link
Contributor

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

Copy link
Member Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lrazovic lrazovic merged commit 2af68a4 into main Mar 27, 2024
@JuaniRios JuaniRios deleted the feat/refactor-politest branch March 27, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants