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

allow getBlockIdAtSlot to answer queries from available states #5869

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

etan-status
Copy link
Contributor

After checkpoint sync, historical block IDs cannot yet be queried. However, they are needed to compute dependent roots of ShufflingRef. To allow lookup, enable getBlockIdAtSlot to answer from compatible states in memory; as long as they descend from the finalized checkpoint and the requested slot is sufficiently recent, block_roots contains everything to recover BlockSlotId up to SLOTS_PER_HISTORICAL_ROOT. This is similar to how attester_dependent_root etc. are computed.

This accelerates the first couple minutes of checkpoint sync on Mainnet, especially the time until finality advances past the synced checkpoint.

After checkpoint sync, historical block IDs cannot yet be queried.
However, they are needed to compute dependent roots of `ShufflingRef`.
To allow lookup, enable `getBlockIdAtSlot` to answer from compatible
states in memory; as long as they descend from the finalized checkpoint
and the requested slot is sufficiently recent, `block_roots` contains
everything to recover `BlockSlotId` up to `SLOTS_PER_HISTORICAL_ROOT`.
This is similar to how `attester_dependent_root` etc. are computed.

This accelerates the first couple minutes of checkpoint sync on Mainnet,
especially the time until finality advances past the synced checkpoint.
@etan-status
Copy link
Contributor Author

 peers: 16 ❯ finalized: ccb64aa1:261980 ❯ head: f998de42:261981:31 ❯ time: 261982:25 (8383449) ❯ sync: 00h00m (71.11%) 2.6301slots/s (RRRsRssRRs:8383423)/opt

about 2 minutes to sync from finalized checkpoint

Copy link

github-actions bot commented Feb 8, 2024

Unit Test Results

         9 files  ±0    1 107 suites  +3   27m 33s ⏱️ -15s
  4 230 tests +1    3 883 ✔️ +1  347 💤 ±0  0 ±0 
16 885 runs  +3  16 487 ✔️ +3  398 💤 ±0  0 ±0 

Results for commit 4a64c37. ± Comparison against base commit a746063.

@arnetheduck arnetheduck merged commit 4266e16 into unstable Feb 9, 2024
12 checks passed
@arnetheduck arnetheduck deleted the dev/etan/cd-blockram branch February 9, 2024 10:13
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.

None yet

2 participants