Commit Graph

70 Commits

Author SHA1 Message Date
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
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
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) (#3493) 2022-02-12 20:33:09 +07:00
Alex Sharov
3d3315132c
downloader switch back to bolt backend (#3478) 2022-02-11 12:44:18 +07:00
Alex Sharov
1d6f8a04ac
Embed downloader (#3450)
* save

* save

* save

* save

* save

* save
2022-02-09 13:22:43 +07:00
Enrique Jose Avila Asapche
35fcd3a829
Merging Turbo bor into devel (#3372)
* implemented bor consensus

* add bor flags to default

* change bucket into snapshot to clique

* enable stateSync

* bypass reciept checks

* fix receipt calculation and bor logs

* fix: contract call wrt bor

* Update mumbai config

* Add: bor-mainnet flag and config

* Add bor consensus to integration

* use header coinbase in block context

* london fork mumbai changes

* fix genesis error

* Jaipur fork for mumbai

* add sysCall to verifyHeader

* added bor related rpc method implementation

* added bor specific rpc extensions

* fixes in snapshot implementation, major refactor for bor rpc

* modify consensus specific db path for bor

* fix: remove parallel compute for get root hash rpc method

* Added bor-receipt flow

* Use turbo-bor-lib and bor tables

* Use bor table in RPC snapshot

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* update rpc readme

* link rpc docs in readme

* Update Readme

* Update Readme

* move erigon namespace rpc methods to eth

* rm: erigon namespace

* rm: erigon namespace, update list of available rpc methods, add example

* fix: binary name in rpc readme

* fix: max db size

* Add london to bor-mainnet

* updated node.go

* add system req to readme

* golang version fix readme

* added networknames in correct place

* nil

* ran gofmt

* erigon

* fixed fake.go

* dont need turbor-lib

* old readme

* fixing readme

* half

* other half

* changed return

* fixing return

* fixed return

* fixed flags

* gofmt

* merge with devel

* latest erigon-lib

* fixed context.coinbase

* took out syscall

* fixed params in hash

* bor type now is consensus.Engine

* parlia is consensus.Engine

* missing arg and repeated importation

* repeated importation

* fixed eth_receipts.go

* deleted duplicate issuance

* part of consensus.Engine type

* added eth_api issuance

* networkname

* added erigon_system file

* fork struct taken out

* added erigon block

* getLogByHash for erigonImpl

* gofmt

* fixed lint

* ops

* gofmt

* gofmt

* added APIImple functions

* fixed clique test

* took out print

* fixed state added balance

* fixed README

* fixed rpcDaemon README

* fixed integration README

* updated blockchain.go

* lint

* added bor back into blockchain.go

* took out comment

* lint

* updated daemon

* updated wtb

* removed duplicate

* removed VerifyHeaders

* prevent use of wrong Transfer

* fixed state_processor.go

* fixed state_transition.go

* fixed headers

* returning err

* error handling in bor read tx look up

* put for txLookUp

* dealing with error

* lint

* traces

* more traces

* fixed receipt in execution

* getTrasanction receipt for bor or others

* nil

* lint

* ops

* deleted syscall

* took out else

* Merge branch 'devel

* tests syscalls

* changed borReceipt to receipt

* reset header algos

* arguments fix

* took out prefixes

* lint

* erigon-named

* borReceiptKey = blocknumber

* reverts e3b60c2e159d03efcb855f7ab3da5a098dd60c33.

* correct hashing tx

* dont need it here

* lint

* added txlookup for bor

* change to uint256

* outputs for isBor

* wrapper

* added isBor and isParlia

* isBor

* fixed BorTransfer

* not readBody

* correct prefix

* added blockNum

* added readStorageBody

* readStorageBody

* lint

* got rid of unnecessary bor_receipt func

* onlny if bor

* use clone

* append

* writeToSlice

* added isBor flag

* fixed writeToSlice

* normal sorting

* lint

* Reset erigon-snapshots

* Move bor prefix into if

Co-authored-by: Krishna Upadhyaya <krishnau1604@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Uttam Singh <uttamkhanduja@yahoo.in>
Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-07 21:30:46 +00:00
Giulio rebuffo
a75c625d3e
Watchtheburn flag for enabling watch the burn stage (#3325)
* now watch-the-burn needs to be enabled

* refine

* ops

* readme.md

* ops
2022-01-25 17:36:21 +00:00
Alex Sharov
304b40dd0a
Snapshot: prohibit to change cli flags (#3311) 2022-01-22 11:18:24 +07:00
Somu Bhargava
c620b1e7c9
Add Erigon Import feature for Hive integration purpose (#3298) 2022-01-20 07:34:50 +00:00
Alex Sharov
6fd002eb5a
Snapshot: move old blocks to snapshots (non-async version) (#3309)
* save

* save
2022-01-20 12:01:02 +07: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
bcc88bab15
Revert "increase body download timeout (#3217)" (#3262)
This reverts commit f0f33f1519.
2022-01-14 12:55:24 +00:00
Alex Sharov
f0f33f1519
increase body download timeout (#3217) 2022-01-11 07:41:18 +00:00
Andrew Ashikhmin
d14c223881
Simplify miner gas limit post EIP-1559. Default to 30M (#3205) 2022-01-05 16:36:24 +07:00
Alex Sharov
ecb10e8548
Snapshots download and seed (#3117)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* Squashed 'interfaces/' content from commit e5b1945d0

git-subtree-dir: interfaces
git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184

* 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
2021-12-14 10:13:17 +00:00
Andrew Ashikhmin
d739810dc5
Serenity engine: fall back to eth1 engine before the Merge (#3112)
* (EIP-4399) MixDigest is utilized for RANDOM

* Add GetTd to ChainHeaderReader

* Remove unused VerifyHeaders from consensus consensus

* Introduce params.MaxGasLimit

* Serenity engine: fall back to eth1 engine before the Merge

* Serenity engine in CreateConsensusEngine

* ethOne -> eth1Engine
2021-12-13 18:29:38 +01: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
Alex Sharov
e55256296b
snapshots: read block from snapshots, add sender to txs file (#2996) 2021-11-21 10:32:14 +07:00
e-danko
7d338f5e1c
#2660: added Kovan network (#2733) 2021-09-27 19:56:17 +07:00
Alexandr Borodulin
d7159cd8bd
More convenient pruning for non-PoW consensus: add --prune.*.before flags (#2714) 2021-09-23 09:13:19 +07:00
Alex Sharov
b30ccd2ddf
Revert "Add prune before parameters" (#2701)
This reverts commit 49a98ad4b6.
2021-09-18 08:37:39 +07:00
Alexandr Borodulin
49a98ad4b6
Add prune before parameters 2021-09-17 19:01:15 +07:00
racytech
fd357f034d
bad.hash flag added to exclude block by hash and not by number (#2612)
* BadHashFlag added

* bad.hash to bad.block
2021-09-01 22:16:25 +01:00
Alex Sharov
6bf34b5cb8
RPC: eth_feeHistory (#2501)
* eth_FeeHistory

* eth_FeeHistory

* eth_FeeHistory

* lint

* lint
2021-08-08 14:27:47 +07:00
Alex Sharov
5069558752
Apache licensed logger (#2460) 2021-07-29 17:23:23 +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
6bf54c951a
Sokol v0: unwind support (#2439) 2021-07-24 16:50:42 +07:00
ledgerwatch
026c4e9d02
Reorg ropsten solution (#2419)
* Reorg ropsten solution

* Add option

* Print TD recalc

* Correct fix for eip1559

* Try to fix the unwind

* Print header progress and hash

* Not insert descendants of bad headers

* Print some more

* Print less

* Better way of marking bad headers

* Disable inSync

* Penalise peers who give incorrect chain pieces

* better fix for initial cycle

* Clean up

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-07-22 16:49:36 +01: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
Artem Vorotnikov
0026cb8faa
Remove checkpoints (#2402)
* Remove checkpoints

* Remove more dead flags
2021-07-20 09:11:42 +07:00
Artem Vorotnikov
a49b920659
Remove preimages (#2370) 2021-07-15 09:06:07 +07:00
Alex Sharov
5eaf4c8cc3
rpc: 1559 in call and tracing (#2327) 2021-07-11 04:05:56 +00:00
Alex Sharov
43af5d42b8
simplify staged sync world (#2336)
* simplify world

* simplify world

* simplify world
2021-07-10 16:43:58 +07:00
Marin Ivanov
c89ec2047e
Add parameter for minimum time between sync loop iterations (#2332)
* Add parameter for minimum time between sync loop iterations

* Rename cli parameter --throttle.minLoopTime => --sync.loop.throttle
2021-07-10 09:19:44 +07:00
Alex Sharov
e98340d806
Simplify stagedsync.Prepare (#2317) 2021-07-08 20:52:22 +07:00
Mark Tyneway
17adaf5f87
config: add block downloader window flag (#2259) 2021-07-01 10:14:10 +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
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
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
Artem Vorotnikov
af836a6200
Nuke LMDB (#2167) 2021-06-16 13:57:58 +03:00
BitBaseBit
159777db29
Changed gas price oracle to use effective tip and ignoreUnder parameter for 1559. (#2173)
* added temp file in crashreports because git is stupid and wont add empty folders

* implemented ignoreUnder + EffectiveGas for legacy and dynamic txs

* implemented changes to gas price oracle for 1559

* switched Cmp to Lt/Gt
2021-06-15 21:45:34 +01: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
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
87d24be960
Drop download.v2 flag (#2039)
* Drop download.v2 flag

* Lint

* Skip tests

* Skip test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-28 16:32:34 +01:00
ledgerwatch
5d6305952a
Simplifications of gas price oracle (#2036)
* Simplifications of gas price oracle

* Make price suggestion non-concurrent

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-27 20:33:02 +01:00
Evgeny Danilenko
7352b81122
Tevm stage 1 (#1845)
* convert contracts after block execution

* check if has tevm code

* after review-1

* handle ErrNotFound

* typo

* tests

* tevm code bucket

* testdata

* execute pre-stage

* after merge

* test fix

* test fix

* fix test after merge

* disable translation stage

* after merge

* rename params

* rename to Erigon

* parallelize EVM translation

* fix

* logging and fixes

* fix

* todos

* cleanup

* revert erigorn renaming

* unwind

* tevm unwind

* fix AppData

* non-parallel version

* comments
2021-05-27 14:54:55 +01:00
Evgeny Danilenko
74847d77e6
Rename to Erigon (#2018)
* turbo-geth to erigon

* tg, turbo to erigon
2021-05-26 11:35:39 +01:00
ledgerwatch
835b954f5c
State stream to RPC daemon (#1986)
* Remove interfaces

* Squashed 'interfaces/' content from commit e06631eb4

git-subtree-dir: interfaces
git-subtree-split: e06631eb4d0926c2d6a4f552497b920b4ed8d1bd

* Update KV interface

* Squashed 'interfaces/' changes from e06631eb4..014677ffe

014677ffe Merge remote-tracking branch 'origin/master' into stream
08c32a09e add version method to txPool and ethbackend
5b6bf70b9 Update README.md
7712cb267 Update README.md
f895ece4c save (#37)

git-subtree-dir: interfaces
git-subtree-split: 014677ffe5bff0dee1a333f06c92e6110d791468

* Fix old interfaces

* Squashed 'interfaces/' changes from 014677ffe..df31e1146

df31e1146 remove action from storage change

git-subtree-dir: interfaces
git-subtree-split: df31e1146c368eda2e2b15ab252b78fba7a0a6f3

* add Accumulator

* add location

* Squashed 'interfaces/' changes from df31e1146..472584639

472584639 Merge remote-tracking branch 'origin/master' into stream
dd6a42724 Refactor of consensus interface (#28)

git-subtree-dir: interfaces
git-subtree-split: 472584639f637189dfb906ef1ed03665f98d55d2

* Fix compilation in cons

* Pass accumulator to Execution stage

* Fix test

* Pass accumulator to unwind and plain writer

* Add accumulator use to plain writer

* Squashed 'interfaces/' changes from 472584639f..5c36f038b8

5c36f038b8 State change stream to KV (#38)
REVERT: 472584639f Merge remote-tracking branch 'origin/master' into stream
REVERT: df31e1146c remove action from storage change
REVERT: 014677ffe5 Merge remote-tracking branch 'origin/master' into stream
REVERT: e06631eb4d Fix
REVERT: 9c10d79d2d Fix
REVERT: 61ae9307de Fix
REVERT: 4fcf34ecc5 State change stream to KV

git-subtree-dir: interfaces
git-subtree-split: 5c36f038b87096ffb6b07e90c6762c21b864cd3b

* Add state.stream flag

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-23 15:53:18 +01:00
Artem Vorotnikov
5655409616
Do not write old block changesets in pruning storage mode (#1964)
* Remove incremental staged sync

* Do not write old block changesets in pruning storage mode

* Remove pruning flag, put behaviour behind !StorageMode.History
2021-05-22 11:57:10 +01:00