Commit Graph

389 Commits

Author SHA1 Message Date
Alex Sharov
356567676a
less allocs at call trace (#2363) 2021-07-14 21:34:23 +07:00
alex.sharov
34ba380087 print better log 2021-07-13 15:47:05 +07:00
Alex Sharov
08590211e6
Add defer collector.Close() (#2351)
* add defer collector.Close

* add defer collector.Close
2021-07-13 09:17:21 +07:00
Alex Sharov
623a3feeee
RPC: return all stages progress inside eth_syncing (#2353) 2021-07-13 09:17:05 +07:00
Alex Sharov
557d082c51
Sokol v0: epoch support (#2348)
* remove ctx from state writer interface

* call me baby

* save

* save

* can process block 1

* can process block 1

* can process block 1

* can process block 1

* save

* save

* parse logs logic

* cleans

* cleans

* cleans
2021-07-12 16:27:25 +01:00
Alex Sharov
2a8f1959a5
cleans (#2349) 2021-07-12 15:56:20 +07:00
Alex Sharov
188dfb14b8
txPool: propagate on peer connect (#2335) 2021-07-11 14:01:16 +07:00
Alex Sharov
2ec64aee1d
Simplify mining (#2339)
* save

* save
2021-07-11 04:05:33 +00:00
Alex Sharov
43af5d42b8
simplify staged sync world (#2336)
* simplify world

* simplify world

* simplify world
2021-07-10 16:43:58 +07:00
Alex Sharov
e98340d806
Simplify stagedsync.Prepare (#2317) 2021-07-08 20:52:22 +07:00
Alex Sharov
5ceaac53f6
batch cancel (#2314) 2021-07-08 19:40:49 +07:00
Alex Sharov
7c60cc0fee
step towards kv interface (#2313) 2021-07-08 09:56:09 +07:00
Alex Sharov
9683b26483
remove ctx from state writer interface (#2302) 2021-07-05 15:42:44 +07:00
Alex Sharov
6a5f86423c
Remove "numgc" from logs (#2275) 2021-07-03 14:44:23 +07:00
Alex Sharov
8e00da2035
Sokol v0: preparations for contracts run, proofs support (#2270) 2021-07-02 15:00:41 +07:00
Alex Sharov
6df7230108
Sokol v0 - better header rlp, steps to generate blocks (#2256) 2021-06-30 16:30:21 +07:00
Alex Sharov
8f6aa2f7ae
propagate new tx to p2p (#2254) 2021-06-29 17:00:22 +07:00
Alex Sharov
a6f4b08716
Revert "Propagate new txs to P2P (#2249)" (#2253)
This reverts commit e9ae6d688f.
2021-06-29 15:46:00 +07:00
Alex Sharov
e9ae6d688f
Propagate new txs to P2P (#2249) 2021-06-29 14:40:23 +07:00
ledgerwatch
7baf3ec484
Move secp256k1 into a separate go module, hook up erigon-lib (#2239)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-26 15:03:05 +01:00
Alex Sharov
605d7a8d59
Sokol v0 (#2228)
* handle chain flag in integration

* handle chain flag in integration

* handle chain flag in integration

* save

* save

* merge devel

* save

* noopWriter - one is enough

* chain spec parser

* chain spec parser

* embed

* embed

* embed

* embed

* embed

* embed

* embed

* clean

* clean

* correct alloc after reset state

* correct alloc after reset state

* correct alloc after reset state

* integration reset state now does re-apply genesis and chainConfig

* eips summary

* eips summary

* eips summary
2021-06-25 19:13:40 +01:00
Evgeny Danilenko
80c2fc6a0c
Remove stacked defers (#2149)
* rewrite everything

* remove stacked defers

* debug

* fix panic on nil tx

* use db.View

* panic

* block based progress

* errors

* - assume that batches are big  enough to not worry about saving carefully logTime
- use only 1 digit as progress indicator
- log only if processing > 16 blocks

* - update metric when printing logs

* remove excluded

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2021-06-23 10:30:53 +03:00
Alex Sharov
59d05dc5fe
hide file exists err (#2218) 2021-06-22 11:09:45 +01:00
Alex Sharov
2b59b45216
Do log tables size, db metrics - avoid concurrency, check stale readers hourly (#2216)
* add table size logs and metrics

* log stale readers

* - don't collect db metrics in background
- do check stale readers once an hour

* execution to update metrics when print logs

* hide file exists err

* hide file exists err
2021-06-22 11:08:47 +01:00
Artem Vorotnikov
989a8305f2
Print Mgas/second during execution (#2204) 2021-06-20 09:36:42 +03:00
Alex Sharov
4533b59724
flag to stop before stage (#2194) 2021-06-19 16:01:33 +07:00
Alex Sharov
bc271f92ce
To break dependency to db implementation - move all db classes to "ethdb/kv" and leave in "ethdb" only interfaces (#2195) 2021-06-19 15:21:53 +07:00
Alex Sharov
de24b427bf
save (#2196) 2021-06-19 13:32:35 +07:00
Alex Sharov
f63d12405a
Sender stage hangs (#2177)
* - add context for goroutines shutdown
- use 1 select for all channels to avoid deadlock

* - add context for goroutines shutdown
- use 1 select for all channels to avoid deadlock
- integration: senders to use right chainconfig
2021-06-16 14:04:44 +01:00
Alex Sharov
dcf850dd75
fix fieldalignment linter warnings (#2171) 2021-06-16 11:00:35 +07:00
Alex Sharov
d7f7445a5e
fix concurrent badHeaders map writes crush (#2175)
* fix concurrent map writes crush

* fix concurrent map writes crush
2021-06-16 10:58:45 +07:00
Alex Sharov
b160e30652
Send GetBlockHeaders immediately if TD of connected peer >= our TD (#2169)
* empty engine

* start sync from peer right after handshake if it's TD is higher

* fixCanonicalChain to print logs

* clean

* >
2021-06-15 13:43:55 +01:00
Artem Vorotnikov
0a4e0d1fa1
Various code simplificaitons (#2165)
* simplify randomaccount

* simplify execution unwind

* Remove standalone account accessors
2021-06-14 19:52:30 +01:00
ledgerwatch
2c1fe2a3a7
Restore TD records (#2164)
* Insert missing TD values

* Print missing TD records

* Fix typo

* Apply fix

* Fixes in execution stage

* Fix tx/sec output

* Advance exec

* Reset unwind

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-06-14 19:51:57 +01:00
ledgerwatch
c4cfd84b6d
Not to remove TD records on failed blocks (#2155)
* Not to remove TD records on failed blocks

* Commit tx when stopped

* Not to mess up stageloop commits

* Stop

* Fix header unwinds

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-13 21:48:40 +01:00
BitBaseBit
7ed337cdcc
Implemented panic handling, graceful shutdown and reporting for all goroutines that don't explicitly handle them. (#2153)
* implemented crash reporting for all goroutine panics that aren't handled explicitly

* implemented crash reporting for all goroutine panics that aren't handled explicitly

* changed node defaults back to originals after testing

* implemented panic handling for all goroutines that don't explicitly handle them, outputting the stack trace to a file in crashreports

* handling panics on all goroutines gracefully

* updated missing call

* error assignment

* implemented suggestions

* path.Join added

* implemented Evgeny's suggestions

* changed path.Join to filepath.Join for cross-platform

* added err check

* updated RecoverStackTrace to LogPanic

* updated closures

* removed call of common.Go to some goroutines

* updated scope capture

* removed testing files

* reverted back to original method, I feel like its less intrusive

* update filename for clarity
2021-06-13 17:41:39 +01:00
ledgerwatch
b5edbe272f
Update stage_tevm.go (#2144) 2021-06-11 10:11:23 +01:00
Alex Sharov
7b08a3b138
tevm_open_cursor_after_commit (#2141) 2021-06-11 09:35:00 +01:00
Evgeny Danilenko
de26634d8d
TEVM status pruning (#2034)
* use trace for TEVM status

* restore testdata

* fix getting contract from plain state

* unwind

* linters

* reproducible build debug

* debug

* debug

* remove debug
2021-06-11 09:34:25 +01:00
Andrew Ashikhmin
d848685c8e
More tests for Intermediate Hashes: storage, extension node exclusion (#2128)
* Test trie_storage layout as well

* FromHex instead of Hex2Bytes

* TestAccountTrieAroundExtensionNode

* Expand TestAccountTrieAroundExtensionNode
2021-06-10 09:19:57 +01:00
ledgerwatch
657a8b13df
Do not remove headers when unwinding (#2122)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-08 16:16:27 +01:00
Alex Sharov
338fc0df26
move snapshot config to constructor (#2121) 2021-06-08 09:43:41 +07:00
ledgerwatch
c2c63a3715
Clean up DefaultStages (#2114)
* Clean up DefaultStages

* Fix compile

* Fix compile

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-06-07 12:00:16 +01:00
ledgerwatch
73bb98f686
Move tests 6 (#2107)
* Move tests 6

* Compile fixes

* Fix lint

* Compile fixes

* Fix compile

* compile fixes

* Compile fix

* Fix consesus/clique

* Cleanup

* Add gas limit

* Print

* Prints

* More print

* Fix

* Reinstate TestGetBlockReceipts66

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-06-06 22:44:14 +01:00
Alex Sharov
35fd972a9e
move sync.Run() to kv (#2112)
* less objdb in tests

* move sync.Run to tx

* move

* move

* move
2021-06-06 10:32:55 +01:00
Artem Vorotnikov
231a130e2d
Remove remnants of silkworm integration (#2110) 2021-06-06 09:06:06 +01:00
Alex Sharov
5ba3ea162a
Simulated backend and genesis to kv (#2104)
* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* merge

* merge

* merge

* merge

* merge

* merge

* merge

* merge
2021-06-05 16:17:04 +01:00
ledgerwatch
f7fc4d66ec
Move tests 5 (#2069)
* Remove silkworm and reader builders

* Switch tests

* Stop from hanging

* Update tests to 9.0.0

* Move tests back

* Moving code around

* Fix lint

* More fixes

* Intermediate

* Fix compile

* Fix compile errors

* Compile errors

* Fix lint

* Comment out more printing

* More simplifications

* Compile fixes

* Compile fix

* More replacements

* More fixes

* More muddling through

* lint

* Exclude dao split test

* Restore sidechains after unwind

* Errors in senders stage, stopped in bodies stage

* Fix compile

* Fix compile

* Fix tests

* More fixes

* More fixes

* Code cleanup

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2021-06-05 11:00:21 +01:00
Alex Sharov
ccac3c6566
Add tx.Append method for ergonomic (#2088)
* close cursor

* stateless append

* stateless append

* faster pruning del and close cursor

* faster pruning del and close cursor

* less wrappers

* less wrappers

* less wrappers

* clean

Co-authored-by: ledgerwatch <akhounov@gmail.com>
2021-06-04 14:32:48 +01:00
b00ris
66c7c669fb
Snapshot builder simplification (#2064)
* fix test

* get rid of ObjectDatabase

* sn_builder_prototype2

* save state

* save state

* integration step1

* fix lint

* fix

* fix test

* integrate migrator.finish

* fix lint

* fix build

* fix typo

* fix
2021-06-04 13:30:02 +01:00