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

Evalue triggers to commit transactions in miner #1437

Closed
manav2401 opened this issue Feb 4, 2025 · 3 comments
Closed

Evalue triggers to commit transactions in miner #1437

manav2401 opened this issue Feb 4, 2025 · 3 comments

Comments

@manav2401
Copy link
Contributor

In miner, there are mainly 2 paths which triggers block production.

One is the ideal way which gets triggered when a new block is received

case head := <-w.chainHeadCh:

Another is when there are new transactions

case ev := <-w.txsCh:

The second one makes sense in case of ethereum when there's plenty of time to build a block and there are better transactions available. I don't think it makes sense for us as we should not be very picky in 2s block time because it can lead to delays in block execution, db operations and block propagation.

We should evaluate whether we need this trigger to enable mining or not.

Secondly, if we choose to keep it, the logic doesn't honour commit interrupt as we don't set any context with timeout before commit transactions. We should add it in that case or try to generalise commit interrupt so that it can handle both case.

@cffls
Copy link
Contributor

cffls commented Feb 4, 2025

Makes sense. Curious to see if the second case is ever triggered in bor.

@manav2401
Copy link
Contributor Author

It did in the sentry (posdevnodes-mainnet-2) I was debugging today and hence I created a task for it.

@manav2401
Copy link
Contributor Author

Addressed in #1434

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

No branches or pull requests

2 participants