Commit Graph

617 Commits

Author SHA1 Message Date
Vox
865999abb6
Fix dev chain listen port not set (#3671)
* Fix forced --port=0 and warn user of hard-coded flags

* Fix typo

* Check for port explicitly set, be verbose about it

Co-authored-by: 0xVox <ohnoyoudont@nottoday.com>
2022-03-10 12:13:55 +07:00
Alex Sharov
0b2ce6f845
rpcdaemon: limit amount of read transactions (#3637)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* a

* a

* a

* a

* a

* a

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-03-08 10:43:14 +07:00
Alex Sharov
f5be8919ef
snapshots: merge segments strategy (#3645)
* save

* save

* save
2022-03-04 14:16:16 +07:00
Andrew Ashikhmin
4607179849
Handle a corner case in forkchoiceUpdated (#3640)
* Fix typo

* fix typos

* Handle corner case when unwinding to geneis

* No-op ForkChoice
2022-03-03 16:09:03 +01:00
battlmonstr
47df98a499
Use "err" key for logging errors. (#3632)
log.Warn/Error uses "err" key to log errors in most places.
This renames "error" to "err" in some places to adhere to this convention.
2022-03-01 15:40:51 +00:00
Enrique Jose Avila Asapche
a65f12b248
State override support (#3628)
* added stateOverride type

* solved import cycle

* refactoring

* imported wrong package

* fixed Call arguments

* typo

* override for traceCall
2022-03-01 15:40:24 +00:00
Alex Sharov
f8c1fb9563
snapshots: speedup slow test (#3623) 2022-02-25 11:42:54 +07:00
Alex Sharov
96e0691d4a
snapshots: delete .idx after merge (#3619) 2022-02-25 11:41:49 +07:00
battlmonstr
65ce332e8b
Fix lint: remove unused findAndMergeBlockSegments log level parameter. (#3613)
Fixes lint errors:
turbo/snapshotsync/block_snapshots_test.go:77:69: not enough arguments in call to findAndMergeBlockSegments (typecheck)
	_, err := findAndMergeBlockSegments(context.Background(), s, dir, 1)
turbo/snapshotsync/block_snapshots_test.go:88:68: not enough arguments in call to findAndMergeBlockSegments (typecheck)
	_, err = findAndMergeBlockSegments(context.Background(), s, dir, 1)
2022-02-24 20:15:33 +07:00
Alex Sharov
ac15d2b922
snapshots: better logging (#3611) 2022-02-24 16:28:46 +07:00
ledgerwatch
67b9e5988c
Add preverified hashes for mainnet and ropsten (#3609)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-24 08:37:20 +00:00
Alex Sharov
454045185a
snapshots: fix indexing of recently merged range (#3607) 2022-02-24 14:19:01 +07:00
Alex Sharov
809cfdcf19
snapshots: indexing of recently merged range (#3606)
* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range
2022-02-24 14:15:03 +07:00
Alex Sharov
b94bc84a3b
snapshots: command to debug retire blocks (#3603)
* snapshots: command_to_debug_retire

* snapshots: command_to_debug_retire
2022-02-24 11:30:34 +07:00
ledgerwatch
17b2a9ba93
Bor fixes (#3553)
* Integration to work with bor

* Turn off validator set check

* disable verifySeal, add skeleton of postExec stage

* Pass around syscall

* Print

* Print more

* Default heimdall values for integration

* restore contract

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Fix nonce of system contract

* Remove prints

* Revert some more printing

* More fixes

* Print log

* Fix transfer log

* More printing

* More printing

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Fix validaor reward

* Remove printing

* Remove more prints

* Less printing

* Fetch validators from heimdall

* Remove syscall from Seal and CalcDifficulty

* Remove syscall from Prepare

* Print

* Remove DNS discovery

* Print apply snapshot

* Print

* Chunk up snapshot generation

* Chunk up snapshot generation

* Better logs when snapshotting

* Handle parents

* Prevent shadowing of snap

* Fix heimdall fetch

* Logging fixes

* Save generated snapshots

* Add header

* Less logging

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-24 00:03:10 +00:00
ledgerwatch
ee488020dd
Auto detect latest block for optimal use of plain state and state cache (#3598)
* Auto detect latest block for optimal use of plain state and state cache

* Fix lint

* Fix test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 23:42:14 +00:00
ledgerwatch
7397af57d4
Optimise eth_getStorageAt for current state (#3580)
* Optimise eth_getStorageAt for current state

* Fix

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 09:44:55 +00:00
alex.sharov
258e8d5506 snapshots: fix test 2022-02-23 13:18:00 +07:00
Alex Sharov
0a09187492
Snapshots: more filename fixes (#3583) 2022-02-23 13:05:44 +07:00
Alex Sharov
81d51e1589
snapshots: better files sort and filter (#3582) 2022-02-23 10:54:35 +07:00
battlmonstr
e6c056e666
Rename Datadir/dataDir to follow conventions. (#3576)
* rename from Datadir to DataDir (functions and public vars)
* rename dataDir to datadir (local variables)
2022-02-22 17:39:48 +00:00
Giulio rebuffo
b49381821f
Fixed get-payload and Hanging ForkChoice (#3575)
* done

* removed sleep

* f

* errors.Is(err, io.EOF) instead of err == io.EOF

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-02-22 14:47:23 +01:00
Alex Sharov
ab01d64916
fix close files error on win (#3572) 2022-02-22 16:24:33 +07:00
Alex Sharov
b08cb44353
embed rpcdaemon: enable it only by --http flag (#3574) 2022-02-22 16:23:54 +07:00
Alex Sharov
fc278327b9
"erigon snapshots recompress" add test (#3573) 2022-02-22 16:02:09 +07:00
Alex Sharov
dbd8a93fa8
"erigon snapshots recompress" to apply new compression rules without db access (#3571)
* mainnet

* save

* save

* save

* save
2022-02-22 15:35:04 +07:00
alex.sharov
f624d1cc22 save 2022-02-22 15:33:07 +07:00
alex.sharov
1b67c64ca3 update sapshot hashes 2022-02-22 15:02:07 +07:00
alex.sharov
d3c8634df8 fix windows tests 2022-02-22 14:44:57 +07:00
Alex Sharov
5cd561bd74
block snapshots merge (#3558) 2022-02-22 08:55:24 +07:00
Andrew Ashikhmin
980276c322
Fix coinbase in stage_mining_exec (#3564)
* Simplify TerminalBlockHash & TerminalBlockNumber

* Simplify FeedHeaderPoS

* More accurate comment

* Relax TerminalBlockHash check

* Extract the sleep hack into stageLoopIsBusy

* Several short naps instead of a single longish sleep

* Fix coinbase in stage_mining_exec

* More orthodox loop

* typo in comment
2022-02-21 18:05:39 +01:00
Alex Sharov
bed56c6363
Embed rpcdaemon - more cli flags (#3556)
* more rpc emed flags

* more rpc emed flags

* more rpc emed flags
2022-02-21 09:32:42 +07:00
Enrique Jose Avila Asapche
e348b3ea93
deleted kovan (#3546) 2022-02-19 08:15:44 +00:00
Giulio rebuffo
5db869236a
Fix Reorg Indexing on Proof-of-Stake (#3538)
* little fix

* feed pos
2022-02-18 17:03:47 +01:00
Alex Sharov
226982d293
Use class dir.Rw - to separate Ro and Rw access to snapshotDir (#3534)
* save

* save

* save

* save

* save

* save

* save
2022-02-18 09:24:17 +07:00
Andrew Ashikhmin
0701c83222
Fix stall on unwind in handleForkChoice (#3536)
* ReadHeader instead of ReadHeaderByHash

* Add Engine API to rpcdaemon README

* Fix nil pointer dereference in HandlePendingBlock

* Fix latestValidHash JSON

* Delete GetPayloadBodiesV1

* Break infinte unwind loop in handleForkChoice

* More logging
2022-02-17 18:30:57 +01:00
ledgerwatch
f1aea7707f
Update skip analysis and preverified headers (#3527)
* Updated skip analysis for mainnet

* Preverified hashes for mainnet

* Add Sepolia and Ropsten

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-16 18:41:49 +00:00
Alex Sharov
237a7d24d0
Embed RPCDaemon (#3522)
* save

* save

* save

* save

* save
2022-02-16 17:38:54 +00:00
Alex Sharov
7960d0a472
Snapshot: link.header is nil sometime (#3520)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* Add another check

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-16 12:55:43 +00:00
Andrew Ashikhmin
7bad3a9c59
state.PlainState is now at the beginning of blockNbr, not the end (#3517)
* state.PlainState is now at the beginning of blockNbr, not the end (fix discprepancy with GetAsOf)

* Fix tests
2022-02-16 08:38:12 +00:00
alex.sharov
1589a8d3d6 snapshots: header stage fixes 2022-02-16 09:30:57 +07:00
Alex Sharov
e652b5fa87
snapshots: header stage fixes (#3518) 2022-02-16 08:38:54 +07:00
alex.sharov
83c99d66da torrent flags - fix parsing logic 2022-02-14 14:14:37 +07:00
alex.sharov
f23fdf51c1 snapshots: add torrent cli flags 2022-02-14 10:34:14 +07:00
ledgerwatch
d4e623b9e5
[header downloader] introduce queues instead of insertList (#3489)
* First change for header queues

* Fix

* Fix import

* trigger verification when highestInDb changes

* Print hash, fix MarkAllPreverified

* Fix test

* Cleanup

* More cleanup

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-13 11:27:53 +00:00
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) (#3493) 2022-02-12 20:33:09 +07:00
Andrew Ashikhmin
fe9f841172
Add Beacon payloads to body downloader prefetch (#3482)
* Block instead of PayloadMessage

* tx.MarshalBinary instead of rlp.Encode in StartProposer

* Add Beacon payloads to body downloader prefetch

* Restore PayloadMessage
2022-02-11 13:24:29 +01:00
ledgerwatch
a5bd91e2e1
Update skip analysis and preverified hashes (#3471)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-10 14:10:10 +00:00
Andrew Ashikhmin
d6525b342d
Update instead of SaveStageProgress for stages.Header (#3456)
* Update instead of SaveStageProgress for stages.Header

* Call WriteHeadHeaderHash/stage.Update after the loop
2022-02-10 13:18:51 +00:00
ledgerwatch
2e0602b8dd
Revert "Inverted lowestNum and highestNum in header downloader (#3301)" (#3468)
This reverts commit 6704c48ed7.

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-10 12:23:40 +00:00