Commit Graph

90 Commits

Author SHA1 Message Date
Andrew Ashikhmin
b60642fa5a
Configure EIP-4844 parameters for Gnosis (#8464)
See https://github.com/gnosischain/specs/pull/20 &
https://github.com/gnosischain/specs/pull/24
2023-10-13 11:43:16 +02:00
Alex Sharov
6d9a4f4d94
rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00
Alex Sharov
404719c292
Medbx: add label to error messages, UpdateForkChoice: add ctx to erorrs, MemDb: increase db-limit from 512Mb to 512Gb (#8434) 2023-10-11 12:53:34 +07:00
Alex Sharov
b8d8003618
move memdb to own package - to reduce cycle deps (#8428) 2023-10-11 08:48:36 +07:00
Giulio rebuffo
2a5c51dc57
ValidateChain not reliant on stageBodies (#8411) 2023-10-09 17:24:12 +02:00
Somnath
66fe74dd12
Re-enable non-EIP155 unprotected txns (#8400)
Refer to linked issue https://github.com/ledgerwatch/erigon/issues/8381
2023-10-08 08:18:14 +07:00
Somnath
417e316ed5
Small log fix (#8382) 2023-10-05 12:32:43 +00:00
Giulio rebuffo
cb9495cc01
Fixed excessive garbage in temporary directory (#8366)
Somebody forgot to close temp dbs
2023-10-04 16:37:44 +02:00
Somnath
6dd7d8fe6a
Fix some hive tests (#8331)
Changes:
Reorder some Engine API invalid checks to be closer to specs/hive tests
Move the Engine API direct method names to `interfaces`
2023-10-01 12:42:27 +02:00
Andrew Ashikhmin
9da6b52dba
Add engine_forkchoiceUpdatedV3 to engine_exchangeCapabilities (#8259)
See
https://discord.com/channels/595666850260713488/892088344438255616/1154413019170869379
2023-09-21 16:23:48 +02:00
Mark Holt
3b45f53f3d
Milestone stage processing (#8187)
This is the second part of the bor milestone release it contains the
following changes:

* Initialize services
* This is a change from the initial pull request I have moved all of the
initialization to the bor engine. To facilitate this I have just passed
in the heimdall client interface, rather than the whole engine
* Stage processing 
* This is also a change from the original PR - the code is contained in
the bor heimdall stage rather than in headers - the effect should be the
same, but this needs testing

---------

Co-authored-by: Mark Holt <mark@disributed.vision>
Co-authored-by: Anshal Shukla <shukla.anshal85@gmail.com>
2023-09-18 18:05:33 +01:00
Andrew Ashikhmin
17d6f86218
Don't mark blocks as bad on transient errors (#8197)
For example, erigon on devnet8 marked a block as bad due to
"mdbx_cursor_open: cannot allocate memory":
```
[INFO] [09-12|04:57:36.041] [NewPayload] Handling new payload        height=171035 hash=0x321dea00c4853ee354bebaf8aef3e63fbe06c4508271c0db4c92b0f087aedc3b
171034
[WARN] [09-12|04:57:36.069] Could not validate block                 err="[3/7 BlockHashes] table: Header, mdbx_cursor_open: cannot allocate memory, stack: [kv_mdbx.go:1057 kv_mdbx.
go:1069 kv_mdbx.go:1077 memory_mutation.go:473 memory_mutation.go:502 etl.go:123 etl.go:96 block_writer.go:40 stage_blockhashes.go:49 default_stages.go:457 sync.go:425 sync.go:258 s
tageloop.go:414 backend.go:476 fork_validator.go:250 fork_validator.go:156 ethereum_execution.go:151 execution_client.go:51 chain_reader.go:252 engine_server.go:741 engine_server.go
:235 engine_server.go:600 value.go:586 value.go:370 service.go:224 handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]"
[WARN] [09-12|04:57:36.069] ethereumExecutionModule.ValidateChain: chain is invalid hash=0x321dea00c4853ee354bebaf8aef3e63fbe06c4508271c0db4c92b0f087aedc3b
```
With this PR blocks are marked as bad only on genuine protocol errors.
2023-09-17 11:14:36 +02:00
Giulio rebuffo
2f8687fe08
Smart SQL transactions (#8185) 2023-09-14 02:56:29 +02:00
Somnath Banerjee
a9c3c90347
Fix pre cancun conditions (#8152) 2023-09-07 22:15:26 +05:30
Alex Sharov
13fc0f2a7e
exec server: run 1st cycle not in global txn. run exec in async tx, run prune in sync tx. partial progress loss fix (partial fix) (#8128) 2023-09-06 08:48:07 +07:00
Giulio rebuffo
42101f529e
demote logs for fork validator (#8118) 2023-09-02 00:20:14 +02:00
Giulio rebuffo
b4cf5f5be4
Fixed canonical chain truncation (#8117) 2023-09-01 23:44:18 +02:00
Giulio rebuffo
f5cc67fe5b
Added ranges to the Execution.proto (#8081) 2023-08-26 02:25:48 +02:00
Andrew Ashikhmin
611145c385
updateForkChoice: send state changes to txpool after tx is committed (#8035)
[txpool](https://github.com/ledgerwatch/erigon-lib/blob/main/txpool/pool.go)
expects an `OnNewBlock` update only after the DB transaction is
committed.

This fixes, for example, a nonce gap mis-detection in Hive test
"engine-cancun/Blob Transactions On Block 1, Cancun Genesis".
2023-08-17 16:03:12 +02:00
Somnath Banerjee
143ff4695c
Fix 17 hive tests (#8014) 2023-08-14 09:24:59 +02:00
Andrew Ashikhmin
7947fc8ad1
Always encode EIP-4844 transactions unwrapped (without blobs) (#8012)
The only time we need to serialize blobs/commitments/proofs is when we
reply to `GetPooledTransactions` (and that's handled by the txpool).
2023-08-13 22:32:47 +05:30
Somnath Banerjee
b7070a9c08
Fix 12 hive tests (#8011) 2023-08-13 19:46:25 +05:30
Andrew Ashikhmin
9609ca9120
Fix JSON marshalling of BlobsBundleV1 (EIP-4844) (#8010)
According to the
[spec](https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#blobsbundlev1),
commitments/proofs/blobs in `BlobsBundleV1` should have the
[DATA](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#encoding)
encoding.
2023-08-13 15:43:55 +02:00
Giulio rebuffo
7c0d6e15bb
Added gnosis fields and removed body gap. (#7993) 2023-08-11 23:07:36 +02:00
Alex Sharov
c464d84334
tmpdb: move to tmpdir (#8003) 2023-08-12 01:06:15 +06:00
racytech
6785ff28e4
hive: minor fixes (EIP-4788) (#7985) 2023-08-09 13:44:21 +06:00
Giulio rebuffo
e3d642d6a0
Fixed EL integration spectest (#7975) 2023-08-06 17:13:36 +02:00
Andrew Ashikhmin
d69b20bc4e
Support engine_forkchoiceUpdatedV3 with ParentBeaconBlockRoot (EIP-4788) (#7969)
Prerequisites: https://github.com/ledgerwatch/interfaces/pull/187 &
https://github.com/ledgerwatch/erigon-lib/pull/1069. Also implement
https://github.com/ethereum/execution-apis/pull/426.
2023-08-06 11:54:14 +02:00
Giulio rebuffo
0e4e36b142
Replaced old version of Engine API with newer version (#7972) 2023-08-05 23:33:10 +02:00
Giulio rebuffo
9730cc796a
Cleanup of consensus separation (#7971) 2023-08-05 02:26:53 +02:00
Giulio rebuffo
b09d90ee0e
Added in-memory flushing to execution.proto (#7968) 2023-08-04 14:42:35 +02:00
Giulio rebuffo
c08aa3ac03
fix undownloaded body (#7966) 2023-08-04 02:22:07 +02:00
Giulio rebuffo
29935a65f4
Fixed hive tests in consensus separation (#7961) 2023-08-03 03:39:47 +02:00
Andrew Ashikhmin
bd9e8b9b56
Fix eth_getTransactionByHash for EIP-4844 transactions (#7960)
Also pick https://github.com/ledgerwatch/erigon-lib/pull/1063 and
https://github.com/ledgerwatch/erigon-lib/pull/1065
2023-08-02 18:25:15 +02:00
Somnath Banerjee
3e5b9d7490
Fix newPayload parentBeaconBlockRoot check (#7955) 2023-08-02 09:34:13 +02:00
Somnath Banerjee
d91f4263dc
EIP-4788: Beacon block root and stateful precompile (#7888) 2023-08-01 16:01:26 +05:30
Giulio rebuffo
1220ae659e
Most hive tests fixed in --experimental.modular (#7950)
Broken: 25/109
2023-08-01 02:08:15 +02:00
Andrew Ashikhmin
03ac80ad2d
EIP-4844: rename "data hash" to "blob hash" (#7947)
See https://github.com/ethereum/EIPs/pull/7001
2023-07-31 10:12:53 +02:00
Giulio rebuffo
443757edbd
Consensus separation for Engine API (Working on Sepolia) (#7945)
This makes the experimental consensus separation functional on sepolia.
2023-07-30 23:35:55 +02:00
Andrew Ashikhmin
5693439521
EIP-4844: Verify expectedBlobVersionedHashes (#7946)
See the
[engine_newpayloadv3](https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3)
spec
2023-07-30 17:10:54 +02:00
racytech
af884204cb
eip-4844: hive tests: RLP decode order and newPayloadV3 to expect versionedHashes (#7943) 2023-07-30 15:49:31 +02:00
Giulio rebuffo
2f2a1741d2
Protyped consensus separated engine api (untested) (#7942) 2023-07-29 00:22:38 +02:00
Andrew Ashikhmin
7d35c6b737
EIP-4844: Rename "data gas" to "blob gas" (#7937)
See https://github.com/ethereum/EIPs/pull/7354 &
https://github.com/ethereum/consensus-specs/pull/3461. Prerequisite:
https://github.com/ledgerwatch/erigon-lib/pull/1058
2023-07-28 12:12:05 +02:00
Giulio rebuffo
a0865b489f
Prototyped experimental engine reverse downloader (#7936)
Erigon lib now good
2023-07-28 01:32:19 +02:00
Giulio rebuffo
b4ecd7f524
Consensus Separation: Separated GetPayload using an execution service (#7933)
Miracoulously, hive tests pass first try. YIPPIE.

Also for the future, I added `--experimental.modular` which enables a
secondary engine API for consensus separation.

Now block building is responsibility of the execution module.
2023-07-27 14:37:49 +02:00
Giulio rebuffo
f5f833fd70
Proper Error handling in direct communication with engine (#7929) 2023-07-25 14:15:50 +02:00
Giulio rebuffo
39853432be
added --experimental.modular (#7925) 2023-07-24 18:04:36 +02:00
Giulio rebuffo
837ffb5b7e
Refactored ForkValidator to be Database-only (#7920) 2023-07-23 14:51:26 +02:00
Giulio rebuffo
bd63cb7c8c
Removed GRPC layer from Engine API (#7878) 2023-07-12 18:11:41 +02:00
Giulio rebuffo
6272559fb7
Separated PendingBlock behaviour to be chain agnostic (#7859)
Instead of getting the pending block with latest payload id, we just
store the latest block built and serve it in remote backend
2023-07-10 19:22:03 +02:00