Skip to content

fix(taiko-client): reduce slot required for updating lookahead #19526

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

Merged
merged 4 commits into from
May 24, 2025

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented May 23, 2025

we missed 34 slots on Holesky today due to our beacon node having an issue, this means that after current epoch + 2, we need to wait 13 slots to update lookahead. This reduces it to 2 to immediately resolve this issue.

May 23 20:13:05.455 WARN Error when importing rpc blobs          slot: 4344033, block_hash: 0xd4b0be87d0fd60df5dbab17c4ee7e91e2550984ab5a1370b1861896893d55e3c, error: ParentUnknown { parent_root: 0xfc83f9f2c08433772f8ac9f727ca469e6412522003b204ed0bc610b29da12686 }
May 23 20:13:06.000 INFO Syncing                                 est_time: 0 mins, speed: 0.69 slots/sec, distance: 34 slots (6 mins), peers: 102, service: slot_notifier
May 23 20:13:14.362 INFO New RPC block received                  hash: 0xd913747454a718c8cd3e114824bbaa38abe3eab499a91a1208469c26e1383d

beacon missed 34 slots.

Now we make two changes:

  1. update lookahead at slot 2 or greater, to minimize the risk of this edge case
  2. we only push into the split window slot range ring is we are actually the operator there.

Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 49 lines in your changes missing coverage. Please review.

Project coverage is 26.50%. Comparing base (b599ffe) to head (20b3652).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/taiko-client/driver/driver.go 0.00% 49 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
packages/taiko-client/driver/driver.go 15.29% <0.00%> (-1.08%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b599ffe...20b3652. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cyberhorsey cyberhorsey self-assigned this May 24, 2025
@cyberhorsey cyberhorsey changed the title fix(taiko-client): reduce slot required for updating loookahead fix(taiko-client): reduce slot required for updating lookahead May 24, 2025
@davidtaikocha davidtaikocha requested a review from Copilot May 24, 2025 00:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with lookahead updates by reducing the minimum required slot from 15 to 2 and adjusting operator conditions when pushing into the window.

  • Lowered lookahead update threshold to slot 2
  • Refined operator checks and logging paths for current and next operators
Comments suppressed due to low confidence (1)

packages/taiko-client/driver/driver.go:457

  • The comment still references using mid-epoch (slot 16) as a reliable point, but the condition now uses slot 2. Please update the comment to reflect the new threshold.
// once per epoch, since we push the next operator as the current range when we check.

@davidtaikocha davidtaikocha added this pull request to the merge queue May 24, 2025
Merged via the queue into main with commit a804cb2 May 24, 2025
9 checks passed
@davidtaikocha davidtaikocha deleted the lookahead_change_slot_in_epoch branch May 24, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants