Commit Graph

1122 Commits

Author SHA1 Message Date
Giulio rebuffo
84f31c873e
Separation of Engine from Ethbackend (#7821)
This PR separates ENGINE from Ethbackend. It makes it so:

1) EthBackend not a god class
2) We can abstract away engine API so that we can make it CL-like and
enable Consensus-Execution driven design
3) Objective is Json-RPC -> Engine Consensus Module -> Execution module.
2023-07-06 18:09:52 +02:00
Alex Sharov
69ae999059
log file unmap/close errors (#7819) 2023-07-06 11:12:26 +07:00
Alex Sharov
0b97728862
mdbx bug in DeleteCurrentDuplicates() workaround (#7850) 2023-07-06 11:08:23 +07:00
Alex Sharov
b60380f81e
prometheus lib up (#7843) 2023-07-05 10:08:56 +07:00
Andrew Ashikhmin
a2dd5da2a1
[erigon-lib] EIP-4844: parse transactions when not wrapped with blobs (#7805)
Pick up https://github.com/ledgerwatch/erigon-lib/pull/1034
2023-06-27 12:52:59 +02:00
Andrew Ashikhmin
a24eae8d6c
EIP-4844: Handle data gas in txpool (#7779)
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/1029
2023-06-23 11:10:23 +02:00
Alex Sharov
5dd6b77e40
Up grpc version (#7791) 2023-06-23 13:40:04 +07:00
Alex Sharov
108ca8a66a
e3: history - less iterators (#7790) 2023-06-23 13:06:39 +07:00
ledgerwatch
141c4aeb4c
More Bor mainnet snapshot files (#7783) 2023-06-22 09:22:01 +01:00
Alex Sharov
880c939df8
e3: idx range method (#7767) 2023-06-20 10:58:37 +07:00
ledgerwatch
6815323f33
Update to latest erigon-lib (#7764)
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-06-20 10:57:19 +07:00
Alex Sharov
86035ca566
e3: unwind simplify (#7759) 2023-06-19 13:42:43 +07:00
Alex Sharov
2adf258a33
e3: simplify unwind (#7758) 2023-06-19 11:40:13 +07:00
Alex Sharov
a77edd7a32
faster opening of snapshots and indices (#7757)
- mostly by MADV_SEQUENTIAL during opening 
- see https://github.com/ledgerwatch/erigon-lib/pull/1025
2023-06-19 11:34:01 +07:00
Alex Sharov
a63b24bca6
up NAT STUN lib (#7750) 2023-06-17 09:38:38 +07:00
Alex Sharov
e5023775aa
Enforce blockReader interface (#7737)
- breaks dependency from staged_sync to package with block_reader
implementation
- breaks dependency from snap_sync to package with block_reader
implementation
- breaks dependency from mining to txpool implementation
2023-06-15 13:11:51 +07:00
Andrew Ashikhmin
a5886732b9
Use BitLenToByteLen from erigon-lib (#7735) 2023-06-14 14:48:16 +02:00
Giulio rebuffo
4f812efbc8
Better version of libp2p where losing peers bug fixed (#7726)
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2023-06-14 13:14:52 +02:00
Alex Sharov
f4d8bd84b3
Crypto lib up (#7730) 2023-06-14 10:43:29 +07:00
Alex Sharov
78d9e0077b
sys lib version up (#7722) 2023-06-13 14:29:51 +07:00
Alex Sharov
6121f6363a
kv_mdbx: don't use defer for wg.Add(). not necessary and sometime it checking invalid err variable (#7719) 2023-06-13 10:57:08 +07:00
Giulio rebuffo
63006611ec
Added concurrent bls (#7709) 2023-06-12 00:40:03 +02:00
Alex Sharov
afd8ea94d0
e3: move domains to tables.go (#7707) 2023-06-11 21:12:05 +07:00
Alex Sharov
b7469d2720
mdbx: tx.GetOne - avoid interface casting (#7703) 2023-06-11 09:45:44 +07:00
Alex Sharov
1546a79771
lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
Andrew Ashikhmin
4a74ee2589
EIP-4844: switch precompile input's z and y to big endian (#7680)
according to https://github.com/ethereum/EIPs/pull/7020. Prerequisite:
https://github.com/ledgerwatch/erigon-lib/pull/1015.
2023-06-07 17:33:15 +02:00
Alex Sharov
6c129e5f1d
e3: agg generalize PutIdx method (#7671) 2023-06-06 11:29:30 +07:00
Alex Sharov
e14664d53b
Store Canonical/NonCanonical/Bad blocks/senders/txs in same tables. Make re-org cheaper (#7648)
- allow store non-canonical blocks/senders
- optimize re-org: don't update/delete most of data
- allow mark chain as `Bad` - will be not visible by eth_getBlockByHash,
but can read if have hash+num
2023-06-05 12:36:24 +07:00
Alex Sharov
26f9c064ac
mainnet: more block snapshots (#7662) 2023-06-05 11:25:37 +07:00
Alex Sharov
6f54cc6ef0
torrent lib version up (#7642) 2023-06-03 08:07:28 +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
Alex Sharov
2c4f4d8af1
sepolia new snapshots (#7631) 2023-06-02 11:29:45 +07:00
Alex Sharov
695b8e5f31
e3: release e4 parts3 (#7630) 2023-06-02 10:57:05 +07:00
Alex Sharov
b163d3a877
e3: release some e4 parts (#7629) 2023-06-02 10:55:40 +07:00
Alex Sharov
d56d867b4f
e3: move kvlist to erigon-lib (#7627) 2023-06-02 10:18:43 +07:00
Alex Sharov
3ccc7da2e6
e3: move kvlist to erigon-lib (#7626) 2023-06-02 09:52:12 +07:00
Alex Sharov
d54f604f9d
fix nil ptr in close() (#7618) 2023-06-01 16:11:34 +07:00
Alex Sharov
4ddd2c365c
Downloader fix no race between .Download() and .Stats() (#7617)
It fixing 1 case: when erigon start from scratch 
- it did skip stage_snapshots because of race-condition and start
printing `Waiting for Consensus Layer...` logs for long time - but
actually Erigon just did download snapshots at this time and printed
wrong logs.
2023-06-01 16:04:10 +07:00
Manav Darji
eb98a0a5ad
PIP12: Implement time based StateSync confirmation delay (#7587)
This PR implements [PIP
12](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-12.md).
It introduces time based state sync confirmation delay and adds Indore
hard fork on polygon chains.

The corresponding PR on erigon-lib can be found here:
https://github.com/ledgerwatch/erigon-lib/pull/1002.
2023-05-29 21:08:43 +07:00
a
3c2b99e19c
[caplin] incremental improvements to p2p layer (#7582)
we update observability in the p2p layer for handlers, and also properly
encode error codes, close streams.

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-28 07:54:04 +07:00
Alex Sharov
3b7c603974
go mod tidy (#7585) 2023-05-26 17:47:10 +07:00
Alex Sharov
ead45694ff
torrent-related goroutine leack (#7545)
can't merge - because `torrent` lib dropped go1.19 support
2023-05-26 17:12:47 +07:00
racytech
65efc92af3
eip-4844: vm and engine_api extensions, minor fixes/changes (#7514) 2023-05-19 18:43:04 +01:00
ledgerwatch
b382f96f6c
Introduce logger into etl (#7537)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-18 21:20:07 +01:00
alex.sharov
b8d65f5a7a go mod tidy 2023-05-18 10:49:58 +07:00
alex.sharov
2f362f305f go mod tidy 2023-05-18 09:46:59 +07:00
a
761524a986
eth2 shuffle (#7522)
moves eth2shuffle package to erigon.
2023-05-18 01:06:25 +02:00
Alex Sharov
a2ad68d634
downloader: speedup "--downloader.verify" mode (#7529)
deduplicate logic
create more producer goroutines (torrent lib does limiting internally
amount of consumers/disk-readers/hashers by 2, and it's enough because
we can verify multiple files in parallel)
move flag from "downloader torrent_hashes --verify" to "downloader
--verify"
2023-05-17 06:33:59 +01:00
Alex Sharov
6002436182
remove "db" log line from (#7509) 2023-05-14 08:42:53 +07:00
ledgerwatch
5ae9cb7f39
[Devnet tool] side-quest logging step 6 (#7496)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-11 18:59:55 +01:00
a
fd6acd4b31
[Caplin] beginnings of instrumentation (#7486)
this pr is ready for review, but it is waiting on this PR 

https://github.com/VictoriaMetrics/metrics/pull/45

so that we do not need to use a replace directive.
2023-05-11 18:38:56 +02:00
Roberto Bayardo
8356f3a320
use ssz from updated erigon-lib (#7490)
ssz/clonable interfaces have been moved to erigon-lib so they can be
shared with the txpool code there
2023-05-11 12:54:20 +01:00
a
37da9ec1e3
[caplin] ssz byteobjects (#7454)
instead of converting from ssz -> struct -> ssz, it may be better to
just stay as ssz, then use methods to read the data.

this pr explores this concept, while maintaining compatiblity with the
existing codebase.
2023-05-10 21:37:50 +02:00
ledgerwatch
20437faaf5
[Devnet tool] side-quest logging step 4 (#7481)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-10 17:12:23 +01:00
Alex Sharov
10b9aa1586
reduce default --db.size.limit from 7 to 3 Tb (to fit defaults of some systems) (#7479) 2023-05-10 09:43:23 +07:00
Alex Sharov
299535e7ea
LeakDetector: use it to find which resource was created but not closed (leaked) (#7457) 2023-05-08 12:22:26 +07:00
Giulio rebuffo
3b9636644d
fixed cache concurrency issue in BLS (#7455) 2023-05-07 14:38:44 +02:00
Giulio rebuffo
5b7643c57b
Added dencun networking (#7453) 2023-05-07 01:37:53 +02:00
Andrew Ashikhmin
ac087d8ca5
[interfaces] Header mix_digest -> prev_randao (#7448)
Pick up https://github.com/ledgerwatch/interfaces/pull/169
2023-05-05 17:58:20 +02:00
Alex Sharov
fe30cf8c6f
up urwafe and docker version (#7435) 2023-05-04 10:48:43 +07:00
Roberto Bayardo
d0a6d20ca2
update kzg dependencies (#7432)
Update to latest erigon-lib which now has the kzg context and update
crate-crypto to latest.

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-05-04 10:36:26 +07:00
a
9644e6d220
Implement SpecTests in native go, add fork_choice handler (#7422)
a few TODO: remain to make this not a draft

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-02 16:19:22 +02:00
Giulio rebuffo
250a0a4a65
Caplin: Remotion of bad peers giving us bad blocks (#7411) 2023-04-29 21:32:33 +02:00
Giulio rebuffo
8a3b9e6d17
Added caching for BLS affines (#7408)
Improved CPU usage by 10x, we just really avoid re-compressing and
re-validating public keys
2023-04-29 02:36:53 +02:00
Alex Sharov
ded8283df7
erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
Alex Sharov
367f3e9afa
e3: log slow (unclosed) contexts to detect leaks (#7375) 2023-04-24 12:52:15 +07:00
Alex Sharov
ae1891491e
up cobra cli (#7371) 2023-04-23 14:05:16 +07:00
Alex Sharov
74e08e197d
e3: remove files when no readers (#7370) 2023-04-23 11:55:16 +07:00
Alex Sharov
e96036fe33
e3: add CleanDir func (#7362) 2023-04-21 10:47:00 +07:00
Alex Sharov
12f08e6cd8
snappy: arm64 support (#7361)
port of https://github.com/ethereum/go-ethereum/pull/27027
2023-04-21 10:38:59 +07:00
Alex Sharov
a3d0c20303
prometheus client version up (#7360) 2023-04-21 10:37:28 +07:00
Alex Sharov
b14ca7508f
e3: remove garbage files (#7357) 2023-04-21 09:51:03 +07:00
Alex Sharov
776b780ac6
e3: move staticFilesInRange method to ctx (#7330) 2023-04-18 06:04:46 +00:00
Giulio rebuffo
515aedda7b
Added Caplin Phase 1 (#7290)
* Introduces full beacon validation
* Removes light client
* NOTE: slow on purpose, I want everything to be BLS verified for now.
2023-04-17 18:06:50 +00:00
Alex Sharov
69a3396433
add flag --db.size.limit (#7325) 2023-04-17 12:48:57 +00:00
alex.sharov
998e35a176 Revert "save"
This reverts commit 89133dce0f.
2023-04-17 16:43:29 +07:00
alex.sharov
89133dce0f save 2023-04-17 16:42:47 +07:00
Alex Sharov
62d1e8a66c
e3: in-general merge must not see "overlaps/deleted" files, but merge of history need access to corresponding index files (even if they marked as deleted or already merged - before kill -9) (#7321) 2023-04-17 05:54:29 +00:00
alex.sharov
e7ca92556c use gohashtree release tag 2023-04-17 09:07:20 +07:00
ledgerwatch
57f051f04c
Update btcd library version (#7316)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-16 09:50:54 +00:00
Andrew Ashikhmin
9b81302d9d
Embed AuRa config into chain Config (#7307)
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/970
2023-04-14 07:51:25 +00:00
Andrew Ashikhmin
96bb5d544b
Remove Parlia (#7306)
Pre-requisite: https://github.com/ledgerwatch/erigon-lib/pull/969
2023-04-14 06:24:10 +00:00
Andrew Ashikhmin
02f6cac7b7
Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
Andrew Ashikhmin
9387abf66b
[interfaces] lower_snake_case field names (#7293)
Pick up https://github.com/ledgerwatch/interfaces/pull/163
2023-04-12 10:35:54 +00:00
racytech
47fd86e4fb
eip-4844: assigned value to excessDataGas, unused packages removed (#7289)
`excessDataGas` has been partially made eip-4844 ready, so instead of
passing nils to functions, now it actually assigned to some value (it is
expected to be nil until cancun update).
2023-04-12 05:45:44 +00:00
ledgerwatch
9690228ede
[Diagnostics] Simplify logging settings, introduce correct log rotation with lumberjack (#7273)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-07 21:08:44 +00:00
racytech
6f18ba1458
eip-4844: BlobTx and its components (#7262)
New transaction type added. This transaction differs from previous
transactions in a network encoding. Network encoding of a new
transaction wraps "regular" transaction with additional data: blobs and
kzgs. The network wrapper will be verified by execution layer using this
extra data.
2023-04-07 20:08:14 +00:00
Alex Sharov
64e7e788b5
e3: print background indexing logs in e2 style (summary of all files progress in 1 line) (#7256) 2023-04-05 04:49:02 +00:00
Alex Sharov
9a2702111f
e3: some new mainnet sn files (#7253) 2023-04-04 04:51:46 +00:00
Alex Sharov
625b0c5b15
take in account memlimit of cgroups (#7204)
for cgroups v2 support see:
https://github.com/shirou/gopsutil/issues/1416
2023-04-04 03:29:56 +00:00
ledgerwatch
721f9a49fe
Add more bor snapshots, remove bsc snapshots (#7249)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-03 15:40:40 +00:00
Alex Sharov
d3cc1e152c
switch to lruv2 (#7238) 2023-04-03 03:19:30 +00:00
Alex Sharov
527f1da283
hashtree dep up (#7235)
gohashtree to support go1.20
https://github.com/prysmaticlabs/gohashtree/pull/8
2023-04-02 14:13:54 +00:00
Andrew Ashikhmin
02182ee11a
[erigon-lib] Remove ShardingForkTime in favour of CancunTime (#7230)
Pick up https://github.com/ledgerwatch/erigon-lib/pull/963
2023-03-31 09:11:09 +00:00
Alex Sharov
a1767861ab
stricter protection against bad dict in decompressor (#7228) 2023-03-31 03:17:39 +00:00
Alex Sharov
3008c25c9e
e3: enable simulated backed (#7218) 2023-03-30 02:53:06 +00:00
alex.sharov
f3ff8dd438 sqlite version up 2023-03-30 09:15:06 +07:00
Alex Sharov
417a437584
Break dependency of ethcfg package to core/consensus/etc... move genesis struct to 'types' package (#7206) 2023-03-29 07:27:06 +00:00
Giulio rebuffo
ab3a1d2ce5
Remove propagation of lightclient updates (#7192) 2023-03-27 22:42:40 +00:00
Alex Sharov
cff73b8aec
add constant kv.Unlim=-1 (#7183) 2023-03-26 03:18:04 +00:00
Alex Sharov
201572c6f5
enable more linters #954 (#7179) 2023-03-25 05:13:27 +00:00
Alex Sharov
7a51a29991
e3: DomainGetAsOf, DomainRange (#7177) 2023-03-25 03:51:43 +00:00
Alex Sharov
f4fb329c55
e3: remove some iterator (#7174) 2023-03-24 08:36:52 +00:00
Alex Sharov
e2c5984a12
attempt to finx bindtest (#7167) 2023-03-23 09:24:25 +00:00
alex.sharov
256bb1fcdb CI v4 2023-03-23 13:21:46 +07:00
alex.sharov
dfc5f55f53 fix e3 test 2023-03-23 12:20:46 +07:00
Alex Sharov
9001f668a7
go 1.19 atomics (#7164) 2023-03-23 05:11:28 +00:00
Alex Sharov
09154c5be0
Go 1.18 drop (#7159) 2023-03-23 03:19:07 +00:00
Alex Sharov
223fcd178c
e3: domain range api simplify (#7158) 2023-03-22 07:36:03 +00:00
Alex Sharov
0ffaca865e
e3: unionKV limit (#7157) 2023-03-22 06:58:01 +00:00
Alex Sharov
753a680cbd
e3: union limit (#7156) 2023-03-22 06:38:04 +00:00
Alex Sharov
52cb720cdc
e3: remove settings table (#7155) 2023-03-22 05:21:17 +00:00
alex.sharov
8395c39670 domain: to use history api 2023-03-22 11:55:26 +07:00
Alex Sharov
28c1b1d50d
e4: to use serializev3 (#7154) 2023-03-22 04:53:49 +00:00
Giulio rebuffo
b129a9415e
Update go deps (#7138) 2023-03-19 20:13:53 +00:00
Giulio rebuffo
35a0ba571d
Banning peers sending bad gossip (#7134) 2023-03-18 19:45:53 +00:00
Alex Sharov
f027324f01
torrent: suppress some warning (#7124) 2023-03-17 03:53:35 +00:00
Alex Sharov
3da0df736f
grpc_middleware_up (#7123) 2023-03-17 03:33:59 +00:00
awskii
7cee93aa10
E4 metrics upd (#7122) 2023-03-17 00:38:38 +00:00
Alex Sharov
59bc028762
txpool: senders batch commit optimize (#7118) 2023-03-16 03:39:58 +00:00
Alex Sharov
157a380be7
e3: history no auto-increment (#7097) 2023-03-15 08:03:57 +00:00
alex.sharov
ec76e0c5c1 e3: less merge logs 2023-03-15 13:35:04 +07:00
alex.sharov
f6759518d6 don't show "block number" in txpool logs it confusing users 2023-03-15 11:27:03 +07:00
alex.sharov
94729b1e82 up goprotobuf 2023-03-15 10:26:44 +07:00
Alex Sharov
2ba3b084d7
torrent: don't cancel storage, because lib can't handle such error and can graceful-shutdown anyway (#7102) 2023-03-14 08:42:39 +00:00
Alex Sharov
0ef5c76d89
torrent lib version up to remove some warning log (#7100) 2023-03-14 07:50:00 +00:00
Alex Sharov
bbe56620a3
move more parts to lru2 (#7098) 2023-03-14 07:37:23 +00:00
hexoscott
efd541028c
read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
Alex Sharov
f2d99f9d85
e3: split "changed keys" iterator to simplify (#7086) 2023-03-13 08:06:50 +00:00
alex.sharov
470547f07a erigon-lib up 2023-03-13 11:07:21 +07:00
Alex Sharov
68f264675a
e3: simplify wal (#7085) 2023-03-13 02:35:18 +00:00
alex.sharov
2155147417 go mod tidy 2023-03-13 09:33:10 +07:00
Alex Sharov
a44e0afbd6
Downloader main loop wait on close (#7082) 2023-03-13 02:12:30 +00:00
alex.sharov
e3f0f99cef save 2023-03-11 15:37:46 +07:00
awskii
a96293ae8a
e4: added some metrics to code (#7078) 2023-03-10 19:21:10 +00:00
Alex Sharov
570c3d65ab
up moq version, up some lru version (#7069) 2023-03-10 04:03:32 +00:00
Alex Sharov
d19fcd870b
e3: use iterators composition in invIndex.Range (#7056) 2023-03-09 02:26:40 +00:00
Stéphane Loeuillet
fd1a971384
graphql: add Tx Receipts Logs to output (#7059) 2023-03-09 02:22:41 +00:00
Alex Sharov
a158b63126
mdbx: RangeDupSort iterator (#7054) 2023-03-08 10:16:06 +00:00
Alex Sharov
92c444bc1a
--torrent.staticpeers (#7052) 2023-03-08 08:30:00 +00:00
alex.sharov
b48aeef8f1 save 2023-03-07 16:10:25 +07:00
Alex Sharov
34ebf6bbea
up grpc version (#7043) 2023-03-07 09:00:07 +00:00
Alex Sharov
b685407175
attempt to fix TestGolangBindings (#7041) 2023-03-07 06:14:35 +00:00
Alex Sharov
d4e25daf22
etl: distinct empty values from nil (#7039)
Reverts ledgerwatch/erigon#7038
2023-03-07 04:19:00 +00:00
Alex Sharov
7206e482da
Revert "etl: distinct empty values from nil" (#7038)
Reverts ledgerwatch/erigon#6934
2023-03-07 03:22:23 +00:00
Alex Sharov
c5acfd0503
etl: distinct empty values from nil (#6934) 2023-03-07 02:33:21 +00:00
hexoscott
77065ee0f3
remove PeerUseless calls (#7032) 2023-03-06 18:59:14 +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
Giulio rebuffo
9101fdadcc
Long keys and finalization markers added. (#7024) 2023-03-05 19:15:17 +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
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
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
8bffe4499b
e3: less wal locks (#6971) 2023-02-27 07:03:00 +00:00
Alex Sharov
1a141a6219
mdbx: more funcs (#6961) 2023-02-26 02:29:48 +00:00
Alex Sharov
fae889f815
e3: index readers pool (#6954) 2023-02-26 02:04:46 +00:00
Alex Sharov
2a8eec51bc
e3: eliasfano iterator.seek() (#6944) 2023-02-24 13:39:19 +00:00
Alex Sharov
58236d62bb
e3: optimize iterators, step1 (#6937) 2023-02-24 10:32:50 +07:00
Alex Sharov
97d6cd5c11
e3: more mainnet snapshots (#6942) 2023-02-24 10:29:50 +07:00
ledgerwatch
9c9449a059
Mock of Erigon support - step 1 (#6930)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-02-22 12:38:22 +00:00
Alex Sharov
a19d1b59c5
Pool and RPCBlocksCache: to use generic lru (#6928) 2023-02-22 07:50:00 +00:00
Alex Sharov
be4f5cf078
mdbx: to support empty key/values #6923 (#6927) 2023-02-22 07:04:48 +00:00
Alex Sharov
7f0abb8250
downloader: suspend cancelation warning #899 (#6926) 2023-02-22 11:32:19 +07:00
Alex Sharov
309b4812d3
mdbx: to support empty key/values (#6923) 2023-02-22 04:10:57 +00:00
Alex Sharov
510993f09f
libp2p pubsub panic fix (#6924)
see: https://github.com/libp2p/go-libp2p-pubsub/pull/522
2023-02-22 03:07:17 +00:00
Stéphane Loeuillet
195a72bf74
Initial GraphQL interface implementation (#6821)
That's an initial PR mostly for code review, not ready for production
use

Got basic GraphQL working when querying a single block

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2023-02-20 11:23:06 +00:00
Alex Sharov
2b0d0d8811
EliasFano: Search to touch only UpperBits array (#6904) 2023-02-20 06:42:37 +00:00
Alex Sharov
c3325b989f
torrent lib version up (#6903) 2023-02-20 04:43:03 +00:00
dependabot[bot]
3b68ccd823
build(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#6896)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to
0.7.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8e2b117aee"><code>8e2b117</code></a>
http2/hpack: avoid quadratic complexity in hpack decoding</li>
<li><a
href="547e7edf38"><code>547e7ed</code></a>
http2: avoid referencing ResponseWrite.Write parameter after
returning</li>
<li><a
href="39940adcaa"><code>39940ad</code></a>
html: parse comments per HTML spec</li>
<li>See full diff in <a
href="https://github.com/golang/net/compare/v0.6.0...v0.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.6.0&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ledgerwatch/erigon/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-18 10:29:20 +07:00
Giulio rebuffo
df1563b401
Passing all finality consensus-spec-tests for altair/bellatrix (#6894) 2023-02-17 17:57:05 +00:00
Alex Sharov
433f031db3
trackers up (#6890) 2023-02-17 02:38:25 +00:00
alex.sharov
349bdb7a4f e3: less mainnet snapshots 2023-02-15 19:23:18 +07:00
alex.sharov
ada7ab2da8 e3: remove some snaps 2023-02-14 09:45:20 +07:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
Alex Sharov
d5bb42453a
Update lib-p2p to support golang 1.20 (#6848) 2023-02-12 11:23:33 +00:00
Alex Sharov
de17e82375
e3: reduce buildIndex ctx scope (#6850) 2023-02-12 16:24:39 +07:00
Alex Sharov
acd76ea520
e3: temporary remove semaphore (#6849) 2023-02-12 16:06:28 +07:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
Alex Sharov
c6f6aab542
e3: more mainnet snapshots (#6839) 2023-02-11 09:38:04 +07:00
Giulio rebuffo
1b862a7c31
Added processing of sync committee updates (#6836) 2023-02-10 16:17:12 +00:00
Alex Sharov
7c9f30d25b
e3: return list of e3 files by grpc (#6827) 2023-02-10 13:45:33 +07:00
Alex Sharov
983db55dc5
Downloader: "incomplete" markers are more important than "complete", so commit them with fsync (#6825) 2023-02-10 13:20:19 +07:00
Alex Sharov
98a8ca50fe
erigon3 snapshots version 3 (#6811) 2023-02-09 13:51:51 +07:00
Alex Sharov
c31824ee17
less logs (#6813) 2023-02-09 13:27:45 +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
Giulio rebuffo
a585ae4894
Added Optimizations to Beacon state transition. (#6792) 2023-02-07 17:44:37 +01:00
Alex Sharov
4cae1b94e9
switch sentinel to native go errors (#6782) 2023-02-06 10:15:52 +07:00
Alex Sharov
dede1a2c9e
e3: more mergeFiles tests, refcnt for LocalityIndex (#6765) 2023-02-06 09:05:29 +07:00
ledgerwatch
bf24018205
Add support for eth/68 (#6764)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alex Sharp <alexsharp@surfer-172-29-1-65-hotspot.internet-for-guests.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-02-01 22:21:31 +00:00
Anshal Shukla
b70e8d7955
fix race condition in snapshot_test (#6761)
The Read method of math package used in randomAddress function is not
thread safe, instead I've used crand package which is used by matic and
is a fork of thread safe crypto package.
2023-02-01 22:15:19 +00:00
Andrew Ashikhmin
afe8a84dc4
[erigon-lib] Fix index out of range in TxPool.best (#6762)
Pick up https://github.com/ledgerwatch/erigon-lib/pull/876
2023-02-01 16:48:13 +01: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
Anshal Shukla
a4f8175136
Bor file structure updated (#6167)
Updated bor consensus folder structure
2023-01-31 14:00:57 +05:30
Giulio rebuffo
1436060fd8
added sync aggregate method for processing (#6740) 2023-01-30 14:39:56 +01:00
Alex Sharov
939587bdab
E3: small rename (#6735) 2023-01-29 10:58:17 +07:00
Alex Sharov
9287a2202b
e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00