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

fix(api): update reorg handling procedure #713

Merged
merged 6 commits into from
Feb 9, 2025
Merged

Conversation

PJColombo
Copy link
Member

@PJColombo PJColombo commented Feb 6, 2025

Checklist

  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

It renames the handleReorgedSlots procedure to handleReorg.

Now, the procedure receives two sets of block hashes: rewinded and forwarded blocks.
• Rewinded blocks represent the blocks from the old chain that are being reverted. These are the blocks being marked as reorg now
• Forwarded blocks belong to the new canonical chain and have been validated starting from the common ancestor between the two chains. If any of these blocks were previously marked as part of a reorg, they are now unmarked.

With the new forwardedBlocks parameter, we can explicitly designate which blocks belong to the canonical chain, allowing us to unmark them as reorgs if they were previously marked. This eliminates the need to automatically perform this step in the indexData procedure as a precaution for reindexed blocks that were previously considered part of a reorg.

Motivation and Context (Optional)

This endpoint is necessary for the new handling logic introduced in the indexer.

Related Issue (Optional)

Indexer's PR

Screenshots (if appropriate):

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blobscan-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2025 4:23pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
blobscan-docs ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 4:23pm
blobscan-gnosis ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 4:23pm
blobscan-holesky ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 4:23pm
blobscan-mainnet ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 4:23pm
blobscan-sepolia ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 4:23pm

Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: 80a8e6e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@blobscan/api Minor
@blobscan/rest-api-server Patch
@blobscan/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.58%. Comparing base (e9a35d7) to head (80a8e6e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #713      +/-   ##
==========================================
- Coverage   88.60%   88.58%   -0.03%     
==========================================
  Files         162      162              
  Lines       11059    11060       +1     
  Branches     1208     1207       -1     
==========================================
- Hits         9799     9797       -2     
- Misses       1260     1263       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 8, 2025

📦 Next.js Bundle Analysis for @blobscan/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@PJColombo PJColombo force-pushed the fix/api/reorg-handling branch from 40b6bc1 to 80a8e6e Compare February 9, 2025 16:19
@PJColombo PJColombo merged commit 27cddc4 into main Feb 9, 2025
14 checks passed
@PJColombo PJColombo deleted the fix/api/reorg-handling branch February 9, 2025 18: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.

1 participant