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

[wip] e35 #7189

Closed
wants to merge 4,128 commits into from
Closed

[wip] e35 #7189

wants to merge 4,128 commits into from

Conversation

awskii
Copy link
Member

@awskii awskii commented Mar 27, 2023

No description provided.

go.mod Outdated Show resolved Hide resolved
core/state/rw_v3.go Outdated Show resolved Hide resolved
core/state/rw_v3.go Outdated Show resolved Hide resolved
go.mod Outdated
@@ -176,7 +176,7 @@ require (
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240202034757-516749793a9d // indirect
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240202101433-135828c6e0ff // indirect
Copy link

Choose a reason for hiding this comment

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

Suggested change
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240202101433-135828c6e0ff // indirect
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240202101433-135828c6e0ff // indirect

Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
207 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.5% Duplication on New Code

See analysis details on SonarCloud

battlmonstr and others added 28 commits April 29, 2024 16:24
…10120)

Before:
If Flush() is blocked while Run() exits after insertBlocks() error or
ctx.Done(), some tasks might be still in the queue, the waitGroup is not
done, so waitGroup.Wait() won't exit and Flush() might hang (or leak its
goroutine).

Solution:
Replace waitGroup with manual counting of tasks and a channel-based
signal to Flush().
ExecutionEngine was meant for the engine API compatibility mode. Switch
to using a generated ExecutionClient interface. We never need a remote
mode and it always ends up being an instance of ExecutionClientDirect
implemented by EthereumExecutionModule.
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.
…ackage (#10129)

We are using `storage` and `store` - would be good to stick to 1 for
consistency, going ahead with store
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.
@yperbasis yperbasis closed this May 1, 2024
@yperbasis yperbasis deleted the e35 branch May 1, 2024 07:02
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.

7 participants