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

Beacon sync bookkeeping update and bug fix #3051

Merged
merged 6 commits into from
Feb 7, 2025

Conversation

mjfh
Copy link
Contributor

@mjfh mjfh commented Feb 7, 2025

No description provided.

mjfh added 6 commits February 7, 2025 09:45
details:
  Instead of keeping track in `borrowed` of the sum of a set of blocks
  fetched from the `unprocessed` list, the particular ranges details are
  stored. When committing a particular range, the range itself (rather
  then its length) is removed from the `borrowed` data.

why:
  The function `blocksUnprocAmend()`) may produce a race condition, so it
  was re-implemented as `blocksUnprocAppend()` considering range overlaps
  with borrowed.
why:
  The `borrowed` data structure can be fully maintained with the
  `blocksUnprocXxx()` functions.
why:
  Was previously deleted after importing blocks although it is not needed
  anymore after blocks have been assembled using bodies fetched over
  the ethXX network.
why:
  Some error exit directives missed some clean up leaving the blocks
  list with empty/stale block bodies.
why:
  There is not much one can do. Typically, this type of error is due
  to a switch to a different canonical chain. When this happens, the
  block batch is expected to be relatively short as the cause for a
  chain switch is an RPC instruction. This in turn is effective if some
  of the blocks on the `FC` database are maintained by the `CL`.
@mjfh mjfh merged commit 67b8dd7 into master Feb 7, 2025
8 checks passed
@mjfh mjfh deleted the Beacon-sync-bookkeeping-update-and-bug-fix branch February 7, 2025 10:43
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.

1 participant