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

BN: Fix el_manager timeouts issue in block processing. #6665

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

cheatfate
Copy link
Contributor

@cheatfate cheatfate commented Oct 21, 2024

Use predefined array of exponential timeouts when all the requests to EL has been failed.

So now both operations newPayload and updateHead sharing single timeout of 4.seconds on mainnet preset.

Use predefined array of exponential timeouts when all the requests to EL has been failed.
@cheatfate cheatfate requested a review from arnetheduck October 21, 2024 01:20
Copy link

github-actions bot commented Oct 21, 2024

Unit Test Results

       12 files  ±0    1 810 suites  ±0   57m 17s ⏱️ - 3m 44s
  5 227 tests ±0    4 879 ✔️ ±0  348 💤 ±0  0 ±0 
29 057 runs  ±0  28 605 ✔️ ±0  452 💤 ±0  0 ±0 

Results for commit 4d1b1ce. ± Comparison against base commit eb993ff.

♻️ This comment has been updated with latest results.

@cheatfate cheatfate requested a review from etan-status October 21, 2024 19:20
Comment on lines +442 to +449
deadlineTime =
block:
let slotTime = (wallSlot + 1).start_beacon_time() - 1.seconds
if slotTime <= wallTime:
0.seconds
else:
chronos.nanoseconds((slotTime - wallTime).nanoseconds)
deadlineObj = DeadlineObject.init(deadlineTime)
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm. I think this proc is called also when syncing. If a block gets synced shortly before the end of a slot, this may give it a very short newPayload deadline (or even 0).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is present an overloaded procedure which still uses 8.seconds timeout and it will be used in all the places where DeadlineObject is not used as last argument.

Copy link
Contributor

@etan-status etan-status left a comment

Choose a reason for hiding this comment

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

Overall, the exponential timeouts make more sense than the hardcoded ones from before. They are also short enough to work on both minimal and mainnet presets, and they should also improve latency to get back online.

https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md

For reference, timeouts defined by spec are 8s on these, but have been removed in Prague for v4 newPayload. @tersec may know more about what that means or if it is intentional.

@tersec tersec merged commit a3d4a3e into unstable Oct 23, 2024
13 checks passed
@tersec tersec deleted the fix-elmanager-timeouts branch October 23, 2024 00:42
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