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
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
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
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
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
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
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
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
e2667d33cf
Amend log message and level ( #5165 )
2022-08-24 12:13:21 +02:00
Andrew Ashikhmin
4ca7394726
Small fix: log block RLP as hex ( #5149 )
2022-08-23 10:49:20 +02: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