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

eth/stagedsync: implement stage polygon sync forward #10124

Merged
merged 39 commits into from
May 23, 2024

Conversation

taratorio
Copy link
Member

No description provided.

@taratorio taratorio marked this pull request as draft April 29, 2024 13:57
@taratorio taratorio changed the base branch from e35 to e35-astrid-store-renames April 29, 2024 15:20
taratorio added a commit that referenced this pull request Apr 29, 2024
Since we are going ahead with a `Bridge` component managing its own DB
for state sync events and a `Heimdall` component managing its own DB for
checkpoints, milestones and spans this refactor is now due.

I also need this so I can integrate the new `polygon/sync` in a
`PolygonSyncStage` as part of this PR -
#10124 so I can implement a
`polygonSyncStageStore` specifically for the sync stage integration.
Base automatically changed from e35-astrid-store-renames to e35 April 29, 2024 17:04
@taratorio taratorio changed the base branch from e35 to e35-astrid-refactor-heimdall-tx-stores April 29, 2024 17:12
Base automatically changed from e35-astrid-refactor-heimdall-tx-stores to e35 May 1, 2024 06:09
taratorio added a commit that referenced this pull request May 1, 2024
Will be using `NewRwTxStore` in
#10124

Idea is simple - split the current store in 2:
- `roTxStore`
- `rwTxStore`

These 2 stores wrap around a tx with snapshots reader. 
The `rwTxStore` wraps around the `roTxStore` for code re-use.
This split removes chances of unexpected `tx is read only` errors when
calling the store update methods.

Also, opens up a possibility to introduce a `dbRwStore` and `dbRoStore`
wrappers around `roTxStore` and `rwTxStore` if we decide to go down this
path. The `dbRwStore` in particular can have ownership over the lifetime
of a `rwTxStore` - make sure only 1 is open at a time for example by
using a channel/mutex/semaphore or some other idea and call `Rollback`
and/or `Commit`.

We may need to look into transitioning these to `TemporalTx` at some
point - for now let's just get this to work first.
@taratorio taratorio marked this pull request as ready for review May 22, 2024 17:11
@taratorio taratorio changed the title eth/stagedsync: add init code for stage_polygon_sync eth/stagedsync: implement stage polygon sync forward May 22, 2024
@taratorio taratorio enabled auto-merge (squash) May 23, 2024 20:24
@taratorio taratorio merged commit 7a62399 into main May 23, 2024
10 checks passed
@taratorio taratorio deleted the e35-astring-sync-stage-impl branch May 23, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants