ledgerwatch
6b6c0caad0
Snapshots of Bor events ( #7901 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-mbp-2.home>
2023-08-18 17:10:35 +01: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
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
Andrew Ashikhmin
a5886732b9
Use BitLenToByteLen from erigon-lib ( #7735 )
2023-06-14 14:48:16 +02:00
omahs
c21d77aa20
Fix: typos ( #7710 )
...
Fix: typos
2023-06-12 14:39:52 +07:00
Alex Sharov
bf9f5067f3
fix integration tests run ( #7672 )
2023-06-06 13:49:01 +07:00
Alex Sharov
d40317c905
preparation for --txs.v3, step 2 ( #7636 )
2023-06-03 07:20:22 +07:00
Andrew Ashikhmin
190bc9dfd8
EIP-4844: add data_gas_used ( #7639 )
...
Implement https://github.com/ethereum/EIPs/pull/7062 and
https://github.com/ethereum/EIPs/pull/7095 . Pick up
https://github.com/ledgerwatch/erigon-lib/pull/1006 .
2023-06-02 21:26:19 +01:00
Andrew Ashikhmin
b2a90e0ea9
Merge EngineGetPayloadWithBlobs into EngineGetPayload ( #7637 )
...
Pick up https://github.com/ledgerwatch/interfaces/pull/171 &
https://github.com/ledgerwatch/interfaces/pull/173
2023-06-02 13:02:13 +02:00
ledgerwatch
067f695fff
[devnet tool] Separate logging ( #7553 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-20 14:48:16 +01:00
ledgerwatch
2a872b4d54
[devnet] separare logging - headers download ( #7551 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-20 07:00:19 +01:00
ledgerwatch
b382f96f6c
Introduce logger into etl ( #7537 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-18 21:20:07 +01:00
ledgerwatch
05597cb195
[devnet tool] separare logging ( #7531 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-17 17:36:15 +01:00
ledgerwatch
bc169179b0
[devnet tool] Side-quest: logging step 7 ( #7506 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-13 21:22:30 +01:00
Andrew Ashikhmin
771c6fc202
Rename Serenity consensus engine to Merge ( #7475 )
...
[EIP-2982](https://eips.ethereum.org/EIPS/eip-2982 ) "Serenity Phase 0"
was superseded by [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675 )
"Upgrade consensus to Proof-of-Stake"
2023-05-09 18:45:33 +01:00
Andrew Ashikhmin
cc11462860
Prioritize eth/68 by default ( #7463 )
...
Set `DefaultConfig.ProtocolVersion` to [68, 67, 66] instead of [67, 68].
See https://github.com/ethereum/hive/pull/776
2023-05-08 16:03:59 +02:00
racytech
726ce264ef
eip-4844: RPCTransactions to support BlobTx ( #7407 )
...
Small additions to support eip-4844 transaction marshalling
2023-04-30 14:03:38 +07:00
racytech
6588bca40b
eip-4844: NewMessage now expectes maxFeePerDataGas & GetPayloadV3 impl ( #7365 )
...
types.NewMessage now expects maxFeePerDataGas param, which will be used
in transaction verification (preCheck). GetPayloadV3 method added to
EngineAPI. Some cosmetic changes applied.
2023-04-23 18:27:05 +01:00
Andrew Ashikhmin
762b63eb14
More logging for block build requests ( #7264 )
2023-04-05 15:30:45 +00:00
Andrew Ashikhmin
db726a0a3d
Release transaction in EngineGetPayloadBodiesByRangeV1 (and by hash) ( #7199 )
...
Should hopefully help with Issue #7172
2023-03-28 15:27:14 +00:00
racytech
70bc7f7a25
eip-4844: small additions and modified gaspool ( #7190 )
...
This PR contains very small EIP-4844 additions. GasPool is modified and
now it is a struct with 2 fields "gas" and "dataGas" (blobs are priced
in dataGas). ExcessDataGas block header field added. ExcessDataGas
needed to compute the data gas price. EIP-4844 helper functions are
added as well.
2023-03-27 21:39:15 +00:00
Andrew Ashikhmin
0025783123
Protection against duplicate requests to build the same block ( #5795 )
...
If I'm not mistaken, some CLs in some circumstances can send duplicate
requests to build a block. This is a protection against throwing away
progress in case block building has already started.
2023-02-21 09:24:59 +00:00
Andrew Ashikhmin
58fcc04575
blockValue should use gasUsed rather than gasLimit ( #6875 )
...
Fees going to the gas fee recipient should be based on the actual gas
used (available in the receipt) rather than the gas limit in a
transaction. This fixes Hive test "GetPayloadV2 Block Value".
Also `engine_getPayloadBodiesByRangeV1` params should be encoded as hex
strings.
2023-02-14 15:05:27 +00:00
hexoscott
f370e6ee0d
fix timing issue in stageLoopIsBusy ( #6871 )
2023-02-14 11:18:38 +00:00
Alex Sharov
d6fdbb8e7b
e3: return list of e3 files by grpc ( #6828 )
2023-02-10 13:53:08 +07:00
Alex Sharov
7c9f30d25b
e3: return list of e3 files by grpc ( #6827 )
2023-02-10 13:45:33 +07:00
Andrew Ashikhmin
2fa448c45f
Validate params of GetPayloadBodiesByHash and ByRange ( #6785 )
...
See https://github.com/ethereum/execution-apis/pull/366 and
https://github.com/ethereum/execution-apis/pull/370 .
Also fix a couple of issues so that the Hive tests pass.
2023-02-06 18:38:45 +01:00
hexoscott
80a37eb209
stop writing to closed channel panic ( #6763 )
2023-02-06 18:17:32 +07:00
Philippe Schommers
f9ab76f9ef
feat: add deposit contract blocks for Gnosis ( #6776 )
...
From what I understand, this should be sufficient to add `--prune=r`
support for Gnosis and Chiado.
2023-02-06 09:04:44 +07:00
hexoscott
d9937b5628
remove prints from ethbackend ( #6755 )
2023-02-01 10:58:32 +00:00
hexoscott
f13016c7ec
Fork choice is waiting fix ( #6711 )
2023-01-30 07:52:29 +00:00
Alex Sharov
b99e4abb3e
move math big constants to erigon-lib ( #6719 )
2023-01-27 11:39:34 +07:00
hexoscott
4dcba50e99
engine payload bodies rpc endpoints ( #6644 )
...
Very basic implementation for get payload bodies rpc calls. Once we have
Hive tests for these calls I can pick this back up and work through any
issues.
Implementation of https://github.com/ethereum/execution-apis/pull/352 .
2023-01-24 13:37:03 +01:00
Andrew Ashikhmin
aa5b79f428
Replace INVALID_BLOCK_HASH with INVALID ( #6671 )
...
See https://github.com/ethereum/execution-apis/pull/338
2023-01-23 14:28:46 +01:00
Andrew Ashikhmin
9927ca3171
Unify Engine API V1 & V2 methods ( #6638 )
...
Reduce code duplication.
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/841 .
2023-01-20 18:43:08 +01:00
Max Revitt
3837d6d26d
fix: payload version error return ( #6618 )
...
See https://github.com/ethereum/execution-apis/pull/337
2023-01-18 14:31:25 +01:00
Andrew Ashikhmin
7fb5cecce8
Allow NewPayloadV2 for pre-Shanghai blocks ( #6604 )
...
This is a fix for
[withdrawal-devnet-3](https://forkmon.withdrawal-devnet-3.ethpandaops.io/ ).
The problem was that CL calls `NewPayloadV2` for pre-Shanghai blocks
with `nil` withdrawals, which is OK, but that `nil` was erroneously
converted into an empty array, causing block hash mismatch.
2023-01-17 16:26:44 +00:00
Andrew Ashikhmin
f151a52c0e
Withdrawal amount in GWei ( #6578 )
...
See https://github.com/ethereum/execution-apis/pull/354 &
https://github.com/ethereum/EIPs/pull/6325 .
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/832 .
2023-01-17 11:22:08 +01:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00
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