Commit Graph

16980 Commits

Author SHA1 Message Date
Alex Sharov
4ead27fad9
e3: add "make test3" to CI (#5910) 2022-10-31 14:25:52 +07:00
Alex Sharov
381bea5b92
e3: eth_traceTransaction implementation (#5909) 2022-10-31 12:31:38 +07:00
Alex Sharov
fb5ce32de9
e3: more mainnet snapshots (#5867) 2022-10-31 09:20:58 +07:00
Leonard Chinonso
bb780a06d3
Tested functionalities for request_generator (#5905)
- Added tests for request_generator in devnet
- Added tests for request_generator in rpctests
2022-10-30 19:54:09 +07:00
Giulio rebuffo
adf5fc7b82
refactored files regarding lightclient (#5904) 2022-10-29 21:51:32 +02:00
Alex Sharov
8c36c3fe99
e3: recon progress metric (#5902) 2022-10-29 21:51:01 +07:00
Alex Sharov
0e23ecda87
e3: more merge logs (#5900) 2022-10-29 21:13:12 +07:00
Alex Sharov
fde630f76b
e3: wal preallocate historyKey #713 (#5899) 2022-10-29 19:18:35 +07:00
Mike Neuder
dab1ba44d0
Test req/resp domain response decoding (#5886)
https://github.com/ledgerwatch/erigon/issues/5884 has more context on
this issue. we are trying to understand the encoding of the responses.

from the Ethereum R&D discord, AgeManning said that the prefix is
supposed to be a varint representing the length of the payload:
https://developers.google.com/protocol-buffers/docs/encoding#varints.

that works for the `&cltypes.MetadataV1{}` type, but not for
`&cltypes.MetadataV2{}` or `&cltypes.LightClientFinalityUpdate{}`.
2022-10-29 13:02:26 +02:00
Alex Sharov
ba02673e4d
e3: try move old data from db as early as possible #712 (#5897) 2022-10-29 14:58:34 +07:00
Alex Sharov
f766a490b5
e3: merge logs (#5896) 2022-10-29 14:44:11 +07:00
Alex Sharov
8fe89f4e5b
e3: less small merges, parallel merge (#5895) 2022-10-29 13:21:06 +07:00
Alex Sharov
d8d4a0a240
e3: wait group for apply loop (#5894) 2022-10-29 11:48:53 +07:00
Andrew Ashikhmin
dd43d486f3
Enable London in AllEthashProtocolChanges (#5891)
`AllEthashProtocolChanges` should contain all the EIPs accepted by the
core developers into the Ethash consensus, including the
[London](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md)
protocol upgrade.
2022-10-28 17:19:18 +02:00
Alex Sharov
0074ad0e48
e3: parallel exec, rotate and partial-flush of indices wal - while main thread is idle (#5889)
While main thread is idle (apply is on RoTx now):
- periodically still hisotry/index etl collectors and load them to db 
- prune old history/index in db

Also:
- fixed RAM estimation calculation of State22
2022-10-28 21:13:53 +07:00
Andrew Ashikhmin
f46300e37e
core/vm: Rename SHA3 instruction to KECCAK256 (#5890)
Cherry-pick https://github.com/ethereum/go-ethereum/pull/23976

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2022-10-28 13:38:34 +02:00
Alex Sharov
f72cfb2167
e3: eth_getLogs speedup (#5887) 2022-10-28 17:53:58 +07:00
Alex Sharov
880f673dff
allow empty topics filter in eth_getLogs - regression after #5805 (#5885) 2022-10-28 09:55:22 +07:00
Alex Sharov
8d1ed547b0
E3: parallel exec, apply on roTx (#5879) 2022-10-28 08:47:45 +07:00
Giulio rebuffo
5a321d6240
Dispersed fixes for incremental verkle trees (#5880) 2022-10-27 10:22:53 +02:00
Andrew Ashikhmin
d9ff645fbf
Make lint happy (#5874)
Fixes
```
eth/stagedsync/exec3.go:885:6: ineffectual assignment to txs (ineffassign)
        b, txs = nil, nil
           ^
```
2022-10-26 14:41:56 +02:00
Andrew Ashikhmin
6a5968e7f0
AuRa service transactions are free (#5873)
and the don't pay baseFee after EIP-1559.

See https://openethereum.github.io/Permissioning.html#gas-price
2022-10-26 13:03:47 +02:00
Alex Sharov
fe49acdbe6
revert_o2 changes (#5872) 2022-10-26 15:19:40 +07:00
Alex Sharov
3babe19f73
revert last mdbx change - because some suspicious bug-report #705 (#5869)
for https://github.com/ledgerwatch/erigon/issues/5863
2022-10-26 14:05:14 +07:00
Alex Sharov
7056ef07be
don't stop stageLoop if error happen during background blocks snapshot creation (#5868) 2022-10-26 09:43:10 +07:00
dtan3847
42aa80e059
rpc: fix implemented filter methods being forbidden (#5801)
Addresses issue #4833

Removes implemented methods from the forbidden method list. The
forbidden list seems to have been created as a bugfix before the filters
methods were implemented. Now that the filter methods are implemented,
these entries are causing unexpected behaviour.
2022-10-26 09:08:09 +07:00
Mike Neuder
29ff8daa92
req/resp heartbeat handler modifications (#5859)
addressing some aspects of the req/resp portion of the CL spec:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#reqresp-interaction.

this PR does a few things: 
1. moves `blocksByRangeHandler` and `beaconBlocksByRootHandler` handlers
to a different file in the `handlers` package. these are going to be the
more complicated handlers so they will be better in their own files.
2. makes `pingHandler` a method on the `*ConsensusHandlers` receiver and
starts returning the sequence number instead of the request. (see
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#ping
`Peers request and respond with their local metadata sequence number`).
3. adds a `goodbyeHandler` to respond with a status message of 1. (see
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#goodbye).
4. makes `statusHandler` a method on the `*ConsensusHandlers` receiver.
(the rest of this handler is still not implemented.
5. refactored the `heartbeats_test` into a table driven test. this makes
the test much more readable:
https://dave.cheney.net/2019/05/07/prefer-table-driven-tests.
2022-10-25 19:30:11 +02:00
Andrew Ashikhmin
b71ba5326f
txpool: prevent index out of range 2 (#5862)
Pick up https://github.com/ledgerwatch/erigon-lib/pull/704
2022-10-25 14:39:40 +02:00
Alex Sharov
2d7cd0fae2
e3: better prune logs, apply thread can work without rwTx (#5860) 2022-10-25 16:08:01 +07:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Alex Sharov
b1680de12d
e3: goerli snapshots (#5858) 2022-10-25 09:48:24 +07:00
Mike Neuder
4b5880e8d3
Adding VoluntaryExit, ProposerSlashing, and AttesterSlashing topics to pubsub service (#5851)
This is a follow on PR in support of
https://github.com/ledgerwatch/erigon/issues/5824. See
https://github.com/ledgerwatch/erigon/pull/5841 for the
`beacon_aggregate_and_proof` topic.

This PR adds support for the `voluntary_exit, proposer_slashing, and
attester_slashing` topics as defined in the phase 0 spec
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#global-topics.

The CL types were already defined so this just adds the listening to the
pub sub service.
2022-10-24 17:52:49 +02:00
Alex Sharov
592ad57921
add DECOMPRESS_CONDENSITY env variable (#5853) 2022-10-24 10:00:55 +07:00
Alex Sharov
4ca4aa7144
e3: bsc recon leack fix (#5852) 2022-10-24 09:14:34 +07:00
Mike Neuder
db1c2d2d82
Adding the AggregateAndProof global topic to the sentinel pubsub service (#5841)
This is the first PR in support of
https://github.com/ledgerwatch/erigon/issues/5824.

The phase 0 sepc
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#global-topics
specifies 6 global pubsub topics that CL nodes need to handle.

This PR implements the `beacob_aggregate_and_proof` topic: 

https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof.

The `AggregateAndProof` and `SignedAggregateAndProof` types are defined
here:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#aggregateandproof.

I followed the implementation of `SignedBeaconBlockBellatrix`, which has
the following references:

1. cmd/lightclient/cltypes/types.go‎: defines the struct with relevant
SSZ annotations on the fields.
2. cmd/lightclient/cltypes/clone.go: this just returns a reference to an
empty object, so not super clear to me if it is necessary:
3. cmd/lightclient/rpc/common.go: this decodes gossip data, switching on
the type of gossip message that is received.
4. ‎cmd/lightclient/sentinel/service/service.go: this listens on the
pubsub channel and notifies when a packet of the relevant type comes in.
5. cmd/lightclient/sentinel/pubsub.go: this defines the gossip topic
struct.
6. cmd/lightclient/lightclient/subscriber.go: this is the lightclient
interface for the incoming messages that come from the sentinel.
2022-10-23 20:22:33 +02:00
Alex Sharov
a1cd46c5be
e3: recon metrics (#5850) 2022-10-23 19:31:24 +07:00
Daniel DeLima
dcb42b1537
Improved readability in README System Requirements section (#5843) 2022-10-23 19:25:20 +07:00
Alex Sharov
8d75d0dc4b
e3: return old reader version  (#5849) 2022-10-23 19:22:33 +07:00
Alex Sharov
993fde4d92
E3: par logs (#5839) 2022-10-23 18:51:14 +07:00
Alex Sharov
cd4ce6291f
don't accumulate state changes for jumps > 1K blocks (#5845) 2022-10-23 18:50:11 +07:00
Alex Sharov
a1e21260ad
e3: reduce reconstitute ram estimation (#5848) 2022-10-23 18:49:57 +07:00
Alex Sharov
96233cfa7f
e3: metrics (#5846) 2022-10-23 17:05:26 +07:00
Alex Sharov
866ebe9ffb
snapshots: new blocks snapshot for mainnet (#5842) 2022-10-23 10:05:48 +07:00
Enrique Jose Avila Asapche
a874459835
got rid of time.Sleep (#5840) 2022-10-22 17:38:29 +01:00
Krishna Upadhyaya
aea019a3ff
Fix BorTxLookup (#5800) 2022-10-22 17:37:01 +01:00
Alex Sharov
c8a7bb6c37
fix linter warnings (#5838) 2022-10-22 13:19:33 +07:00
Alex Sharov
8641d81511
downloader: nil ptr verify (#5833) 2022-10-22 11:52:05 +07:00
Alex Sharov
f2eee19de0
eliasfano: To fix checkptr fatal error (#5831) 2022-10-22 11:16:50 +07:00
Alex Sharov
eb6fab868d
e3: remove some mainnet snapshots (#5829) 2022-10-22 08:44:10 +07:00
Enrique Jose Avila Asapche
199a9a633c
lowered the amount of max peers (#5828)
Change the amount of max peers from 200 -> 33
2022-10-22 02:10:00 +02:00