Sign block using correct chainId
Add IsPulseChain to config
Add support for pulsechain blocks and snapshots
Add support for chain config now located in erigon-lib
Fix decoding hex to int
Ensure pulsechain config
Add support for PulseChain snapshots
Currently the only way the `noProgressCounter` resets is when it
discovers that the chain has forked from the cannonical chain which
leads to lack of anchor state logs.
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.
On
[withdrawal-mainnet-shadowfork-1](https://withdrawal-mainnet-shadowfork-1.ethpandaops.io/)
erigon was unnecessarily re-executing blocks after 16m (snapshot)
multiple times. That was likely due to CL issuing `forkchoiceUpdated`
pointing to an old block for some reason. This PR introduces a
protection against such inefficiency.
There are 3 changes:
1. Replace `anchorQueue` with `anchorTree` to be able to always walk the
anchors in the order of increasing blockHeights (not possible with the
queue) to prioritise making progress on the lowest block heights
2. Not increment `nextRetryTime` if the request was not sent
3. Reduce the strides in skeleton from `8*192` to `192` to reduce
reliance of the long series of requests to make progress
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
When body gets evicted from the cache, its corresponding entry in
`requestMap` is also removed but was never re-instated when re-request
happens
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This is more reliable criterion because it is harder to spoof
continuously by malicious peers
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Split backend.go:New method to 2. 1st will create db and basic
configuration. 2nd will create instances of stagedsync, txpool, etc...
based on this configuration.
1. Replacing temporary MBDX table with limited-size btree
2. Always scan block numbers from the start to prioritise low-number
blocks
3. Other fixes and simplifications
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>