Commit Graph

623 Commits

Author SHA1 Message Date
Nathan (Blaise) Bruer
002aba4686
Add STOP_AFTER_STAGE environ (#5207)
Adds ability to stop after a stage instead of just before a stage.
This will allow users to use something like:
`STOP_AFTER_STAGE=Finish erigon`
And erigon will stop after a full cycle of syncing.
2022-08-31 07:46:27 +07:00
Alex Sharov
6495ec6d28
erigon22: working PlainState unwind (#5051) 2022-08-14 18:06:32 +07:00
Alex Sharov
52fd0d0e8b
Aggregator22.Unwind() (#5039)
* save

* save
2022-08-13 18:51:25 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
Alex Sharov
cebb44b486
up_metrics version (#4986)
* save

* save

* save
2022-08-10 18:39:27 +07:00
Leonard Chinonso
43f5ab09f8
Fixed lint errors for gosec linter (#4933)
* Fixed lint errors for gosec linter

* Changed uint64 to int64 in common/GetRandInt

* Changed naming of function
2022-08-04 14:59:40 +01:00
Leonard Chinonso
592fe32217
Refactoring To Increase Code Quality (#4842)
* General cleanup and fixes

* Cleaning part 2

* cleanup part 3

* Refactored staterunner to have a handler function

* Fixed linting

* Cleanup part 4

* Changed the initialization of the require package and updated .golangci.yml

* Fixed lint errors from golangci-lint

* deleted state_recon_1.go

* fixed build error

* Added ReadHeaderTimeouts for httpServer

* made changes to golangci

* Reset golangci.yml
2022-08-04 20:23:00 +07:00
Andrew Ashikhmin
c591266914
Small PoS clean-ups (#4834)
* Amend comment

* More watchful sleep

* improve comment

* Cosmetics for lock/unlock

* statusRef -> statusDeref

* Comment on obsure logic
2022-07-27 12:14:35 +02:00
Giulio rebuffo
101e181c52
if PoS download block is within reach, determine VALID or INVALID (#4812)
* if PoS download is fast enough, determine VALID or INVALID

* more acceptable absolute value

* solved comments

* remove useless

* moved check in stage_headers

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-26 15:24:02 +02:00
Andrew Ashikhmin
8f86c5d615
Remove getNodeData experimental feature (#4559) 2022-06-29 18:23:00 +06:00
Alex Sharov
afd07e5dee
--no-downloader flag support (#4545) 2022-06-26 17:13:32 +06:00
Alex Sharov
acd69a63ec
"-tags debug" to allow pprof show profiling from C code (#4502) 2022-06-20 15:16:56 +06:00
Alex Sharov
216a5c468f
use casting to bytes array in txlookup stage (#4246)
* save

* save
2022-05-24 13:33:07 +07:00
Alex Sharov
726ef081ce
option to disable runtime.ReadMemStats (#4200) 2022-05-19 11:48:07 +07:00
Håvard Anda Estensen
0a75065e7a
Use go:build lines and remove obsolete +build lines (#4175) 2022-05-17 14:46:53 +07:00
Alex Sharov
4e7807251a
Ensure snapshotDir not created by accident (#4164)
* save

* save

* save
2022-05-17 09:40:45 +07:00
Alex Sharov
3e4fb5dd49
up linter version (#4108)
* save

* save

* save
2022-05-10 10:14:09 +07:00
Håvard Anda Estensen
6844e74ad2
Replace ioutil with io and os (#3946) 2022-04-23 15:43:00 +01:00
Andrew Ashikhmin
3663f8c709
Explicit error for purged change sets (#3528) 2022-02-16 16:44:16 +01:00
e-danko
c42b3e0c3a
StarknetAddress type (#3339)
* added StarknetAddress type

* Moved StarknetAddress to Address32
2022-01-24 15:55:44 +00:00
Dmitry Savonin
a49d409457
Full BSC support with validator mode (#3233)
* migrated consensus and chain config files for bsc support

* migrated more files from bsc

* fixed consensus crashing

* updated erigon lib for parlia snapshot prefix

* added staticpeers for bsc

* [+] added system contracts
[*] fixed bug with loading snapshot
[+] enabled gas bailout
[+] added fix to prevent syncing more than 1000 headers (for testing only)
[*] fixed bug with crashing sender recover sometimes

* migrated system contract calls

* [*] fixed bug with returning mutable balance object
[+] migrated lightclient contracts from bsc
[*] fixed parlia consensus config param

* [*] fixed tendermint deps

* [+] added some logs

* [+] enabled bsc forks
[*] fixed syscalls from coinbase
[*] more logging

* Fix call sys contract gas calculation

* [*] fixed executing system transactions

* [*] enabled receipt hash, gas and bloom filter checks

* [-] removed some logging scripts
[*] set header checkpoint to 10 million blocks (for testing forks)

* [*] fixed bug with commiting dirty inter block state state after system transaction execution
[-] removed some extra logs and comments

* [+] added chapel and rialto testnet support

* [*] fixed chapel allocs

* [-] removed 6 mil block limit for headers sync

* Fix hardforks on chapel and other testnets

* [*] fixed header sync issue after merge

* [*] tiny code cleanup

* [-] removed some comments

* [*] increased mdbx map size to 4 TB

* [*] increased max chaindata size to 6 tb

* [*] bring more compatibility with origin erigon and some code cleanup

* [+] added support of validator mode for BSC chain

* [*] enable private key load for bsc, rialto and chapel chains

* [*] fixed running BSC validator node

* Fix the branch list

* [*] tiny fixes for linter

* [*] formatted imports for core and parlia packages

* [*] fixed import rules in other files

* Revert "[*] formatted imports for core and parlia packages"

This reverts commit c764b58b34fedc2b14d69458583ba0dad114f227.

* [*] changed import rules in more packages

* [*] fixed type mismatch in hack command

* [*] fixed crash on new epoch, enabled bootstrap flags

* [*] fixed linter errors

* [*] fixed missing err check for syscalls

* [*] now BSC implementation is fully compatible with erigon original sources

* Revert "Add chain config and CLI changes for Binance Smart Chain support (#3131)"

This reverts commit 3d048b7f1a.

* Revert "Add Parlia consensus engine for Binance Smart Chain support (#3086)"

This reverts commit ee99f17fbe.

* [*] fixed several issues after merge

* [*] fixed integration compilation

* Revert "Fix the branch list"

This reverts commit 8150ca57e5f2707a84a9f6a1c5b809b7cc84547b.

* [-] removed receipt repair migration

* [*] fixed parlia fork numbers output

* [*] bring more devel compatibility, fixed bsc address list for access list calculation

* [*] fixed bug with commiting state transition for bad blocks in BSC

* [*] fixed bsc changes apply for integration command and updated config print for parlia

* [*] fixed bug with applying bsc forks for chapel and rialto testnet chains
[*] let's use finalize and assemble for mining to  let consensus know for what it's finalizing block

* Fix compilation errors in hack.go

* Fix lint

* reset changes in erigon-snapshots to devel

* Remove unrelated changes

* Fix embed

* Remove more unrelated changes

* Remove more unrelated changes

* Restore clique and aura miner config

* Refactor interfaces not to use slice pointers

* Refactor parlia functions to return tx and receipt instead of dealing with slices

* Fix for header panic

* Fix lint, restore system contract addresses

* Remove more unrelated changes, unify GatherForks

Co-authored-by: Dmitry Ivanov <convexman18@gmail.com>
Co-authored-by: j75689 <j75689@gmail.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-01-14 19:06:35 +00:00
Alex Sharov
f3973afee8
Rule guard linter enable (#3168) 2021-12-26 10:54:26 +07:00
brendan-kelly
ee99f17fbe
Add Parlia consensus engine for Binance Smart Chain support (#3086)
* Add Parlia consensus engine for Binance Smart Chain support

* Leave RamanujanBlock as nil in params/config.go

* Run `go fmt` on files needing it

* Add comment for PoSA

* Remove empty branches and ineffectual assignments in parlia.go

* Remove commented imports

* Fix compilation error

* Remove EIP155Signer in transaction_signing.go

* Fix compilation issue

* Fix go fmt issues

* Remove Ramanujan from print statement

* Remove references to EthAPIBackend approach

* Fix Finalize method across consensus engines

* Run go fmt

* More linting

* Remove more changes

* remove a comment

* Remove unneeded hashing function

* Remove bytes check and fix actual vs expected mistake
2021-12-11 00:07:10 +00:00
Alex Sharov
178fd1931d
Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07:00
Andrei Ivasko
65400b241f
HashState stage genesis sync - read PlainState only once (#2884) 2021-11-06 16:37:33 +07:00
Alex Sharov
e6bd6fbfcc
Add p2p msg to panic (#2861) 2021-10-22 09:51:49 +07:00
e-danko
19b7354a1d
#2658: eliminated HeadersSeal function (#2731)
* #2658: removed using HeadersSeal function from experiments module

* #2658: lint issues

* #2658: fix typo
2021-10-13 08:31:04 +07:00
Alex Sharov
5ca558c667
Move lengths to erigon-lib other packages depend on it (#2799)
* move lengths to erigon-lib

* move lengths to erigon-lib
2021-10-08 10:20:45 +07:00
Andrea Lanfranchi
c913f35c2e
Inner errors (#2774) 2021-10-04 22:16:52 +07:00
Alex Sharov
3de50637cd
remove changeset.Walk func (#2716) 2021-09-22 07:54:29 +07:00
Alex Sharov
400c71b7ce
Pool: txID-based cache (#2697) 2021-09-17 10:31:20 +07:00
Andrew Ashikhmin
ced5965ef7
Remove ReceiptsKey in favour of EncodeBlockNumber (#2681) 2021-09-13 20:59:18 +07:00
ledgerwatch
15b4095718
Move ETL to erigon-lib (#2667)
* Move ETL to erigon-lib

* Update link in the readme

* go mod tidy

* Use common/chan.go from erigon-lib

* Clean up

* Fix lint

* Fix test

* Fix compilation

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-09-12 08:50:17 +01:00
Alex Sharov
f3021dd2af
RPC: small optimizations (#2564) 2021-08-24 08:28:58 +01:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib (#2467) 2021-07-29 18:53:13 +07:00
Alex Sharov
5069558752
Apache licensed logger (#2460) 2021-07-29 17:23:23 +07:00
Alex Sharov
21cb7befa4
finish remove bucket suffix (#2458) 2021-07-28 10:43:51 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package (#2455) 2021-07-28 09:47:38 +07:00
Alex Sharov
054581f507
staged syncs automatically add error prefix about stage number and name (#2445) 2021-07-26 13:19:01 +07:00
Alex Sharov
12c578b84d
less alloc at hash state key transformation #2441 (#2441) 2021-07-24 18:14:10 +07:00
alex.sharov
c2b0b8be36 remove debug comment 2021-07-22 19:08:19 +07:00
Alex Sharov
d2552196ad
Sokol v0: support for first epoch-set transition (#2411) 2021-07-21 18:13:26 +07:00
Alex Sharov
c3e1cfdac8
Pruning for: exec, log_index, tx_lookup, history stages (#2399)
* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* add tvm flag

* save

* db migration for storage mode
add flag --prune=
remove flag --storage-mode=
add flag --experiments=tevm,...
rename integration set_storage_mode to set_prune

* fix

* forward move of stages must skip everything before PruneTo

* keep in db progress of prune method

* keep in db progress of prune method

* simplify logs

* simplify logs

* simplify logs

* fix test

* simplify logs

* simplify logs

* simplify logs

* simplify logs

* remove callTraceSet as dupsort
use etl transform for txlookup prune
remove some logs

* cleanup tests a bit

* print_stages and eth_sync to show prune progress

* fix print_stages

* add readme about --prune.to flag

* more docs

* add --prune.history.older and other flags support

* fix migration on empty db

* better toString

* better toString
2021-07-20 21:03:19 +01:00
Alex Sharov
a5a58e97d0
collector already does copy, no reason to copy in buffer (#2396) 2021-07-18 17:25:41 +07:00
Alex Sharov
4c53f51767
Remove "persistent unwind" concept (#2388) 2021-07-17 21:14:51 +07:00
Alex Sharov
8d320aee07
add pruning stage concept, but not enable yet (#2385) 2021-07-17 13:38:44 +07:00
Alex Sharov
a79b3cd6eb
unify stage params (#2384) 2021-07-17 09:09:56 +07:00
alex.sharov
bc65759c84 clien id in rpc 2021-07-15 16:11:39 +07:00
Alex Sharov
75ee5db06f
Block read optimize (#2357) 2021-07-13 16:31:59 +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