Skip to content

core, eth, miner: interrupt block building during fill transactions incase of timeout#1625

Merged
manav2401 merged 7 commits intodevelopfrom
manav/interrupt-fill-txs
Jul 21, 2025
Merged

core, eth, miner: interrupt block building during fill transactions incase of timeout#1625
manav2401 merged 7 commits intodevelopfrom
manav/interrupt-fill-txs

Conversation

@manav2401
Copy link
Copy Markdown
Member

@manav2401 manav2401 commented Jul 10, 2025

Description

Use commit interrupt for fill transactions as well.

We interrupt executing new transactions when the 2s block time mark is crossed. Although before execution, we call Pending() function of transaction pool which can be time consuming in some cases. If the 2s time limit is up, we'd like to interrupt that call as well to avoid spending any more time on doing any work for this block.

This PR passes the interrupt atomic boolean (which is used across the modules to trigger interrupt) when we're fetching the pending transactions and sorting them based on nonce and fee before executing.

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on amoy
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@manav2401 manav2401 merged commit f872be1 into develop Jul 21, 2025
9 of 10 checks passed
@manav2401 manav2401 deleted the manav/interrupt-fill-txs branch July 21, 2025 19:18
nebojsa94 pushed a commit to nebojsa94/bor that referenced this pull request Aug 14, 2025
…ncase of timeout (0xPolygon#1625)

Interrupt block building in fill transactions if we're above time. We pass around the worker level interrupt atomic value to handle the interrupt in transaction pool's pending function and ordering function in worker.
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