Commit Graph

829 Commits

Author SHA1 Message Date
Alex Sharov
36fc6a3950
kv: db.ReadOnly() method #806 (#6454) 2022-12-28 12:48:57 +07:00
Max Revitt
4bdb35f94c
Withdrawals part 2 (#6180)
Continuation of PR #6009. Storage and retrieval of withdrawals.

- [x] storage of withdrawals on writeblock
- [x] composite key (block number | block hash)
- [x] value ([]withdrawal)
- [x] retrieval of withdrawals with block
- [x] tests around storing/retrieving withdrawals
- [x] tested in hive
- [x] commits tidied


## Hive Failures
- [x] Withdrawals Fork on Block 2
- [x] Withdrawals Fork on Block 3
- [ ] Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal
Account - No Transactions ( Syncing client rejected valid chain)
- [ ] Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 2 blocks - Withdrawals on Genesis - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 2 blocks - Withdrawals on Block 2 - Single Withdrawal
Account - No Transactions (Syncing client rejected valid chain)
- [ ] Sync after 2 blocks - Withdrawals on Block 2 - Single Withdrawal
Account (Timeout while waiting for secondary client to sync)
- [ ] Sync after 128 blocks - Withdrawals on Block 2 - Multiple
Withdrawal Accounts (Unexpected error on BalanceAt: Post
"http://172.17.0.4:8545/": context deadline exceeded, expected=<None>)
- [ ] Withdrawals Fork on Block 1 - 8 Block Re-Org, Sync (Expected no
error on EngineNewPayloadV2: error=Post "http://172.17.0.4:8551/":
context deadline exceeded)
- [ ] Withdrawals Fork on Block 8 - 10 Block Re-Org Sync (Expected no
error on EngineNewPayloadV2: error=Post "http://172.17.0.4:8551/":
context deadline exceeded)
- [ ] Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block
Re-Org Sync (Expected no error on EngineNewPayloadV2: error=Post
"http://172.17.0.4:8551/": context deadline exceeded)
- [ ] Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block
Re-Org Sync (Expected no error on EngineNewPayloadV2: error=Post
"http://172.17.0.4:8551/": context deadline exceeded)
2022-12-20 09:09:04 +00:00
alex.sharov
27de232afb better memdb use in tests 2022-12-19 10:56:57 +07:00
Andrew Ashikhmin
d82c778ab3
Withdrawals part 1 (#6009)
This PR partially implements
[EIP-4895](https://eips.ethereum.org/EIPS/eip-4895): Beacon chain push
withdrawals as operations. The new Engine API methods
(https://github.com/ethereum/execution-apis/pull/195) are implemented.

_Body downloader and saving withdrawals into DB are not implemented
yet!_
2022-12-01 09:15:01 +01:00
Andrew Ashikhmin
424f38a9b6
AuRa: iterate over durations in order (#6013)
Iteration order over go maps is random.
2022-11-10 13:47:57 +01:00
Alex Sharov
8d1ed547b0
E3: parallel exec, apply on roTx (#5879) 2022-10-28 08:47:45 +07:00
Andrew Ashikhmin
64a3156112
Support BaseFee in AuRa headers (#5820)
BaseFee is required in AuRa headers when
[EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) is activated.

Also:
- Basic AuRa header verification
- Extract some common RLP methods
- Tiny log clean-up
2022-10-21 12:43:44 +02:00
Andrew Ashikhmin
832e8e01fe
Remove verbose and partially redundant log (#5796)
This log message is mostly redundant after PR #5792.
2022-10-19 14:19:30 +02:00
hexoscott
e50110562a
revert execution batch size logic to size on disk (#5732)
Revert to older batch size logic to keep memory usage down during
execution phase and closer to the --batchSize flag size.

Spotted a "leak" in key generation as well. The unsafe pointer keeps the
byte slice around for as long as the batch is not committed, takes up a
fair chunk of memory surprisingly doing that so removed the unsafe
pointer usage giving the GC some chance to clean up along the way.

Moved the batch rollback into a defer func call rather than allowing
them to stack in the for loop. If this isn't going to work just let me
know and can change it back.
2022-10-13 09:10:26 +01:00
ledgerwatch
d95a905b2b
Fix Re-Org Back into Canonical Chain hive test (#5647)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-06 18:25:24 +01:00
ledgerwatch
94f4ea805d
Fixing hive SideChain reorg test (#5620)
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>
2022-10-05 05:42:38 +01:00
Andrew Ashikhmin
9ecc564d03
Demote "stage loop is busy" to debug (#5597) 2022-10-02 16:10:11 +01:00
Alex Sharov
37f76c9a9e
bitmapdb (#5593) 2022-10-02 10:54:40 +07:00
a
7c8b3c2ba1
[rpcdaemon] greatly increase speed of {eth,erigon}_getLogs (#5572) 2022-10-02 10:51:19 +07:00
ledgerwatch
7018c5e746
Ergonomic fixes for POS (#5574)
* Various POS fixes

* More quiet

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-29 22:17:16 +01:00
hexoscott
705673c336
increased logging around POS mining (#5442) 2022-09-20 13:15:56 +01:00
hexoscott
cd8cad6a89
allow multiple log subscriptions at the same time (#5358) 2022-09-16 14:36:25 +01:00
Andrew Ashikhmin
e5afa7292e
Potential improvement to CL timeouts (#5378)
* Strengthen early return when PoS syncing

* Be less aggressive about new payloads

* Less scary log message

* Clean up LVH in EngineStatus_SYNCING

* Slightly more correct message

* Try to fix Hive tests
2022-09-16 10:59:46 +02:00
Andrew Ashikhmin
18554a2f90
Revert "fix: relax deposit contract prune to first deposit (#5295)" (#5317)
This reverts commit d8c9b1151d.
2022-09-08 10:19:45 +02:00
banteg
d8c9b1151d
fix: relax deposit contract prune to first deposit (#5295) 2022-09-07 22:33:31 +03:00
ledgerwatch
693017c554
Cleanup Tevm experimental code (#5259)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-01 19:49:29 +01:00
Andrew Ashikhmin
4a7bcc73e1
Restore check against Beacon Chain requests before TTD (#5234)
* getPayloadStatusFromHashIfPossible -> getQuickPayloadStatusIfPossible

* Restore TTD check

* Amend log warning

* Restore full stop in comment

* 3 Hive tests are fixed now
2022-08-31 11:01:02 +02:00
fynn.z
9c713d8168
Fixed mining system contract txn lost (#5212)
* fix mining exec error

* fix invalid memory

* remove logs

Co-authored-by: Jeff Rossiter <jeffrey.rossiter@me.com>
2022-08-30 09:47:47 +07:00
Andrew Ashikhmin
465c586ef4
Fix description of --prune=r flag (#5193)
* Fix description of --prune=r flag

* Small correction
2022-08-26 18:36:31 +07:00
Andrew Ashikhmin
e2667d33cf
Amend log message and level (#5165) 2022-08-24 12:13:21 +02:00
Andrew Ashikhmin
b3d99f8e8c
Small cleanups (#5162) 2022-08-24 11:35:39 +02:00
Andrew Ashikhmin
4ca7394726
Small fix: log block RLP as hex (#5149) 2022-08-23 10:49:20 +02:00
Enrique Jose Avila Asapche
1cfb2fc7b4
fixed prune flag not working with htrc (#5139)
* fixed prune flag not working with htrc

* deleted repetition

* unnecesary check
2022-08-23 09:16:05 +07:00
Giulio rebuffo
1303023cb8
Optimized backend pre-checks and fixed FCU deadlock (#5124)
* Optimized backend pre-checks and fixed FCU deadlock

* fixed tests

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-20 16:27:51 +02:00
Andrew Ashikhmin
21699d929a
Log RLP of built PoS blocks (#5107) 2022-08-18 18:11:37 +02:00
Andrew Ashikhmin
25bdbe3de1
Access to EthBackendServer.builders should be protected by lock (#5106) 2022-08-18 18:11:12 +02:00
Enrique Jose Avila Asapche
c1eef706b3
checking if flag on (#5075)
Pruning is turning on by default when it shouldn't
2022-08-16 16:06:50 +03:00
Enrique Jose Avila Asapche
f0c7235f97
Pruning Receipts Default (#5065) 2022-08-15 17:21:18 +03:00
dmitriyselivanov
4499e04a05
rpcdaemon: wire the most recent of EthBackend.builders.block as a pending block into eth_getBlockByNumber (#5061) 2022-08-15 15:19:45 +07:00
Alex Sharov
52fd0d0e8b
Aggregator22.Unwind() (#5039)
* save

* save
2022-08-13 18:51:25 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
Giulio rebuffo
7a64fe44eb
UX improvement for pre-merge sync with Teku (#4955)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-08 11:26:34 +02:00
Leonard Chinonso
592fe32217
Refactoring To Increase Code Quality (#4842)
* General cleanup and fixes

* Cleaning part 2

* cleanup part 3

* Refactored staterunner to have a handler function

* Fixed linting

* Cleanup part 4

* Changed the initialization of the require package and updated .golangci.yml

* Fixed lint errors from golangci-lint

* deleted state_recon_1.go

* fixed build error

* Added ReadHeaderTimeouts for httpServer

* made changes to golangci

* Reset golangci.yml
2022-08-04 20:23:00 +07:00
Alex Sharov
aee4b53788
save list of snapshots in db (#4777)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-07-28 16:57:38 +07:00
Andrew Ashikhmin
c591266914
Small PoS clean-ups (#4834)
* Amend comment

* More watchful sleep

* improve comment

* Cosmetics for lock/unlock

* statusRef -> statusDeref

* Comment on obsure logic
2022-07-27 12:14:35 +02:00
Andrew Ashikhmin
c1f848746d
Update consensus tests to v11 (#4724)
* 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
2022-07-26 09:35:38 +02:00
Alex Sharov
b6ea28ea80
kv.Del() remove second parameter (#4832)
* save

* save

* save

* save

* save

* save

* save
2022-07-26 12:47:05 +07:00
Alex Sharov
3aac12a5f1
use PrioritizedSend method (#4830) 2022-07-26 10:37:51 +07:00
Giulio rebuffo
a372746397
Move some checks out enginePayload and fcu (#4805)
* made in refactoring

* test

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-24 16:20:08 +02:00
Giulio rebuffo
1cb6be02a5
Avoid constantly triggering stageloop when using Engine API (#4797)
* 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>
2022-07-23 18:57:23 +02:00
Andrew Ashikhmin
6060b87840
Fix binary vs raw confusion for PoS transaction (#4781)
* Replace PayloadMessage with Block

* RawTransactions -> BinaryTransactions for clarity

* add a log warning
2022-07-21 19:40:00 +02:00
Giulio rebuffo
d83b7a4ae0
Proper PoS Error reporting (#4631)
* better reporting

* removed debug log

* proper error reporting
2022-07-05 01:31:16 +02:00
Giulio rebuffo
3fc51f5ef7
Revert "Proper Pos block checker when INVALID/ACCEPTED status is sent (#4604)" (#4616)
This reverts commit e90e03ae31.
2022-07-03 13:11:16 +02:00
Giulio rebuffo
e90e03ae31
Proper Pos block checker when INVALID/ACCEPTED status is sent (#4604)
* added proper PoS block checker

* proper invalid lvh

* p

* fixed smol thingy

* fix more

* fixed engine API

* fixed engine API

* better nil hash

* added 0x0 checks

* full support
2022-07-03 11:58:57 +02:00
Giulio rebuffo
8558778ee2
fixed engine unit tests (#4581)
* fixed engine unit tests

* done
2022-06-30 02:27:34 +02:00