Commit Graph
145 Commits
Author SHA1 Message Date
Ceyhun OnurandGitHub eb4ba695ea add get predicate result bytes helpers (#906)
* add get predicate result bytes helpers

* typed errs

* add comment
2023-09-28 17:04:16 +03:00
Alberto BenegiamoandGitHub e4a507c99c Change from parsing predicate bytes to checking they equal expected value (#914)
Signed-off-by: Alberto Benegiamo <[email protected]>
2023-09-27 13:56:02 -04:00
d5adea278b rename WarpAPI to API (#864)
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2023-09-26 09:58:01 -07:00
Ceyhun OnurandGitHub 95817a816e bump versions (#880)
* bump versions

* bump anr
2023-09-20 20:47:36 +03:00
Dan LaineandGitHub 09ebd84b48 pass warpSigner instead of snow context into backend (#869) 2023-09-19 15:37:38 -04:00
318a6fe09d P2p sdk pull gossip (#861)
* Add SDK Router message handling (#316)

Co-authored-by: Stephen Buttolph <[email protected]>

* Fix hanging requests after Shutdown (#326)

* fix requests hanging after shutdown

* fix build

---------

Signed-off-by: Stephen Buttolph <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>

* Update to 1.10.10-rc.2 (#328)

* update to avalanchego 1.10.10-rc.2

* nits

* nit

* Add P2P SDK Pull Gossip (#318)

* add batchsize

* sync changes

* Drop outbound gossip for non vdrs (#862)

* Drop outbound gossip requests for non-validators (#334)

* drop outbound gossip requests for non validators

* nit

* nit

* sync changes

---------

Co-authored-by: Joshua Kim <[email protected]>

---------

Co-authored-by: Joshua Kim <[email protected]>
2023-09-19 15:09:47 -04:00
Ceyhun OnurandGitHub 6e22df3bc5 Add SDK Router message handling (#316) (#858)
* Add SDK Router message handling (#316)

Co-authored-by: Stephen Buttolph <[email protected]>

* revert avago version bump

* Fix hanging requests after Shutdown (#326) (#859)

* Fix hanging requests after Shutdown (#326)

* fix requests hanging after shutdown

* fix build

---------

Signed-off-by: Stephen Buttolph <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>

* Bump avago rc (#860)

* Update to 1.10.10-rc.2 (#328)

* update to avalanchego 1.10.10-rc.2

* nits

* nit

* add batchsize

* increase timeout dynamically

---------

Co-authored-by: Joshua Kim <[email protected]>

---------

---------
2023-09-18 21:24:58 -04:00
Dan LaineandGitHub 0b408c0938 rename WarpBackend to Backend (#863)
* rename WarpBackend to Backend

* rename receiver

* rename receiver
2023-09-18 18:39:02 -04:00
Ceyhun OnurandGitHub a1c23956ad Add manager allowlist role (#801)
* update npm package

* expand allowlist.configure

* add activation func to precompile functions

* move chainconfig to precompileconfig

* use chainconfig in verification

* trim unnecessary changes

* add manager role

* fix tests

* add verify test

* nits

* add mocks

* reviews

* fix linter

* fix benchmarks

* nits

* nits

* fix alow list bind tests & ensure they're being tested (#841)

* simplify can modify check

* fix vm tests

* Add manager allowlist role merge (#850)

* Warp stapling block context (#823)

* Add GetPredicateResults to BlockContext

* Serve predicate results from blockContext

* Allow extra data to extend past DynamicFeeWindow post DUpgrade

* Get vm warp unit tests working

* Bump ANR to intermediate version to fix incompatibility with AvalancheGo

* Add kc to EthKeyChain

* Bump avalanchego dep in scripts for CI

* Add block hash payload support

* Use gomocks for precompileconfig and predicater and re-write CheckPredicates with gomocks

* Use gomock for mock accessible state and block context

* Fix existing warp contract tests with mock block context

* Remove unused mockPredicater impl

* x/warp: add contract execution unit tests

* Update NewEVMBlockContext

* Add AppendExtra to syncervm to fix tests

* x/warp: add unit test for multiple predicate results

* core: add unit test for CheckPredicates insufficient gas

* Update receive warp message test to trace block and assert the expected result

* Fix lint

* Update warp solidity contracts

* Fix block context mocks for bench

* Update precompile/precompileconfig/config.go

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

* Cleanup

* precompile/results: Add predicate results tests + comments

* nits

* precompile/results: omit tx predicate results if empty

* core: add invariant comment to predicate check

* Address PR comments

* Fix unpackWarpMessage and add unit tests

* Rename OriginChainID -> SourceChainID to match ago warp message type

* nits

* x/warp: set public key in warp predicate unit tests

* Update payload format

* Clarify IWarpMessenger verified message return types

* core/state: improve statedb warp specific comments

* Update input param type to uint32 to avoid potential overflow on conversion

* Update GetPredicateStorageSlots arg type to uint32

* warp/payload: add README for payload serialization (#835)

* Fix merge

* x/warp: add unit test for PrimaryNetwork to Subnet predicate verification (#831)

* precompilebind: add ChainConfig with DUpgrade enabled to precompile chain config verify template
2023-09-13 09:56:57 -04:00
aaronbuchwaldandGitHub 23bc5703da plugin/evm: Add ExampleWarp tests to vm warp unit tests (#836)
* plugin/evm: add ExampleWarp tests to vm warp unit tests

* Update ExampleWarp contract usage

* plugin/evm: update unit test to use different source / destination addresses
2023-09-12 17:53:36 -04:00
aaronbuchwaldandGitHub 523dcc272e Warp stapling block context (#823)
* Add GetPredicateResults to BlockContext

* Serve predicate results from blockContext

* Allow extra data to extend past DynamicFeeWindow post DUpgrade

* Get vm warp unit tests working

* Bump ANR to intermediate version to fix incompatibility with AvalancheGo

* Add kc to EthKeyChain

* Bump avalanchego dep in scripts for CI

* Add block hash payload support

* Use gomocks for precompileconfig and predicater and re-write CheckPredicates with gomocks

* Use gomock for mock accessible state and block context

* Fix existing warp contract tests with mock block context

* Remove unused mockPredicater impl

* x/warp: add contract execution unit tests

* Update NewEVMBlockContext

* Add AppendExtra to syncervm to fix tests

* x/warp: add unit test for multiple predicate results

* core: add unit test for CheckPredicates insufficient gas

* Update receive warp message test to trace block and assert the expected result

* Fix lint

* Update warp solidity contracts

* Fix block context mocks for bench

* Update precompile/precompileconfig/config.go

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

* Cleanup

* precompile/results: Add predicate results tests + comments

* nits

* precompile/results: omit tx predicate results if empty

* core: add invariant comment to predicate check

* Address PR comments

* Fix unpackWarpMessage and add unit tests

* Rename OriginChainID -> SourceChainID to match ago warp message type

* nits

* x/warp: set public key in warp predicate unit tests

* Update payload format

* Clarify IWarpMessenger verified message return types

* core/state: improve statedb warp specific comments

* Update input param type to uint32 to avoid potential overflow on conversion

* Update GetPredicateStorageSlots arg type to uint32

* warp/payload: add README for payload serialization (#835)

* Fix merge
2023-09-12 13:10:26 -04:00
Ceyhun OnurandGitHub 124421fe5d override network upgrades (#839)
* override network upgrades

* genesis network upgrades defaults

* fix conflicts

* Update plugin/evm/vm.go
2023-09-12 11:28:59 -04:00
aaronbuchwaldandGitHub a59c7b4a60 Align on a single predicate type (#813)
* Align on single predicate type

* Revert BlockContext comment change

* Update PredicateContext comment

* Address comments
2023-08-25 15:41:43 -04:00
aaronbuchwaldandGitHub ce59e115b5 add mocks for precompile tests (#812)
* add mocks for precompile tests

* Update compatibility

* Bump AvalancheGo dep to v1.10.9

* Bump ANR dep to be compatible with ago v1.10.9

* revert ConfigurationBlockContext changes
2023-08-25 12:58:05 -04:00
aaronbuchwaldandGitHub e99ce82534 Add DUpgrade extra data (#811)
* Add DUpgrade extra data

* consensus/dummy: switch to using default insteaad of fallback case
2023-08-25 12:07:18 -04:00
053609c1f6 remove unnecessary upgrade test (#797)
Co-authored-by: Darioush Jalali <[email protected]>
2023-08-18 11:30:38 -07:00
Ceyhun OnurandGitHub 5ef5e4404d force register js tracer (#791) 2023-08-15 10:40:51 -04:00
Darioush JalaliandGitHub 2de3730d2b warp: Remove versiondb + re-order log processing (#776) 2023-08-15 10:30:37 -04:00
Joshua KimandGitHub 95b268804d Revert "add debug log for dropped pending txs notifications (#783)" (#790)
This reverts commit 8728df5795.
2023-08-14 18:17:24 -04:00
Joshua KimandGitHub 8728df5795 add debug log for dropped pending txs notifications (#783) 2023-08-09 14:58:16 -07:00
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