Previously "in-memory" MDBX instances for fork validation and mining
were created inside `os.TempDir()`. We should create them inside
Erigon's datadir so that the file permissions and the disk are the same
as for the main database.
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/676.
the root cause is that when `inMemoryExecution` lambda gets created in
the `eth/backend.go`, it captures the reference of
`backend.notifications`, and so the execution of side-forks actually
adds notifications to there, and it all gets sent out to tx pool (and
RPC daemon) at the end of the stage loop (regardless of whether there
was forkchoice update or not)
so we can create a separate notification, but then somehow flush it to
the "main" nofitications when the in-memory exec state is flushed
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
* if PoS download is fast enough, determine VALID or INVALID
* more acceptable absolute value
* solved comments
* remove useless
* moved check in stage_headers
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
* Consensus tests update 11
* Add GrayGlacier fork
* Wire currentRandom from tests into PREVRANDAO
* Serenity engine
* Support insertion of PoS blocks in MockSentry
* Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()
* Revert "Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()"
This reverts commit 903fca572be03c7de33318ce177a03a4be34927b.
* Post-merge fix
* Don't wait for Beacon Chain in tests
* Skip powToPosBlockRejection transition test
* ForkChoice in insertPoSBlocks
* Add withPosDownloader arg to MockWithEverything in order to fix TestPoSDownloader
* avoid constantly triggering stageloop when using Engine API
* fix lint + test
* fixed comments
* ops
* little fixes here and there
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
* added proper cleanup when we get notified of new height
* added extra cleanup
* removed bad if condition
* fixed hive tests
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
* Remove an unused interrupt value
* Remove sendErrResponse from safeAndFinalizedBlocksAreCanonical
* Clean up err handling
* startHandlingForkChoice returns response
* handleNewPayload returns response
* Commit transaction before responding on Engine API
* small fix
* Reply with SYNCING before long unwind
* schedulePoSDownload doesn't require requestStatus anymore