Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

[WIP]Introduce fast finality to erigon #2

Closed
wants to merge 187 commits into from
Closed

[WIP]Introduce fast finality to erigon #2

wants to merge 187 commits into from

Conversation

calmbeing
Copy link

Introduced by bnb-chain/BEPs#126. This PR tries to implement fast finality mechanism for erigon to be fully compatible with bnb-chain

@calmbeing calmbeing changed the title introduce fast finality to erigon [WIP]Introduce fast finality to erigon Nov 29, 2022
yperbasis and others added 29 commits December 7, 2022 12:47
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: nanevardanyan <nanevardanyants@gmail.com>
…nSync (erigontech#6222)

Change from: 
```
begin(TxNoSync)
exec new block, index nee data
do limited pruning 
commit()
send notifications about new data arrival to other apps, they may start reading new data at this time (by new read transactions) 
```
Change to: 
```
begin(TxNoSync)
exec new block, index nee data
commit() // no fsync here
send notifications about new data arrival to other apps, they may start reading new data at this time (by new read transactions) 
begin()
do pruning 
commit() // fsync here
```

it allows notify earlier. Fsync (of all changes) on modern drives is
fast, but on cloud-drives it’s about 1sec in worst cases.
This ensures that the filter bad transactions can use the same context
each time, so increases an account nonce in the first batch of
transactions is committed to the simulation just in case the same
account appears in the next batch of transactions.

Also makes use of the new txpool candidate functionality to ensure we're
getting fresh transactions each time.
…#6266)

Fixes erigontech#4935

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
erigontech#6273)

… formatting when error

Fixes erigontech#5365

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
)

Works around a flaw in the upgrade logic of the system contracts. Since
they are updated directly, without first being self-destructed and then
re-created, the usual incarnation logic does not get activated, and all
historical records of the code of these contracts are retrieved as the
most recent version. This problem will not exist in erigon3, but until
then, a workaround will be used to access code of such contracts through
a special structure, `SystemContractCodeLookup`

Fixes erigontech#5865

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Fixes erigontech#4778

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
AskAlexSharov and others added 27 commits December 26, 2022 17:58
Prior to withdrawals, it was extremely unlikely to have short (RLP < 32)
top trie nodes outside test scenarios.
Run tests from a new repo
https://github.com/ethereum/execution-spec-tests.

Also introduce `HashCheck()` function that checks correctness of block's
uncle, transaction, and withdrawals hashes.
@calmbeing calmbeing closed this by deleting the head repository Mar 2, 2023
setunapo pushed a commit to setunapo/bsc-erigon that referenced this pull request Apr 21, 2023
setunapo pushed a commit to setunapo/bsc-erigon that referenced this pull request Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.