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
Giulio rebuffo
20b8e156db
moved cmd/rpcdaemon/commands -> turbo/jsonrpc ( #7858 )
2023-07-08 19:01:26 +02:00
Enrique Jose Avila Asapche
bff1e0e901
[Caplin] Added json rpc cl ( #7836 )
...
Allows for Caplin to be used with other ELs from aside of Erigon
---------
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-07-08 16:42:30 +02:00
Giulio rebuffo
84f31c873e
Separation of Engine from Ethbackend ( #7821 )
...
This PR separates ENGINE from Ethbackend. It makes it so:
1) EthBackend not a god class
2) We can abstract away engine API so that we can make it CL-like and
enable Consensus-Execution driven design
3) Objective is Json-RPC -> Engine Consensus Module -> Execution module.
2023-07-06 18:09:52 +02:00
Alex Sharov
3cba3908dd
use BlockReader.CanonicalHash method instead of rawdb ( #7604 )
2023-05-31 13:41:10 +07:00
Alex Sharov
af83845f7e
cheaper isCanonicalHash func, less lookups of blockHash by blockNum in rpc ( #7603 )
2023-05-31 11:26:38 +07:00
Alex Sharov
63afe65686
Use BlockReader in ForkValidator, CliqueAPI ( #7562 )
2023-05-23 14:49:17 +07:00
Alex Sharov
9001f668a7
go 1.19 atomics ( #7164 )
2023-03-23 05:11:28 +00:00
hexoscott
80a37eb209
stop writing to closed channel panic ( #6763 )
2023-02-06 18:17:32 +07:00
hexoscott
f13016c7ec
Fork choice is waiting fix ( #6711 )
2023-01-30 07:52:29 +00:00
ledgerwatch
0ccda84439
Fix defer order to prevent concurrent map write panic ( #6736 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-29 09:06:36 +00:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00