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

omni-node: --dev sets manual seal and allows --chain to be set #6646

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9eab6a1
omni-node: --dev starts manual seal and allows --chain to be set
iulianbarbu Nov 25, 2024
e321830
comments fixes
iulianbarbu Nov 26, 2024
922285c
fix comments
iulianbarbu Nov 26, 2024
c5838ce
add prdoc
iulianbarbu Nov 26, 2024
61fda5c
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Nov 26, 2024
8b923a8
fix prdoc
iulianbarbu Nov 26, 2024
3e96f98
add docs and fix clippy
iulianbarbu Nov 26, 2024
dbb1d1e
fix doc test
iulianbarbu Nov 26, 2024
6f9e5e8
prdoc fix
iulianbarbu Nov 26, 2024
ff46e59
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Nov 26, 2024
897ea81
a few more docs
iulianbarbu Nov 27, 2024
f913cec
add choptsticks guide
iulianbarbu Nov 27, 2024
8813409
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Nov 27, 2024
f696909
no need to use allow-unresolved-imports
iulianbarbu Nov 27, 2024
06bbd5e
remake dev-block-time standalone
iulianbarbu Nov 27, 2024
d6faae7
polish public docs
iulianbarbu Nov 28, 2024
7210dc9
Update cumulus/polkadot-omni-node/lib/src/cli.rs
iulianbarbu Nov 28, 2024
1833acd
fix fmt
iulianbarbu Nov 28, 2024
d8395bb
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Nov 29, 2024
405485a
test-stable without cache
iulianbarbu Nov 29, 2024
5d32b16
revert MinimumPeriod
iulianbarbu Nov 30, 2024
4729516
fix clippy
iulianbarbu Dec 1, 2024
81bd3eb
Revert "test-stable without cache"
iulianbarbu Dec 1, 2024
14cbdb4
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Dec 5, 2024
c8c1bd2
Merge branch 'master' into ib-dev-flag-with-manual-seal
iulianbarbu Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cumulus/polkadot-omni-node/lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ pub struct Cli<Config: CliConfig> {
/// as if it was part of a parachain.
///
/// The `--dev` flag sets the `dev_block_time` to a default value of 3000ms unless explicitly
/// provided. #[arg(long)]
/// provided.
#[arg(long)]
pub dev_block_time: Option<u64>,

/// EXPERIMENTAL: Use slot-based collator which can handle elastic scaling.
Expand Down
5 changes: 2 additions & 3 deletions templates/parachain/runtime/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ use super::{
MessageQueue, Nonce, PalletInfo, ParachainSystem, Runtime, RuntimeCall, RuntimeEvent,
RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, RuntimeTask, Session, SessionKeys,
System, WeightToFee, XcmpQueue, AVERAGE_ON_INITIALIZE_RATIO, EXISTENTIAL_DEPOSIT, HOURS,
MAXIMUM_BLOCK_WEIGHT, MICRO_UNIT, MINIMUM_PERIOD, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
VERSION,
MAXIMUM_BLOCK_WEIGHT, MICRO_UNIT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION,
};
use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin};

Expand Down Expand Up @@ -134,7 +133,7 @@ impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
type MinimumPeriod = ConstU64<MINIMUM_PERIOD>;
type MinimumPeriod = ConstU64<0>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ouf of curiosity - why this was set to 0?

Copy link
Contributor Author

@iulianbarbu iulianbarbu Dec 10, 2024

Choose a reason for hiding this comment

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

At first, it seemed I couldn't run the parachain runtime based chain spec with chopsticks because of an error which IIRC stated that: "Timestamp slot must match CurrentSlot. This likely means that the configured block time in the node and/or rest of the runtime is not compatible with Aura's SlotDuration". After reading the code for a bit I thought it might have to do with the MinimumPeriod, which I changed to SLOT_DURATION / 2, resulting in the newly generated chain spec to work with chopsticks. I don't remember if at that time though I validated that changing the minimum period back to 0 and rebuilding everything made chopsticks fail again. Then rebuilding the runtime at a later day made things work without the MinimumPeriod change. I also tested this right now (removed the previous target folder) and things work as expected without the minimum period change. It might have been some inconsistent local state with my artifacts that caused the issue, but this begs for ensuring that the commands we recommend in the READMEs work in CI. Opened this: #6837.

type WeightInfo = ();
}

Expand Down
3 changes: 0 additions & 3 deletions templates/parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ mod block_times {
// NOTE: Currently it is not possible to change the slot duration after the chain has started.
// Attempting to do so will brick block production.
pub const SLOT_DURATION: u64 = MILLI_SECS_PER_BLOCK;

/// Minimum period between blocks set for the `pallet_timestamp`.
pub const MINIMUM_PERIOD: u64 = SLOT_DURATION / 2;
}
pub use block_times::*;

Expand Down
Loading