Commit Graph

18 Commits

Author SHA1 Message Date
Andrew Ashikhmin
0bd6d77acd
Remove CalcuttaBlock in favour of BlockAlloc (#8371)
System contract upgrades for Polygon are already handled by the
`BlockAlloc` logic and there's no need to duplicate it with the
`CalcuttaBlock` logic (there's no Calcutta in
https://github.com/maticnetwork/bor).
2023-10-05 15:39:57 +02:00
Mark Holt
37a8450d5f
Added non root logger to bor.ValidatorSet (#7668)
I've added a non root logger to bor.ValidatorSet validator set. This
creates a signature change on a number of calling functions to propagate
the logger. This is mostly constrained to the bor package but impacts a
number of tests and utilities which call the validators set.
2023-06-06 10:55:59 +01:00
Alex Sharov
268674cdde
e4: tests compat (#7436) 2023-05-04 11:30:21 +07:00
Anshal Shukla
bc8d292ef6
Update matic token contract codes (#7324)
Co-authored-by: Anshal Shukla <ashukla@Polygon-HYDF2D07MC.local>
2023-04-21 09:32:36 +07:00
ledgerwatch
7258a2b872
Remove BSC support in Erigon (step 1) (#7246)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-03 14:46:21 +00:00
Anshal Shukla
c4ba26107e
Rpc get code (#6899)
This in conjuction with
[PR#893](https://github.com/ledgerwatch/erigon-lib/pull/893) fixes the
eth_getCode RPC call.
2023-03-02 14:12:16 +00:00
Alex Sharov
4fbbdf9186
e3: move txnum to erigon-lib (#6663) 2023-01-22 19:39:33 +07:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
ledgerwatch
0a31f5ac2a
Workaround for the code history of BSC system contracts (#6274)
Works around a flaw in the upgrade logic of the system contracts. Since
they are updated directly, without first being self-destructed and then
re-created, the usual incarnation logic does not get activated, and all
historical records of the code of these contracts are retrieved as the
most recent version. This problem will not exist in erigon3, but until
then, a workaround will be used to access code of such contracts through
a special structure, `SystemContractCodeLookup`

Fixes https://github.com/ledgerwatch/erigon/issues/5865

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-10 22:41:04 +00:00
calmbeing
0ad765930d
Apply BSC Gibbs upgrade for mainnet (#6211)
For issue #6163, based on pr #5359 of Gibbs , Supported BSC mainnet
Gibbs hardfork
2022-12-07 18:20:14 +07:00
Tim Mustafin
70851c35ee
[BSC] support for Moran fork (#5696)
This PR brings support for BSC Moran fork

Co-authored-by: Timur Mustafin <timur@mustafin.dev>
2022-10-11 13:33:32 +01:00
Levi Aul
2c1d617b41
Ensure system contracts created by upgrades get persisted correctly (#5424) 2022-09-20 09:06:14 +01:00
Levi Aul
600837a23f
Apply BSC Gibbs upgrade (for Chapel, Rialto) (#5359) 2022-09-13 22:34:02 +03:00
ledgerwatch
820014734f
[BSC] fix for the Euler fork (#4500)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-20 08:53:01 +01:00
Enrique Jose Avila Asapche
963fb7a7f5
BSC main net Euler fork (#4461)
* added euler into chainConfig

* parlia abi update

* updated upgrade.go

* ops/

* added euler gas usage

* added eulerBlock for bsc

* changed block positioning

* comment
2022-06-16 15:32:32 +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
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
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