25 Commits
Author SHA1 Message Date
zeekay 65408996d7 Update import path 2024-01-03 09:50:41 +01:00
zeekay f8dd36a8be Update SubnetEVM 2024-01-03 09:44:09 +01:00
e77c9c97cc coreth sync: 0.12.4-rc.0 -> 0.12.7 (#975)
* coreth sync: 0.12.4-rc.0 -> 0.12.7

* Review coreth 0.12.7 (#980)

* Apply suggested changes from https://github.com/ava-labs/coreth/pull/381/files

* drop reexec=0

* add txHashes

* bump avalanchego

* remove manager

* fix compat test

* bump version for e2e tests

---------

Co-authored-by: Ceyhun Onur <[email protected]>
2023-11-07 14:35:02 -05:00
4721f3ebe2 Sync coreth v0.12.4 rc0 (#694)
* apply diff to rc0

* replace coreth with subnet-evm

* go mod tidy

* remove must commit

* remove apricots

* replace coreth with subnet-evm

* rename banff and cortina

* test memory db

* add dUpgrade

* fix errors

* sync with v0.12.4-rc0

* more diffs

* change templates

* readd preparePredicateSlots

* run goimports

* readd tx allow list check to txpool

* Fix tests

* readd subnet evm check for tests

* fix tests

* add gas limit & coinbase fakers

* Fix timestamp types

* check error from newblockchain

* fix gas limit in simulated genesis

* downgrade ci to go 1.19

* gofmt files

* rebump go to 1.20

* bump anr to latest

* bump anr to latest

* prepare predicate storage slots in Subnet-EVM

* uncomment tests

* change order of airdrop memory cleanup

* add utils import

* Coreth 0.12.4 x apply (#720)

Co-authored-by: Darioush Jalali <[email protected]>

* move instruction sets

* revert unpack changes

* reduce diffs

* move genesis verify to vm (#753)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

---------

Co-authored-by: Darioush Jalali <[email protected]>

* avoid adding/removing GasLimits in tests (#755)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

* avoid adding/removing GasLimits in tests

* nit

---------

Co-authored-by: Ceyhun Onur <[email protected]>

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-07-26 09:45:17 -04:00
Ceyhun OnurandGitHub 5402fdf216 Differentiate mandatory/optional Subnet-EVM Network Upgrades (#640)
* remove network upgrades from upgrade configs and enforce them in vm init

* fix tests

* remove unused var

* remove extra shutdown

* copy test chain config when modify

* use SimulatedTestChainConfig for simulated tests

* copy modified test chain config

* add optional upgrades

* Add tests

* fix comments

* use unmarshal in test

* unexport functions

* add commented out test

* add TODO comment
2023-07-03 10:21:03 -04:00
aaronbuchwaldandGitHub 0f21037e93 Update log levels (#609) 2023-04-10 13:34:25 -04:00
aaronbuchwaldandGitHub 0a74da4f50 Sync geth nits (#585)
* Change feehistory input type from int to uint64

* Add err handling for UnpackLog with zero topics in log
2023-03-20 17:03:28 -04:00
Darioush JalaliandGitHub b10fc31c91 convert from int->uint for more clarity (#575) 2023-03-17 09:45:37 -04:00
Ceyhun OnurandGitHub 364486ec3a Add ChainConfig JSON Unmarshaller (#554)
* add unmarshaller

* add comments
2023-03-07 09:38:58 -05:00
9b0a308ce7 add custom marshaller for GetChainConfigResponse api (#546)
* add yet another custom marshaller to GetChainConfigResponse api

* enforce a json len before allocation

* Move chain config wrapper type to params/ and add test

* Fix trailing newline

* Remove flaky unit test

* Add back unit test with JSONeq

---------

Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
2023-03-01 16:51:39 -08:00
Ceyhun OnurandGitHub d8a3e64378 Stateful Precompile Improvements (#389)
* move inline string ABIs to separate files and embed them (#383)

* move inline string ABIs to separate files and embed them

* fix tests

* fix tests

* unexport function

* Update accounts/abi/bind/bind.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix func name

Co-authored-by: Darioush Jalali <[email protected]>

* replace getByKey with getByAddress (#395)

* rework on panics in precompiles (#418)

* rework on panics in precompiles

* Update precompile/allow_list.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix reviews

* wrap errors in ConfigurePrecompiles

* cleaner errors

* Update utils.go

* Update miner/worker.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update core/state_processor.go

Co-authored-by: aaronbuchwald <[email protected]>

Co-authored-by: aaronbuchwald <[email protected]>

* Precompile Specific Packages (#420)

* rework on panics in precompiles

* Update precompile/allow_list.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix reviews

* wrap errors in ConfigurePrecompiles

* cleaner errors

* move reward manager precompile to package (WIP)

* rename files

* fix abi path

* move typecheck

* move precompiles to their own packages

* refactor precompile template

* remove test file

* upate comments

* rm test files

* new allowlist package

* Update precompile/utils.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/utils.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix nits

Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>

* rename fee manager config struct (#427)

* rename struct

* rename fee config managers to fee managers

* fix comments

* Generalized upgrades rb (#434)

* introduce precompiles as registrable modules

* add precompile specific contract tests

* remove print debug

* add unmarshal tests

* remove unnecessary func

* fix initial disabled value

* register all modules in core/evm/contract_stateful

* more refactor & test fix

* sync template

* fix more tests

* rename file

* add comment

* rename

* fix linter

* use require error contains

* remove whitespace

* trim mock interface

* sort steps

* reviews

* Update precompile/stateful_precompile_module.go

* Update params/precompile_config.go

* Update params/precompile_config.go

* fix reviews

* add new module to configs and group module functions

* generalized-upgrades-rb review (#474)

* keep genesis disabled fix

* nits

* nits

* nit

* review fixes

* Update precompile/allowlist/allowlist.go

* use address in map

* fix linter for embedded keys

* update err messages

* more err update

* remove unnecessary function (#478)

* Start work on breaking cyclic dependency (#496)

* Update core/state_processor.go

* fix reviews

* Update precompile/contracts/txallowlist/contract_test.go

* Generalized upgrades rb nits0 (#512)

* Minor improvements

* restore readOnly

* more updates

* Add back readOnly to allow list tests

* Precompile improvements merge (#513)

Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
Co-authored-by: Matthew Lam <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Anusha <[email protected]>
Co-authored-by: Hagen Hübel <[email protected]>
Co-authored-by: minghinmatthewlam <[email protected]>
Fix: typos (#428)
fix allow list comments (#469)
fix CGO flags issue (#489)
fix lint job (#499)

* review fixes

* minor nits

* fix precompile generator

* fix fee manager config test

* remove debug files

* Update core/state_processor.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix comments

* restore statedb ordering

* fix configure in reward manager

* precompiles: adds a regression test for the IsDisabled case in AvalancheRules (#515)

* Rename configs: alternative (#520)

* alternative renaming for precompile configs

* fixes

* update naming

* rename to AllowListConfig

* simplify

* move blackhole check to module registerer (#523)

* move blackhole check to module registerer

* check blackhole first

* add unit test

* Add test case for registering module outside of reserved range

---------

Co-authored-by: Aaron Buchwald <[email protected]>

* precompile: improve test structure (#517)

* refactor precompile tests

* minor improvements

* nit

* fix merge

* rename package

* pr comments

* rm file

* merge AllowListTests

* pr comments

* explicit BeforeHook

* wspace

* Mark TestTransactionIndices flaky

---------

Co-authored-by: Aaron Buchwald <[email protected]>

* nit improvements (#529)

* nit improvements

* move comments to README

* Update cmd/precompilegen/template-readme.md

* Rename new config (#528)

* rename configurator's new config to make config

* use new built-in to create new config instance

* precompile: just nits (#534)
2023-02-22 12:27:48 -08:00
aaronbuchwaldandGitHub 342f4af991 Migrate replay protection bypass for Nick's Method Signature txs (#377) 2022-11-29 13:39:16 -05:00
Ceyhun OnurandGitHub ce7fddfba3 sync with coreth-v0.10.1 (#287)
* sync with coreth-v0.10.1

* fix generate test

* go mod tidy in simulator

* my attempt at porting corethv0.10.1

* reconcile trie

* more reconcile

* getting closer

* reduce diff

* fix

* move to blockchain api
2022-10-24 16:13:37 -04:00
Ceyhun OnurandGitHub a6d013d4ab Coreth 0.8.16 rc2 (#216)
* Unwrap ETHChain

* hook in vm.ethConfig

* statesync for subnet-evm

* remove unused configJSON

* add err check

* add synchronization

* add default config values

* delay initialization of gossiper

* Revert "add synchronization"

This reverts commit 2e8c93e58d7853de15a21ebd1460a3cd3858a6af.

* fix test

* fix statesync code prefix issue

* fix comment

* wip

* wip2

* add coreth changes

* Merge branch 'master' into coreth-0.8.16-rc2

* updates

* remove coreth from go.mod

* fix linter

* fix

* update gas prices (?)

* fix tracer test

* move dependabot yml to upper file

* more changes ported in from coreth 0.8.16

* Update sync/README.md

Co-authored-by: Ceyhun Onur <[email protected]>

* Update sync/README.md

Co-authored-by: Ceyhun Onur <[email protected]>

* Update sync/README.md

Co-authored-by: Ceyhun Onur <[email protected]>

* Update core/rawdb/accessors_state_sync.go

* port missing file from coreth

* fix-import

* subscribe before goroutine

* Rebase apply coreth diff onto statesync

* fix EOF in tests

* Nits (#265)

* Nits

* Add EIP-1559 link to readme

* Fix linting introduced by merge
2022-09-22 18:42:37 +09:00
Darioush JalaliandGitHub e54238e908 geth import allowlist (#243)
* geth import allowlist

* attempt 2

* add permission / minimize diff

* fix allowlist: should pass

* add || true

* changes from review comments

* remove rawdb

* remove rawdb

* remove abi and params
2022-09-01 10:26:17 -04:00
Ceyhun OnurandGitHub 2c26de1a8d Add get chain config api (#234)
* add getUpgrades & getActivedPrecompiles API requests

* discard precompile upgrades from API if disabled

* replace GetUpgrades with GetChainConfig API

* rename active precompiles API

* remove upgrades from name

* add comments for adding new precompiles to GetActivePrecompiles
2022-08-30 09:53:42 -04:00
Darioush JalaliandGitHub 255a0fc609 Expose eth_call error code (#212) 2022-08-19 00:19:00 -07:00
Darioush JalaliandGitHub 5c5da02bb4 CallDetailed (#211) 2022-08-18 23:34:52 -07:00
91664ba114 init fee config precompile (#121)
* init fee config precompile

* add fee config manager precompile

* complete precompile internal functions

* nits

* add fee config provider

* init cache with limit

* added getFeeConfig func to precompile

* add fee config tasks to hardhat

* add getFeeConfigs for apis

* add unit tests

* update tx pool only if fee config is activated

* Update plugin/evm/block_verification.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix for reviews

* add initial fee config to precompile & default back to chain config

* rename functions in tests

* add deployer allow list test suit

* add last accepted at

* add last accepted test to precompile test

* Revert selectBigWithinBounds changes

* use big int cmp

* move precompile test to last

* fix unit tests

* remove flaky test & ensure tx pool is reorged

* move local rpc into new file

* add comment to cachableFeeConfig

* add timestamp to block context

* add error to newOracle

* fix moar nits

* Nits

* revert allowlist setter helpers

* increase SetFeeConfigGasCost for setting last changed

* add configure validation to fee precompiles

* Address nits

* increase gas cost for wagmi

* Remove fee config from fee config manager config

* Update contract-examples/README.md

Co-authored-by: aaronbuchwald <[email protected]>

* add license to tests

* remove log

* add err check

* Update precompile/utils.go

Co-authored-by: aaronbuchwald <[email protected]>

* Remove no longer necessary test

* contract  example nits

* fix contract tests

* lower fees & split into two tests

* use explicit fees

* Nits

* feeconfig nits

* nit

* Fee config precompile nits (#145)

* Add COPYING file from geth (#83)

* Add COPYING file from geth

* Add COPYING.LESSER file

* Add version to code (#136)

* Add version to code

* bump version

* Add version to goreleaser

* Remove version from code in favor of setting at compile time

* use version env

* use v prefix in the version

Co-authored-by: Aaron Buchwald <[email protected]>

* [AV-1855] Simplify build script to place binary in avalanchego plugin directory (#81)

* Simplify build script to place binary in avalanchego plugin directory

* echo binary path

* split shutdown into network stop and client stop, call network stop
after each test, call client stop after suite ends

* add check for network up after stop

* switch to ANR

* bump script to ANR 1.1.3

* fix cluster status check

* minor fix

* cleanup of health/status check

* lint

* nits

Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Aaron Buchwald <[email protected]>
2022-07-12 10:37:18 -04:00
Ceyhun Onur f0b2556dd8 Merge branch 'master' into minter-precompile 2022-03-12 20:34:30 +03:00
Aaron Buchwald 2774a26377 Nits 2022-03-11 13:05:15 -05:00
Ceyhun OnurandPatrick O'Grady 1798664491 merge coreth 0.8.6 2022-03-06 16:32:54 -08:00
Ceyhun Onur c50a2fc0b7 remove deprecated contract check 2022-02-01 14:52:44 +03:00
Ceyhun Onur d41968a2e2 coreth 0.8.4 2022-01-31 17:22:51 +03:00
Patrick O'Grady f6aef56afd first commit 2021-12-15 12:28:56 -08:00