Skip to content

Omni-node: Move timestamps closer to now#10807

Merged
skunert merged 9 commits intomasterfrom
skunert/omni-dev-mode-fix-timestamps
Jan 15, 2026
Merged

Omni-node: Move timestamps closer to now#10807
skunert merged 9 commits intomasterfrom
skunert/omni-dev-mode-fix-timestamps

Conversation

@skunert
Copy link
Copy Markdown
Contributor

@skunert skunert commented Jan 14, 2026

In omni-node dev-mode the timestamps where showing close to the unix epoch. Technically not a problem, but its a bit more aesthetic if they are closer to now, as requested in #10759.

I set them arbitrarily to two hours in the past so that they do not run immediately into the future.

@skunert skunert requested review from athei and iulianbarbu January 14, 2026 20:58
@skunert skunert added the T0-node This PR/Issue is related to the topic “node”. label Jan 14, 2026
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Jan 14, 2026

/cmd prdoc --audience node_dev --bump patch

Copy link
Copy Markdown
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

I find 2 hours in the past also random, but whatever :P

Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Jan 15, 2026

/cmd fmt

@skunert skunert enabled auto-merge January 15, 2026 10:40
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/21028350688
Failed job name: build-templates-node

@skunert skunert added this pull request to the merge queue Jan 15, 2026
Merged via the queue into master with commit aeab77e Jan 15, 2026
263 of 267 checks passed
@skunert skunert deleted the skunert/omni-dev-mode-fix-timestamps branch January 15, 2026 18:23
@pgherveou
Copy link
Copy Markdown
Contributor

pgherveou commented Feb 26, 2026

This PR introduced a DX regression for runtimes that use RelaychainDataProvider as the scheduler's BlockNumberProvider (which includes all system parachains).

The problem: Before this PR, relay_offset defaulted to 0, so relay_parent_number started near 0 and incremented by ~2 per para block. After this PR, relay_offset is derived from wall clock time ((unix_now - 2h) / 6000), which is ~295M in Feb 2026.

pallet_scheduler::service_agendas() iterates from Scheduler::IncompleteSince up to now (the relay block number), checking each relay block's agenda. Since IncompleteSince starts near 0 but now jumps to ~295M, the scheduler burns its entire weight budget (~8.3MB proof_size) doing 197 empty agenda lookups per block, consuming 85.7% of the max PoV budget on every idle block.

Workaround: inject both Scheduler::IncompleteSince and ParachainSystem::LastRelayChainBlockNumber into the raw genesis spec, set to the expected initial_relay_slot value. This closes the gap so the scheduler only does 1-2 iterations per block.

We should work on a proper fix to make polkadot-omni-node easier to use in dev mode without requiring to tweak the genesis.

@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 26, 2026

My initial impression is that this should be fixed at the scheduler level. This comment already foresees this issue:

/// *Agile Coretime* chain with relay chain number provider configured, it could otherwise

Main question for me is why Scheduler::IncompleteSince is even initialized with a low value. Dev chain is started and the first thing the runtime sees should already be a high block number. How does such a big gap even get created?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants