Commit Graph

428 Commits

Author SHA1 Message Date
Andrew Ashikhmin
acd309a1a8
Consistent commas in (*ChainConfig) String() (#4306) 2022-05-30 15:08:33 +02:00
Zachinquarantine
6982ace915
Update Goerli bootnodes (#4281) 2022-05-27 08:34:24 +07:00
Giulio rebuffo
bd633f360d
Updated TTD in ropsten (#4279) 2022-05-26 19:05:00 +01:00
Andrew Ashikhmin
0c76286509
Add rules to AsMessage to vet transaction types (#4276)
* Add rules to AsMessage to vet transaction types

* Fix TestState
2022-05-26 18:20:34 +02:00
Andrew Ashikhmin
86de64a2a3
TangerineWhistle instead of EIP150 & SpuriousDragon instead of EIP155/158 (#4273)
* EIP150Block -> TangerineWhistleBlock

* Merge EIP158Block into EIP155Block

* EIP155Block -> SpuriousDragonBlock
2022-05-26 12:08:59 +02:00
ledgerwatch
25208964e5
Export chainspecs into json files (#4148)
* Export chainspecs into json files

* Add sepolia

* Add more chains

* Extract rest of the chains

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-15 17:37:42 +01:00
Andrew Ashikhmin
eec804d320
Ropsten Merge TTD (#4145) 2022-05-13 21:22:48 +01:00
ledgerwatch
158a738ad0
Change dev version back to 2022.99.99-dev (#4065)
* Update version.go

* Fix lint

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-04 08:09:23 +01:00
Alex Sharov
77560b6732
More careful handle of sequences in stage_headers --reset (#4023)
* save

* save

* save

* save
2022-04-29 14:37:02 +07:00
Krishna Upadhyaya
ab29bfc7d5
Update bor mumbai config (#3937) 2022-04-22 14:23:05 +07:00
ledgerwatch
5058e45e6b
Change version to alpha (#3926)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-04-21 16:59:26 +01:00
ledgerwatch
eb07ad89dd
Update Skip analysis and preverified hashes (#3777)
* Update skip analysis

* Add preverified hashes for mainnet and ropsten

* preverified hashes and bootnode for sepolia

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-03-27 09:42:33 +01:00
Alex Sharov
66ee6f9243
more bsc static peers (#3759) 2022-03-24 08:36:22 +00:00
Enrique Jose Avila Asapche
022e0dd6b2
Added kiln devnet (#3742)
* kiln-devnet flag

* kiln-devnet genesis

* bootnodes

* added chain name

* lint

* allocs
2022-03-19 17:04:48 +00:00
Giulio rebuffo
7094dcc614
Fixed forkid for mergeBlock (#3686)
* fixed forkid for mergeBlock

* ops

* ops again
2022-03-12 22:51:31 +00:00
battlmonstr
c8a25d0226
Refactor getting chain info by chain name. (#3635)
* get chain config, genesis hash and network ID by chain name in params/config
* get genesis block chain name in core/genesis
2022-03-03 21:57:10 +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
battlmonstr
47edcd1b6b
Refactor discovery bootnodes parsing. (#3596)
Simplify node URL list logic.
Handle errors.
2022-02-23 20:24:13 +00:00
Enrique Jose Avila Asapche
5536b70a35
new bootnodes (#3591) 2022-02-23 14:18:02 +00: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
Enrique Jose Avila Asapche
e348b3ea93
deleted kovan (#3546) 2022-02-19 08:15:44 +00:00
Enrique Jose Avila Asapche
089a1dd5e7
adding engine_ExchangeTransitionConfigurationV1 (#3454) 2022-02-15 09:30:54 +00:00
Jared Doro
0223489183
[WIP] Adding Support for Sepolia (#3462)
* [WIP] Adding Sepolia

* Fix formatting

* Added Timestamp to Sepolia genesis

* update config

* fixed formating
2022-02-10 07:27:36 +00: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
Andrew Ashikhmin
24be4799cb
Explicit dev version (#3366)
* Explicit dev version

* Fix comment
2022-01-28 12:51:05 +01: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
Andrew Ashikhmin
c2d0f0082a
Report Valid ExecutionStatus only after all stages (#3212)
* Stricter transition check

* EthBackendServer.numberSent was unused

* Take account of PoS blocks in TopSeenHeight

* Report Valid ExecutionStatus only after all stages, not straight in headers

* Print TTD on startup

* No need to check parent.Hash() again

* core: change baseFee into baseFeePerGas in genesis json

* fix typo

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-01-07 16:54:26 +01:00
Andrew Ashikhmin
d14c223881
Simplify miner gas limit post EIP-1559. Default to 30M (#3205) 2022-01-05 16:36:24 +07:00
Giulio rebuffo
195eb9abaa
Added mining for POS (#3187)
* added comunication with channels

* added final mining

* removed trash

* bug fixing

* async calls

* one thread

* tests

* better comments

* no lock

* better placing of skipCycleHack

* removed long timer

* moved transitioned block processing

* better naming

* disabled updates on blocks

* sync.Cond

* 2 sync.Cond

* better locking

* Use single sync.Cond. Proposer shutdown

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-01-04 18:37:36 +01:00
brendan-kelly
3d048b7f1a
Add chain config and CLI changes for Binance Smart Chain support (#3131)
* Add chain config and CLI changes for Binance Smart Chain support

* Remove BSC hashes for now

* Add an if statement for BSC forks

* Fix up if statement

* Compiles

* Remove extra dependencies from go.mod/go.sum

* Add a TODO

* Potentially fix the tests
2021-12-16 07:26:44 +00: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
Igor Mandrigin
a5a3c62fff begin 2021.11.03 release cycle 2021-11-11 14:21:27 +01:00
Igor Mandrigin
a2d5b00496 begin 2021.11.02 release cycle 2021-11-04 20:58:21 +01:00
Giulio rebuffo
51d29f1d98
Added terminalTotalDifficulty field in ChainConfig (#2900) 2021-11-03 08:40:24 +07:00
Andrew Ashikhmin
1214302a19
Arrow Glacier network upgrade (#2896) 2021-10-31 20:31:18 +07:00
Igor Mandrigin
237592581b begin 2021.11.01 release cycle 2021-10-28 11:28:21 +02:00
e-danko
574be07415
Updated Fermion genesis extraData (#2830)
* updated Fermion extradata + fixed bug with PublicKey

* Update Fermion extradata: fix genesis hash
2021-10-16 13:12:57 +03:00
Igor Mandrigin
08f7084b20 begin 2021.10.4 release cycle 2021-10-14 13:54:54 +03:00
e-danko
c970261ac9
switched Fermion to Clique (#2823)
* switched Fermion to Clique

* Update Fermion to Clique: updated genesis block hash
2021-10-13 17:51:45 +03:00
Alex Sharov
a470da8c2c
enable London in mining, fix pre-london gasPool in mining (#2821) 2021-10-13 11:04:59 +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
Igor Mandrigin
cd1e98d44b
update Fermion devnet id to 1212120 to avoid clashes with https://chainlist.org (#2817) 2021-10-13 08:28:07 +07:00
Alexandr Borodulin
2a7ed79eb8
Enable all hardforks in the fermion testnet (#2819)
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-10-12 16:05:18 +03:00
Igor Mandrigin
e5c8628c8e begin 2021.10.3 release cycle 2021-10-07 14:42:05 +03:00
e-danko
900f687e84
Fermion genesis block (#2787)
* updated Fermion genesis block

* Updated Fermion genesis block: added precompiles
2021-10-06 12:00:23 +03:00
Igor Mandrigin
6be44fa551 begin 2021.10.2 release cycle 2021-10-01 11:51:19 +03:00
Igor Mandrigin
e57c6d7546 begin 2021.10.1 release cycle 2021-09-30 08:52:48 +03:00