Commit Graph
125 Commits
Author SHA1 Message Date
aaronbuchwaldandGitHub 0eef0d28e2 Bump avalanchego dep and update version for next release (#770)
* Bump avalanchego dep and update version for next release

* Update cache sizes

* Update flag in run script to replace staking-enabled=false
2023-08-02 15:28:19 -04:00
aaronbuchwaldandGitHub 246815e95d Add warp contract implementation (#718)
* Add warp contract implementation

* Cleanup predicate test

* Fix new function signature

* Replace invalid fuzz test with unit test

* Add chain config to enable warp API for warp e2e test

* remove unused var

* Add experimental warning and move warp precompile to x/ package

* fix warning label

* Fix warning

* vm test nits

* Improve sendWarpMessenger sol comment

* more vm warp test nits

* Move warp params into params package

* More vm warp test nits

* Address more PR comments

* Remove triggerTx2

* Add check for expected topics from sendWarpMessage log

* Fix config test

* Fix incorrect replace

* remove unnecessary echo

* Address comments

* Address comments

* Address PR comments

* Improve comments

* Convert [32]byte type to common.Hash

* Add base cost for getVerifiedWarpMessage

* fix require equal type check

* Fix updated awm message format

* Update warp message format

* Move IWarpMessenger.sol to interfaces/

* Add newline to warp genesis

* uncomment assertion

* Fix broken links in README
2023-07-31 10:56:25 -04:00
aaronbuchwaldandGitHub 2d89a14f35 Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release (#757)
* Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release

* bump anr version to v1.7.1
2023-07-26 12:05:44 -04: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
AnushaandGitHub 2afc51cbe7 Clean up gossip (#744) 2023-07-19 15:37:55 -07:00
Darioush JalaliandGitHub 170ad2361b precompile accepter should take logIdx (#728)
* precompile accepter should take logIdx

* minimize mock

* copyright yr

* add comments
2023-07-17 20:53:17 -04:00
aaronbuchwaldandGitHub 05182799b9 Add signature aggregation helpers (#711)
* Add signature aggregation helpers

* Fix

* Move WarpQuorumDenominator into new file

* Address comments

* fix var rename

* Improve comments

* Address comments
2023-07-07 14:56:58 -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
morrisettjohnandGitHub 9332360800 added config setting to prune warpdb (#702)
* added config setting to prune warpdb

* refactored warp prune uint test

* message

* fixed up nits

* fixed nits

* fixed nits

* Update plugin/evm/config.go
2023-06-30 14:38:15 -04:00
aaronbuchwaldandGitHub 15b3dfd5fe Update load test to use ANR for network setup (#579)
* Update load test to use ANR for network setup

* Remove ToWebsocketURI that relies on strings feature added in go1.20

* Update load test to use ENV var from CI if populated

* Move env var logic into NewDefaultANRConfig

* Add init functions and clean up comments

* Remove unnecessary helper

* Remove unneeded cmd

* Cleanup

* Address PR comments

* Move 2 min timeout for SetupNetwork to the start of the function
2023-06-27 14:48:52 -04:00
Ceyhun OnurandGitHub e7d1a6c504 bump version to v0.5.2 (#681)
* bump version to v0.5.2

* downgrade avalanchego to 1.10.2

* update compatibility
2023-06-26 21:54:10 -04:00
aaronbuchwaldandGitHub d967722d49 Increase trie dirty default cache size to 512MB (#656) 2023-05-24 11:38:17 -04:00
Gyuho LeeandGitHub c1ec77d408 plugin/evm: remove unncessary tx.Hash op in map iter (#648)
Signed-off-by: Gyuho Lee <[email protected]>
2023-05-22 15:29:11 -04:00
Gyuho LeeandGitHub ebffd8f019 plugin/evm: fix godoc typo (#647)
Signed-off-by: Gyuho Lee <[email protected]>
2023-05-22 15:10:51 -04:00
aaronbuchwaldandGitHub 532a0e9581 Bump avalanchego dep to v1.10.1 and bump version to v0.5.1 (#634) 2023-05-01 12:21:02 -04:00
70720cb5cf Fail outstanding app requests on shutdown (#618)
Co-authored-by: aaronbuchwald <[email protected]>
2023-04-20 10:15:57 -07:00
Darioush JalaliandGitHub 534ee8f8fc Make state sync request size configurable (#614)
* Make state sync request size configurable

* finish passing the parameter

* set default to 256
2023-04-12 14:26:11 -04:00
aaronbuchwaldandGitHub 4a550f04b1 Bump avalanchego to v1.10.0 (#604)
* Bump avalanchego to v1.10.0-fuji-rc.2

* Add comptibility version

* Bump avalanchego dep to v1.10.0 and update version to v0.5.0

* Fix interface changes from avalanchego

* Update compatibility in README
2023-04-12 13:04:01 -04:00
aaronbuchwaldandGitHub 0f21037e93 Update log levels (#609) 2023-04-10 13:34:25 -04:00
Ceyhun OnurandGitHub 1df8430eb1 move runner and export it (#539)
* move runner and export it

* add version str
2023-04-07 11:13:46 -04:00
aaronbuchwaldandGitHub 515cc6a984 Warp prep nits (#606)
* Move verifyWithContext debug log to correct location

* Disable warp API by default
2023-04-05 11:19:38 -04:00
aaronbuchwaldandGitHub 159b27d0b9 Add more logs on shutdown (#584) 2023-03-24 10:06:07 -04:00
aaronbuchwaldandGitHub 5d2af3bcf9 Warp preparation updates (#591)
* Initialize WarpSigner/PublicKey in snow ctx in vm test setup

* Fix receipt precompile acceptor handling
2023-03-24 10:05:35 -04:00
Darioush JalaliandGitHub 93b7cb77ea release tickers on shutdown (#574)
* release tickers on shutdown

* move shutdownWg.done to other defer block
2023-03-17 09:46:56 -04:00
aaronbuchwaldandGitHub 783fbbd1be Warp preparation (#573)
* Add warp precompile preparation

* Update hash slice packing

* Remove unnecessary local var

* Add VM type assertion

* Enable Warp API by default
2023-03-16 15:15:26 -04:00
d628c176f0 Precompile pre post handling (#524)
* Re-apply warp precompile interface changes

* Address nits

* Separate predicate storage slot preparation into separate function in statedb

* fix lint

* improve miner enforcePredicates comment

* Add HashSliceToBytes test case for empty slice

* Address comments

* Address comments WIP

* Pre+post handling diff for shared mem precompile

* Separate proposer and general precompile predicates

* Update ShouldVerifyWithContext to return true iff proposer predicate is specified

* Add checkPredicates unit test

* Update .gitignore

* goimports

* update

* goimports config

* Address PR review comments and improve comments

* Fix typo

* Address PR comments

* Add rules into PrepareAccessList

* Only copy bytes in preparePredicates if predicate precompile is active

* Address PR comments

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-03-16 11:34:49 -04:00
9a537aa109 state modifications as network upgrade (#549)
Co-authored-by: Aaron Buchwald <[email protected]>
2023-03-08 13:10:35 -08:00
Ceyhun OnurandGitHub 5d26779937 remove stderr pipelining (#562) 2023-03-07 09:25:24 -05:00
427afc5457 Start release cycle v0.4.12 (#559)
* start v0.4.12 release cycle

* add setup action to lint ci for proper go version

* Bump version in plugin/evm/version.go

* Remove go version pin

* Revert "Remove go version pin"

This reverts commit e651bebbdcb51afab1291374ff5c20c4a14f20c5.

* bump golangci-lint-acion to @v3

* bump golangci lint

* try 1.48

* golangci-lint v1.51 and goimports leveldb file

* migrate linting changes from coreth

* goimports and fix diagram comments

* Fix bad goimports changes

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-03-07 09:07:17 -05:00
aaronbuchwaldandGitHub b592052bd4 Start coreth migration (#552)
* Start coreth migration

* Bump version to v0.4.11 and avalanchego dep

* goimports core/blockchain.go

* Update compatibility.json

* Update compatibility in README

* Bump avalanchego dep to v1.9.10
2023-03-01 17:44:38 -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 38dcbacbca Start v0.4.10 release cycle (#533) 2023-02-21 15:08:47 -08:00
aaronbuchwaldandGitHub d1157939b7 Bump avalanchego to v1.9.9-rc.4 (#526)
* Bump avalanchego to v1.9.9-rc.4

* Fix imports

* Bump compatibility.json for latest avalanchego release
2023-02-20 14:47:36 -08:00
aaronbuchwaldandGitHub c63a940a0d Remove unnecessary gasprice updater logic and tests (#514)
* Remove unnecessary gasprice updater logic and tests

* Remove comment referencing gas price updater

* Revert default price limit change

* Move set min fee back to vm.go

* Update to retain previous tx pool gas price setting behavior
2023-02-17 11:19:01 -08:00
9cbc7fe834 Get signature endpoint: alternative PR with different packaging (#507)
* base warp backend

* add signature caching

* add docs

* error handling

* pr fixes

* basic signature request

* hash unsigned message for key

* implement new Request and RequestHandler interfaces

* signature handler impl without constructing one

* fix import

* quick pr fixes and merge

* quick pr fixes and merge

* save signature instead of whole msg

* use avaGO cache

* rename warpBackend and docs

* fix nits

* Update plugin/evm/warp_backend.go

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

* Update plugin/evm/warp_backend.go

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

* fix pr nits

* pr fixes and testing

* type check for caching

* handlers and request before tests

* fix imports

* signature handler with stats and test

* use memdb and remove extra test

* remove unused

* fix imports

* fix imports

* nit

* update license year

* use require noError

* saving message in db and pr fixes

* create noop signature handler and refactor code handler

* get signature endpoint

* add api arg to evm client

* Update sync/handlers/handler.go

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

* update backend return value

* refactor handlers to network handler

* change constructor of handler stats

* pr cleanups

* warp api

* initialize warp backend

* build fix

* wip

* warp api follows eth api pattern

* cleanup and comments

* clean up response

* fix warp client return type

* nits for get-signature-endpoint (#502)

Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: cam-schultz <[email protected]>

* resolve merge conflict

* warp: Group packages for symmetry w/ sync

* more reshuffle

* more shuffle

* pr comments

* fix

* update to []byte

* update svc return type

* rename arg

* fix type

* add stats pkg

---------

Co-authored-by: Matthew Lam <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
2023-02-10 09:54:50 -08:00
94e965bb2f Signature Request Handler (#459)
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2023-02-08 17:19:44 -08:00
cam-schultzandGitHub 450dcb9dd3 build with avago v1.9.8 (#498)
* build with avago v1.9.8

* add indirect deps

* build fix

* another build fix

* try to fix lint job
2023-02-07 20:08:42 -08:00
339f1206fd remove current rules (#481)
Co-authored-by: Darioush Jalali <[email protected]>
2023-02-04 20:20:44 -08:00
minghinmatthewlamandGitHub 66c4cd4d3f Warp backend interface and implementation (#452)
* base warp backend

* add signature caching

* add docs

* error handling

* pr fixes

* hash unsigned message for key

* quick pr fixes and merge

* save signature instead of whole msg

* use avaGO cache

* rename warpBackend and docs

* fix nits

* Update plugin/evm/warp_backend.go

* Update plugin/evm/warp_backend.go

* fix pr nits

* pr fixes and testing

* type check for caching

* fix imports

* use memdb and remove extra test

* remove unused

* fix imports

* saving message in db and pr fixes

* update copyright

* update backend variable naming

* add comment about saving db vs cache
2023-02-01 10:19:06 -08:00
aaronbuchwaldandGitHub 1de309e1ba Improve version output (#463) 2023-01-28 13:00:03 -05:00
Ceyhun OnurandGitHub 4446703a0a Coreth 0.11.6 sync (#436)
* sync changes from coreth-0.11.6

* remove diff patch

* revert format changes

* nits (#441)
2023-01-23 14:06:36 -05:00
aaronbuchwaldandGitHub b5faa4f15b Bump avalanchego dep to v1.9.7 and start v0.4.9 release cycle (#433)
* Bump avalanchego dep to v1.9.7 and start v0.4.9 release cycle

* Update compatibility.json and README
2023-01-23 13:44:45 -05:00
e169ed5866 Add requirement that Subnet-evm upgrade is enabled at genesis (#419)
* Add requirement that Subnet-evm upgrade is enabled at genesis

* Add test for nil

* remove err

* modify comment

* add one more comment

* test  improvements

* fix comment

* fix comment

* timestamp

* fix existing test:

* fix one more existing test

* fix spacing

* clean up

* address comments

* use commmon big 0

* address comments

* Check before upgrade bytes

* comment tests until new NetworkUpgrade is added

* skip instead of comment out

* add config flag

* add unit test to test override

* lint

* remove skips

* lint

* unify to one test

* fix typo

Co-authored-by: aaronbuchwald <[email protected]>
2023-01-13 16:35:00 -05:00
aaronbuchwaldandGitHub a4ad7cdeca Bump to v0.4.8 and bump AvalancheGo dependency to v1.9.6 (#429)
* Bump avlanachego dep to v1.9.6 and bump version to v0.4.8 for release

* Fix simulator go mod
2023-01-11 17:45:22 -05:00
Darioush JalaliandGitHub 4d3ad1828a Light client mode to unlock dynamic state sync (#424)
* Light client mode to unlock dynamic state sync

* revert version to pass ci (?)

* fix simulator go.mod
2023-01-10 11:08:35 -05:00
aaronbuchwaldandGitHub 93258aa300 Bump avalanchego to v1.9.5 (#415)
* Bump avalanchego to v1.9.5-rc.0

* go mod tidy simulator

* Bump avalanchego v1.9.5-rc.1

* Bump avalanchego

* bump avalanchego and bump sevm version

* go mod tidy simulator

* Add rpcchainvm protocol version to compatibility.json
2022-12-22 14:12:10 -05:00
Ceyhun OnurandGitHub e973d55467 Update reward manager (#417)
* fixed block validation during reward manager deactivation

* add more comments

* Update miner/worker.go
2022-12-20 10:28:48 -05:00
aaronbuchwaldandGitHub 49458d22df Start v0.4.6 release cycle (#409) 2022-12-12 10:41:39 -05:00
Gyuho LeeandGitHub 61d41158e9 Minor format updates to plugin/evm configurations (#406)
* plugin/evm/config: place all tx pool fields together

Signed-off-by: Gyuho Lee <[email protected]>

* plugin/evm: simplify default rejournal duration field

Signed-off-by: Gyuho Lee <[email protected]>

Signed-off-by: Gyuho Lee <[email protected]>
2022-12-09 14:55:09 -07:00
Gyuho LeeandGitHub 1d09603011 *: make tx pool configurable (#401)
* *: make tx pool configurable

Signed-off-by: Gyuho Lee <[email protected]>

* *: move default tx pool config back to struct

Signed-off-by: Gyuho Lee <[email protected]>

Signed-off-by: Gyuho Lee <[email protected]>
2022-12-08 18:01:11 -07:00