Commit Graph

17705 Commits

Author SHA1 Message Date
ledgerwatch
36a1e43dfe
Skip one integration test (#7031)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-06 11:58:03 +00:00
Max Revitt
24773f08bb
fix(release): use buildx for docker image (#7030) 2023-03-06 11:47:48 +00:00
Alex Sharov
e3caa3cbba
e3: don't loose last txnum (#7028) 2023-03-06 09:19:30 +00:00
ledgerwatch
1ab083316b
More block snapshots for ETH mainnet, goerli and gnosis (#7026)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-06 08:58:58 +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
Giulio rebuffo
9101fdadcc
Long keys and finalization markers added. (#7024) 2023-03-05 19:15:17 +00:00
Giulio rebuffo
7eda83f81a
Merged beacon indexing with other stages (#7023) 2023-03-05 16:11:35 +00:00
Giulio rebuffo
aea6f86cab
refactored state transition and removed transistor (#7021) 2023-03-04 21:14:45 +00:00
Giulio rebuffo
90ed3c1cb0
optimized state roots cache for erigon-cl (#7020) 2023-03-04 16:28:20 +00:00
awskii
e48609ee8d
E4 btree-like indexes (#6834)
This branch implements support of btree indexes instead of .kvi files.
Kvi also created, but not used during search/lookup, only for size
comparation.

Btree allows to make seek calls, while recsplit indexes does not support
that query.
During initial tests, btree indexes are ~1-3% smaller than recsplit but
avg lookup time bigger up to 1.5us (which compensates with ability to
fetch next key).

BtAlloc
```
337000 searches, last took 5.417µs avg=4.385µs next_access_last[of 10000 keys] 105ns
338000 searches, last took 3.792µs avg=4.385µs next_access_last[of 10000 keys] 103ns
339000 searches, last took 5.125µs avg=4.386µs next_access_last[of 10000 keys] 103ns
340000 searches, last took 4.75µs avg=4.386µs next_access_last[of 10000 keys] 103ns
341000 searches, last took 3.875µs avg=4.386µs next_access_last[of 10000 keys] 104ns
342000 searches, last took 6.042µs avg=4.387µs next_access_last[of 10000 keys] 107ns
343000 searches, last took 3.209µs avg=4.388µs next_access_last[of 10000 keys] 108ns
344000 searches, last took 2.292µs avg=4.393µs next_access_last[of 10000 keys] 113ns
345000 searches, last took 2.417µs avg=4.394µs next_access_last[of 10000 keys] 106ns
346000 searches, last took 2.625µs avg=4.394µs next_access_last[of 10000 keys] 103ns
347000 searches, last took 4.417µs avg=4.397µs next_access_last[of 10000 keys] 104ns
348000 searches, last took 5.458µs avg=4.398µs next_access_last[of 10000 keys] 103ns
349000 searches, last took 4.875µs avg=4.4µs next_access_last[of 10000 keys] 102ns
350000 searches, last took 4.25µs avg=4.4µs next_access_last[of 10000 keys] 104ns
351000 searches, last took 6.25µs avg=4.403µs next_access_last[of 10000 keys] 106ns
352000 searches, last took 3.125µs avg=4.404µs next_access_last[of 10000 keys] 106ns
```

Recsplit
```
354000 searches, last took 1.209µs avg=3.081µs
355000 searches, last took 1.333µs avg=3.076µs
356000 searches, last took 1.541µs avg=3.071µs
357000 searches, last took 1.333µs avg=3.066µs
358000 searches, last took 1.333µs avg=3.062µs
359000 searches, last took 1.167µs avg=3.057µs
360000 searches, last took 1.791µs avg=3.052µs
361000 searches, last took 1.209µs avg=3.048µs
362000 searches, last took 1.375µs avg=3.043µs
363000 searches, last took 1.166µs avg=3.038µs
364000 searches, last took 1.625µs avg=3.033µs
365000 searches, last took 1.125µs avg=3.029µs
366000 searches, last took 1.208µs avg=3.024µs
367000 searches, last took 1.333µs avg=3.019µs
368000 searches, last took 1.791µs avg=3.015µs
369000 searches, last took 1.333µs avg=3.01µs
370000 searches, last took 1.166µs avg=3.006µs
371000 searches, last took 1.125µs avg=3.001µs
372000 searches, last took 1.333µs avg=2.997µs
```

https://github.com/ledgerwatch/erigon-lib/pull/891/files
2023-03-04 03:19:25 +00:00
Giulio rebuffo
aadf56376f
Passing operations consensus tests. (#7018) 2023-03-03 22:52:33 +00:00
Jochen Müller
da369fedac
Fix test in devnet tool (#7019)
- invalid gas price range with max < min
- nonce bumped for transactions that will not be mined
2023-03-03 16:20:45 +00:00
ledgerwatch
5622031b5a
Bump version (#7017) 2023-03-03 16:10:11 +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
ledgerwatch
19cf4fedb6
Patch up erigon3 integration test (#7016)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-03 16:08:53 +00:00
Andrew Ashikhmin
e3906130ae
Rename SHARDING_FORK to DENEB_FORK (#7014)
See https://github.com/eth-clients/goerli/pull/160
2023-03-03 14:51:57 +00:00
Andrew Ashikhmin
aa9b9bdd1c
Schedule Shapella on Görli/Prater (#7012)
See https://github.com/ethereum/execution-specs/pull/724 &
https://github.com/eth-clients/goerli/pull/160
2023-03-03 13:27:36 +00:00
Alex Sharov
b4e24bff3b
bor: generic lru v2 (#7011) 2023-03-03 10:34:19 +00:00
Thorsten Hirsch
a5144e0312
add ENTRYPOINT to Dockerfile and Dockerfile.debian (#6966)
Providing an ENTRYPOINT in Dockerfiles is best practice, so I've added
an ENTRYPOINT to Dockerfile and Dockerfile.debian, setting it to erigon,
because it's the binary most people want to run. The setting can be
overridden in the ` docker run` command to execute different binaries.
Currently everybody has to override it anyway, because there's neither a
CMD nor an ENTRYPOINT given.

The Dockerfile.release already contains the ENTRYPOINT erigon.

P.S.: This PR originated in #6862.
2023-03-03 10:11:59 +00:00
Max Revitt
bf1d08c8cc
feat(release): github action, build script, and release manager (#6818)
- [x] setup infra
- [x] provide readme
- [x] setup secrets (keys) for infra
- [x] resolve todos
- [x] remove unnecessary test actions triggers
- [x] update go path (should be installed on runner properly - unlike my
self hosted quick setup)
- [x] provide docs on using checksum and signature to verify the binary
2023-03-03 10:11:28 +00:00
ledgerwatch
7346c8fbb6
Extend mock_sentry to properly support forkValidator (#7008)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-03 07:00:54 +00:00
alex.sharov
086398777e fix headers reset 2023-03-03 09:53:01 +07: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
Giulio rebuffo
2ff8f3bee0
refactored eftests so that they are not ugly (#7003) 2023-03-02 15:42:11 +00:00
Giulio rebuffo
d6ba1b65c8
Added removeStreamHandler again (#6996) 2023-03-02 14:22:03 +00:00
Anshal Shukla
c4ba26107e
Rpc get code (#6899)
This in conjuction with
[PR#893](https://github.com/ledgerwatch/erigon-lib/pull/893) fixes the
eth_getCode RPC call.
2023-03-02 14:12:16 +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
ledgerwatch
d865b6405c
Fix nil pointer panic in tracing (#7000)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-03-02 10:34:29 +00:00
Leonard Chinonso
599fc24aed
Devnet Test for EIP1559 (#6938)
**Current Problem**

When X transactions are created, with M transactions out of them having
`gasFeeCap` greater than the current `baseFeePerGas` for the block, and
N transactions having `gasFeeCap` lower, all X transactions get added to
the yellow pool (baseFee) in the txpool and they never get mined.
However when X transactions all having `gasFeeCap` higher than the
`baseFeePerGas` are created, they all get added to the green pool
(pending) in the txpool and thus get mined.

This phenomenon can be inspected in the
`signEIP1559TxsLowerAndHigherThanBaseFee2` function where the number of
transactions that should have `gasFeeCap` higher than and lower than the
current `baseFeePerGas` is specified in its parameter - `func
signEIP1559TxsLowerAndHigherThanBaseFee2(amountLower, amountHigher
int...`.
When `amountLower` is set as `0`, all transactions created from
`amountHigher` will be mined because they have `gasFeeCap` >
`baseFeePerGas`. When `amountLower` has a value > `0`, all the
transactions created (including transactions created with
`amountHigher`) will go to the yellow pool (baseFee) and thus do not get
mined.
2023-03-02 10:25:11 +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
e4c010d590
win: bls portable flags (#6997) 2023-03-02 03:46:28 +00:00
hexoscott
0b19aaaabf
gnosis trace issue fix (#6995)
To fix #6798 

Follows the same pattern as other temporary fixes for BSC.

Tested locally and the transaction in question shows the same behaviour
as nethermind, coming to the same gas used and reverted behaviour by the
end. Tracing the block also works as expected now.

Tracing a transaction after the fork at 21735000 loads up the new
contract as expected as well.
2023-03-01 21:29:10 +00:00
Alex Sharov
8406cb7899
e3: exec workers - can't treat all errors as "state conflict", because applyLoop will get same error and handle them well (#6993) 2023-03-01 09:55:29 +00:00
Jochen Müller
a0ffa454ec
Remove unused code from Node struct (#6978)
The server attribute was only still used in a broken, skipped unit test
which we may rewrite later
2023-03-01 08:04:27 +00:00
Marius Kjærstad
8ab3be0d5d
Fix typo in snappy.rst (#6992)
Fix typo in snappy.rst
2023-03-01 08:03:31 +00:00
Alex Sharov
d6d142c4b0
switch sentinel to lru/v2 generic cache (#6990) 2023-03-01 08:00:46 +00:00
Alex Sharov
a4f69abb97
e3: less locks, less casts (#6991) 2023-03-01 07:59:56 +00:00
alex.sharov
4fd421a3f0 use correct mdbx version in go.mod 2023-03-01 13:13:57 +07:00
alex.sharov
85df06ca26 remove zstd dependency 2023-03-01 12:57:15 +07:00
alex.sharov
4e5f14c4c1 Revert "e3: faster apply (#6970)"
This reverts commit 4b4d27195c.
2023-03-01 10:11:30 +07:00
Alex Sharov
031292cc83
evm: prealloc zeroes for Resize() (#6624) 2023-03-01 02:43:32 +00:00
nanevardanyan
cf9ee425ed
check for TransactionsV3 flag (#6988) 2023-03-01 02:13:12 +00:00
Giulio rebuffo
f97550c48f
Fixed capella startup for LC (#6989) 2023-02-28 21:17:10 +00:00
Alex Sharov
570ff33e88
e3: result size atomic change after processResultQueue (#6975) 2023-02-28 09:35:13 +00:00
Giulio rebuffo
edcd271f72
Added capella SSZ tests (#6965) 2023-02-27 23:33:10 +00:00
Alex Sharov
b3c49af086
e3: aggressive drain resultCh to heap before start conflict-resolution (#6979) 2023-02-27 13:08:33 +00:00
Roberto Bayardo
f01e3d1717
handle nil update return values without panic (#6941)
Saw this when trying to sync goerli today:


```
INFO[02-23|11:10:20.611] [2/15 Headers] Waiting for Consensus Layer...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x14a58dd]

goroutine 11484998 [running]:
github.com/ledgerwatch/erigon/cl/cltypes.(*LightClientOptimisticUpdate).EncodingSizeSSZ(0x0)
        github.com/ledgerwatch/erigon/cl/cltypes/lightclient.go:620 +0x1d
github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/communication/ssz_snappy.EncodeAndWrite({0x77f6a74bc058?, 0xc03912b100?}, {0x2c2f628, 0x0}, {0xc022ad9f
5c, 0x1, 0x1})
        github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/communication/ssz_snappy/encoding.go:34 +0xae
github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/handlers.(*ConsensusHandlers).lightClientOptimisticUpdateHandler(0xc021f0d500, {0x2c57c28, 0xc03912b100
})
        github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/handlers/lightclient.go:82 +0x19d
github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).SetStreamHandler.func1({0xc085e0fa90, 0x42}, {0x77f6a74bbfe8?, 0xc03912b100})
        github.com/libp2p/go-libp2p@v0.25.1/p2p/host/basic/basic_host.go:580 +0x76
created by github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).newStreamHandler
        github.com/libp2p/go-libp2p@v0.25.1/p2p/host/basic/basic_host.go:421 +0x74f

```
2023-02-27 10:00:49 +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