Commit Graph

2627 Commits

Author SHA1 Message Date
J1ang
2177c8faa5
fix: issue #5723 type conversion bug (#5763)
fix:
fix for issue #5723 type conversion bug by adding check. `expValue`
should be `uint64[]`.
2022-10-17 11:25:17 +01:00
Giulio rebuffo
ab3a0b0fbd
Switched to validating lightclient (#5761)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-16 00:07:27 +02:00
Giulio rebuffo
d075618ecc
Importing of ETH2 blocks from Lightclient (#5760) 2022-10-15 23:01:52 +02:00
Giulio rebuffo
6f1c2be4e5
Implemented clause 3 of phase 4 (#5758) 2022-10-15 19:03:31 +02:00
ledgerwatch
90d26a3f46
Fix lint (#5756)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-15 10:34:12 +01:00
Alex Sharov
b8dbb53d3b
e3: write history and indices to etl (#5742) 2022-10-15 08:20:58 +07:00
ledgerwatch
525a3a7cbb
Fix for empty blocks being proposed (#5749)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-15 00:12:38 +01:00
Giulio rebuffo
497d414b36
Added Lightclient update base validation without BLS (#5746)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-14 15:24:44 +02:00
hexoscott
e50110562a
revert execution batch size logic to size on disk (#5732)
Revert to older batch size logic to keep memory usage down during
execution phase and closer to the --batchSize flag size.

Spotted a "leak" in key generation as well. The unsafe pointer keeps the
byte slice around for as long as the batch is not committed, takes up a
fair chunk of memory surprisingly doing that so removed the unsafe
pointer usage giving the GC some chance to clean up along the way.

Moved the batch rollback into a defer func call rather than allowing
them to stack in the for loop. If this isn't going to work just let me
know and can change it back.
2022-10-13 09:10:26 +01:00
Alex Sharov
d2ef27d746
e3: reconstitution last step improve (#5733) 2022-10-13 14:33:39 +07:00
Alex Sharov
6cc10a27d3
e3: recondb no meminit (#5730) 2022-10-13 12:24:53 +07:00
Alex Sharov
1774abd6cd
e3: don't create own context, we are enough enough safe for kill (#5728) 2022-10-13 11:30:54 +07:00
Alex Sharov
b12b0d4627
e3: history bsc and mainnet snapshots (#5725) 2022-10-13 09:46:32 +07:00
Alex Sharov
d2436ab344
e3: optimize stateWriter.Put (#5724) 2022-10-13 09:37:14 +07:00
Alex Sharov
a9853d2ef8
Recon parallel: split ReconState to 2 objects to avoid lock contention between .Done() and .Get(), less ram in beginning (#5713) 2022-10-12 17:23:10 +07:00
ledgerwatch
750d23427d
Covalenthq move status execution flag into vm config (#5710)
Co-authored-by: Sudeep <sudeepdino008@gmail.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-12 09:27:48 +01:00
Alex Sharov
4795217e4e
e3: prevent files ranges overlap (#5684) 2022-10-12 10:18:55 +07:00
hexoscott
ab0ac1bfd4
wait for at most 500ms when receiving the GetPayload message from CL (#5701)
Seems simple enough, don't stop on interrupt but start a timer instead
and check on each loop if we should stop now or allow the block to
finish on its own
2022-10-11 16:51:53 +01:00
Andrew Ashikhmin
7286a0fef7
Create in-memory MDBX inside dirs.Tmp (#5702)
Previously "in-memory" MDBX instances for fork validation and mining
were created inside `os.TempDir()`. We should create them inside
Erigon's datadir so that the file permissions and the disk are the same
as for the main database.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/676.
2022-10-11 16:49:38 +01:00
ledgerwatch
a170d730c0
Fixing issues related to sync delays (#5689)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-11 08:04:40 +01:00
Alex Sharov
a2e51a2469
e3: prune limited amount before commit #675 (#5693) 2022-10-11 11:25:13 +07:00
Giulio rebuffo
a8338e4dd2
Infra refactoring (#5673)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-09 13:41:15 +02:00
Giulio rebuffo
e36b1206f7
Resolve panic on ctx.done when using --experimental.lightclient (#5670)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-08 15:07:04 +02:00
ledgerwatch
d4a5ddc7ee
erigon3 - fix state reconstitution (#5666)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-07 21:40:58 +01:00
hexoscott
c829c9f4f3
back to existing request bodies logic (#5650)
Moves bodies request logic to pre OOM changes. No logging or checking
for timeouts and moving forwards with every request made. Tested on a
local node that went through the DB migration on this branch and worked
fine, caught back up to the tip. Tested on POW initial sync and looked
to be working fine writing bodies, although didn't have time to see this
run all the way through the merge.
2022-10-06 20:27:06 +01:00
Giulio rebuffo
ebe63cfa30
Added tests for config functions and further refactoring (#5646)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-06 18:23:46 +02:00
Giulio rebuffo
2fd96a0b1c
[Experimental] GRPC Prototype with --experimental.lightclient to have Erigon listen on ConsenSUS gossip. (#5590)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-10-06 11:01:56 +02:00
Alex Sharov
ae449eba4a
E3 exec atomics (#5641) 2022-10-06 13:11:11 +07:00
Alex Sharov
ca9aa4723c
Compress params change (#5631)
as of https://github.com/ledgerwatch/erigon-lib/pull/651
2022-10-05 17:54:54 +07:00
Alex Sharov
c48d51a582
snapshot index workers amount - based on available RAM and CPU (#5524) 2022-10-05 17:07:01 +07:00
Alex Sharov
3777b613f9
erigon3: bigger outCh and log it's len/cap (#5612) 2022-10-05 15:37:41 +07:00
ledgerwatch
94f4ea805d
Fixing hive SideChain reorg test (#5620)
the root cause is that when `inMemoryExecution` lambda gets created in
the `eth/backend.go`, it captures the reference of
`backend.notifications`, and so the execution of side-forks actually
adds notifications to there, and it all gets sent out to tx pool (and
RPC daemon) at the end of the stage loop (regardless of whether there
was forkchoice update or not)

so we can create a separate notification, but then somehow flush it to
the "main" nofitications when the in-memory exec state is flushed

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-10-05 05:42:38 +01:00
ledgerwatch
92bc23bd45
Return correct LastValidHash (#5616)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-04 13:38:47 +01:00
ledgerwatch
fd52a788b7
Fix creation of block snapshots (#5579)
* Print snapshot prune

* More print

* Print

* Print

* Print

* Move snapshots stage forward

* Cleanup

* Fix tests

* Print

* Too much logging

* Remove print

* Log, check

* Revert

* No panic, print

* Fix tx numbering

* Harder condition to start retiring blocks

* Disable Pow verification after TTD is reached

* Fix POW verifying

* Print

* Prints

* Fix?

* cleanup

* Add migrations and hack

* More diagnostics

* More print

* Reset sequence only once

* Fix migration

* Remove print reset

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-10-04 11:14:18 +01:00
Alex Sharov
39383d936d
erigon3: move tx.AsMessage() out of critical path (#5611)
* save

* save
2022-10-04 10:56:41 +01:00
hexoscott
b581bf30c0
Reintroduce oom fix (#5604)
* bring back oom fix for bodies with some new tweaks

* use in memory body cache when processing stages in memory
2022-10-04 10:44:23 +01:00
Alex Sharov
a03c43fe3c
erigon3: allow commit in parallel exec #5614 2022-10-04 13:51:30 +07:00
Alex Sharov
ede306baa5
erigon3: no overlap parallel tx 2022-10-04 13:40:27 +07:00
Enrique Jose Avila Asapche
fce9a665bb
warning of missing block and returning nil if no err (#5606)
* warning of missing block and returning nil if no err

* deleted message
2022-10-04 09:00:27 +07:00
Alex Sharov
2b4046f372
erigon3 recon fix overlap txs #5609 2022-10-04 08:59:35 +07:00
Alex Sharov
20f50da285
r.cache = prevView.cache.Clone() 2022-10-03 09:50:17 +07:00
Alex Sharov
fba6efb1c8
erigon3: a bit simplify reconstitution #5599 2022-10-02 20:37:28 +07:00
Alex Sharov
fda2748447
erigon3: no overlap tx, better defer rollback (#5598) 2022-10-02 19:54:26 +07:00
Alex Sharov
c38a9dcfab
Erigon3: don't commit in the middle of block execution (#5596) 2022-10-02 16:26:56 +07:00
Alex Sharov
fa16d5e855
erigon3: step toward background snapshots build (#5588) 2022-10-02 10:21:17 +07:00
Alex Sharov
1b17a3226a
agg print stats at startup (#5586) 2022-10-01 09:29:28 +07:00
ledgerwatch
7018c5e746
Ergonomic fixes for POS (#5574)
* Various POS fixes

* More quiet

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-29 22:17:16 +01:00
ledgerwatch
49aeb53988
Fail newPayload if execution is unsuccessful (#5553)
* Fail newPayload if execution is unsuccessful

* fix linter

* fix message

* no self-hosted

* try force ci

* back to unbuntu

* Remove unnecessary unwinds

* Fix canonicalising

* Quiet logs for in-memory exec

* Remove experimental overlay flag

* Fix sync test

* Fix test

* Fix lint

* Print hash in the end of the cycle

* Not notify headers if list is empty

* Supress timings and tables logs when no change in progress

* Reduce logging

* fix

* better log for pos download

* Better newPayload and forkChoice messages

* Fix lint

* simplify

* No duplication of download messages

* Reverse log for extension

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Igor Mandrigin <i@mandrigin.ru>
2022-09-29 06:38:13 +01:00
Alex Sharov
f4a7d2cf6d
erigon3: build .vi after download (#5568) 2022-09-29 12:14:51 +07:00
Alex Sharov
e4ad73bcb4
erigon3: agg to use workers for compress and merge (#5561) 2022-09-28 13:05:26 +07:00