Commit Graph

1126 Commits

Author SHA1 Message Date
Shane Bammel
5df5fd995b Refactor and simplify PulseChain integration 2023-03-30 18:03:29 -05:00
bretep
293afaa131 Initial PulseChain integration
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
2023-03-30 18:03:22 -05:00
Alex Sharov
e3caa3cbba
e3: don't loose last txnum (#7028) 2023-03-06 09:19:30 +00:00
Alex Sharov
645797d8bf
e3: no early by drain (#7027) 2023-03-06 08:43:32 +00:00
ledgerwatch
ed95056a6d
Break out of staged sync step when bad block is found (#7025)
Fixes https://github.com/ledgerwatch/erigon/issues/6982

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-06 07:58:44 +00:00
Anshal Shukla
1bf302bcd8
Headers POW updated (#6983)
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.
2023-03-03 16:09:46 +00:00
Andrew Ashikhmin
1dab298db7
Add Prague fork support (#7005)
Prague is the next EL fork after
[Cancun](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md).
This change picks up https://github.com/ledgerwatch/erigon-lib/pull/913,
adds support of the fork, and moves Verkle trees to it.
2023-03-02 17:51:36 +00:00
ledgerwatch
217ddc753d
Skeleton for unwind test, tidy up bodies cache (#7001)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-02 14:09:48 +00:00
Andrew Ashikhmin
3a25fb45fb
Allow snapshot block execution before waiting for CL (#6947)
This gives Erigon a chance to execute snapshot blocks before CL is
ready. Not sure why it was commented out in PR #5684.
2023-03-02 10:12:23 +00:00
Alex Sharov
a4f69abb97
e3: less locks, less casts (#6991) 2023-03-01 07:59:56 +00:00
Alex Sharov
570ff33e88
e3: result size atomic change after processResultQueue (#6975) 2023-02-28 09:35:13 +00:00
Alex Sharov
b3c49af086
e3: aggressive drain resultCh to heap before start conflict-resolution (#6979) 2023-02-27 13:08:33 +00:00
Alex Sharov
c4cce3d2d4
e3: update speed metric after processResultQueue (#6974) 2023-02-27 15:38:21 +07:00
Alex Sharov
955d2761bc
e3: update atomics outside of processResultQueue (#6973) 2023-02-27 08:19:05 +00:00
Alex Sharov
daf1522914
e3: handle zero metric (#6972) 2023-02-27 14:30:40 +07:00
Alex Sharov
4a89361845
e3: remove inblock variable (#6968) 2023-02-27 06:57:35 +00:00
nanevardanyan
ab6239b30f
WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
Alex Sharov
c534453654
e3: exec retry once (#6943) 2023-02-24 05:57:17 +00:00
Alex Sharov
ddcb1c90cd
e3: don't collect readList in ApplyWorker, because it's conflict-free (#6916) 2023-02-21 05:11:45 +00:00
alex.sharov
26106769d3 e3: simplify mutex 2023-02-15 10:56:45 +07: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
alex.sharov
2ba835012a e3: a bit simplify 2023-02-14 15:19:08 +07:00
alex.sharov
4dab4dc0cf cleanup 2023-02-14 13:15:13 +07:00
alex.sharov
199ce9bfb3 save 2023-02-14 13:14:27 +07:00
Alex Sharov
45ffd2368b
e3: don't cancel workers (#6869) 2023-02-14 06:13:27 +00:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
Alex Sharov
60a4b8bc7b
Snapshots Indexing: avoid loop with semaphore locking before logging (#6845) 2023-02-12 02:49:20 +00:00
Alex Sharov
98a8ca50fe
erigon3 snapshots version 3 (#6811) 2023-02-09 13:51:51 +07:00
Alex Sharov
145f689e78
less logs about compression (#6812) 2023-02-09 12:28:09 +07:00
Alex Sharov
ec52990c43
e3: Thread safe reopen folder (#6810) 2023-02-09 12:11:40 +07:00
Alex Sharov
a75a948beb
e3: MakeContext must not see garbage files (deleted, overlapped, etc...). make it cheaper. (#6803) 2023-02-08 12:50:47 +07:00
Alex Sharov
e6e07fec72
e3: exec to stop workers return (#6801) 2023-02-08 09:53:43 +07:00
Alex Sharov
aaec53857f
e3: last reader to close/remove merged files (marked as canDelete) inside tx.Rollback() (#6738) 2023-02-01 15:44:13 +07:00
Alex Sharov
dfca60c054
e3: indices wal - to reuse etl collector (#6757) 2023-02-01 10:02:29 +07:00
Andrew Ashikhmin
004c5afdfa
Avoid unnecessary unwind+rewind (#6712)
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.
2023-01-30 15:42:23 +01:00
Alex Sharov
b99e4abb3e
move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
Alex Sharov
d908f57528
Senders: nil check (#6717) 2023-01-27 10:19:33 +07:00
Alex Sharov
82c478a419
e3: getLogs on iterators (#6683) 2023-01-25 16:29:41 +07:00
Andrew Ashikhmin
37741b74eb
Remove erigon_issuance & erigon_watchTheBurn (#6685)
Some issuance happens on the CL side now, so removing support for these
now inaccurate proprietary methods to make our life easier.
2023-01-24 22:54:08 +01:00
ledgerwatch
5e205f61c0
More tweaks for BSC headers (#6662)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-22 14:19:16 +00:00
Alex Sharov
4fbbdf9186
e3: move txnum to erigon-lib (#6663) 2023-01-22 19:39:33 +07:00
ledgerwatch
706a999178
Improvements for the BSC stuck header sync (#6653)
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>
2023-01-22 12:28:17 +00:00
ledgerwatch
2c3299d073
Better logging for body writing (#6634)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-20 00:04:47 +00:00
ledgerwatch
f2111b4132
Another fix for body download (#6633)
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>
2023-01-19 23:05:38 +00:00
ledgerwatch
44b834e77a
Further fixes for body downloader (#6610)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-17 22:03:28 +00:00
ledgerwatch
19ce8d2a8f
stage_headers: use block time instead of "topSeenHeight" to determine when it is in sync (#6602)
This is more reliable criterion because it is harder to spoof
continuously by malicious peers

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-17 17:28:02 +00:00
ledgerwatch
0bea0437bf
Deal with the situation when body cache is too small (#6601)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-01-17 12:52:07 +00:00
Alex Sharov
5ad4eb936a
split backend.go:new to 2 funcs (#6595)
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.
2023-01-17 13:20:31 +07:00
Alex Sharov
97a769cfc1
e3: increase some defaults (#6592) 2023-01-17 09:14:17 +07:00
ledgerwatch
cfb0d99cfa
Improvements for body downloader (#6589)
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>
2023-01-16 22:09:28 +00:00