Skip to content

Make instant seal work and added interval#2589

Merged
l0r1s merged 7 commits into
opentensor:devnet-readyfrom
girazoki:girazoki-make-instant-seal-work-and-added-interval
May 5, 2026
Merged

Make instant seal work and added interval#2589
l0r1s merged 7 commits into
opentensor:devnet-readyfrom
girazoki:girazoki-make-instant-seal-work-and-added-interval

Conversation

@girazoki
Copy link
Copy Markdown

Description

This PR fixes Instant seal which was not working because consensus_providers were not being passed and also adds interval sealing, which will create a block at the defined interval.

Instant sealing works better when offchain workers are disabled, as the offchain worker creates txs by itself.

Example usages:

./target/release/node-subtensor --dev --tmp --sealing=instant --offchain-worker never

./target/release/node-subtensor --dev --tmp --sealing=6000

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):
    More flexibility when testing

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@girazoki girazoki marked this pull request as ready for review April 14, 2026 12:45
@girazoki girazoki changed the title Girazoki make instant seal work and added interval Make instant seal work and added interval Apr 14, 2026
@evgeny-s evgeny-s added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label May 5, 2026
Copy link
Copy Markdown
Collaborator

@l0r1s l0r1s left a comment

Choose a reason for hiding this comment

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

Added a small comment, not sure if it changes anything in our case though.

Comment thread node/src/service.rs
Sealing::Manual => Box::pin(commands_stream),
Sealing::Instant => Box::pin(transaction_pool.import_notification_stream().map(|_| {
sc_consensus_manual_seal::rpc::EngineCommand::SealNewBlock {
create_empty: false,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Original behavior is create_empty: true for instant seal, should we preserve this?

Copy link
Copy Markdown

@gorka-i gorka-i May 5, 2026

Choose a reason for hiding this comment

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

that was the reason why it wasnt working from what I had seen, but I did not dig too much into the issue. When you think about it instant means "as soon as there is a transaction" which by default means a non-empty block. before this PR this was not working but now is

Copy link
Copy Markdown
Contributor

@open-junius open-junius left a comment

Choose a reason for hiding this comment

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

verified the command, it works. Looks good!

@l0r1s l0r1s merged commit 9416f31 into opentensor:devnet-ready May 5, 2026
384 of 386 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants