Commit Graph
269 Commits
Author SHA1 Message Date
Ceyhun OnurandQuentin Mc Gaw cdcc5cc2f7 move ap4 block gas cost check to header
See https://github.com/ava-labs/coreth/pull/849
2025-03-13 16:41:21 +01:00
Ceyhun OnurandQuentin Mc Gaw fbdc6f17d9 partial cherry-pick: Coreth/Implement ACP-176
See https://github.com/ava-labs/coreth/pull/815
2025-03-13 16:41:19 +01:00
Quentin Mc Gaw af698ac18e Merge branch 'master' into merge-coreth-master 2025-03-13 16:40:34 +01:00
Stephen ButtolphandQuentin Mc Gaw 9b0be0edfe Implement header.ExtraPrefix serialization in upgrade/ packages
See https://github.com/ava-labs/coreth/pull/846
2025-03-13 12:44:16 +01:00
Stephen ButtolphandQuentin Mc Gaw ebff831b4f Add Rules to PredicateBytesFromExtra
See https://github.com/ava-labs/coreth/pull/845
2025-03-13 12:44:05 +01:00
Stephen ButtolphandQuentin Mc Gaw a414698c8f Move predicate header parsing
See https://github.com/ava-labs/coreth/pull/824
2025-03-13 12:43:57 +01:00
Stephen ButtolphandQuentin Mc Gaw 7b22ec6ef2 Round up in header.EstimateRequiredTip
See https://github.com/ava-labs/coreth/pull/840
2025-03-13 12:43:37 +01:00
Stephen ButtolphandQuentin Mc Gaw 3766df5748 Move GasLimit handling into the header package
See https://github.com/ava-labs/coreth/pull/822
2025-03-13 12:43:19 +01:00
Stephen ButtolphandQuentin Mc Gaw 23576e668f Move header.ExtraPrefix calculation
See https://github.com/ava-labs/coreth/pull/825
2025-03-13 12:43:06 +01:00
Stephen ButtolphandQuentin Mc Gaw 93a5ce31cb Improve plugin/evm/header tests
See https://github.com/ava-labs/coreth/pull/816
2025-03-13 12:42:54 +01:00
Stephen ButtolphandQuentin Mc Gaw f6b1d3ab47 Refactor AP3 Window and Params
See https://github.com/ava-labs/coreth/pull/808
2025-03-13 12:42:44 +01:00
Quentin McGaw dcbb43815a feat(internal/ethapi)!: reject eth_getProof queries for historical blocks
- default behavior for pruning mode to reject blocks before the 32 blocks preceding the last accepted block
- default behavior for archive mode to reject blocks before ~24h worth of blocks preceding the last accepted block
- archive mode new option `historical-proof-query-window` to customize the blocks window, or set it to 0 to accept any block number

See https://github.com/ava-labs/coreth/pull/719
2025-03-13 12:41:27 +01:00
Stephen ButtolphandQuentin Mc Gaw 993b1b848a Refactor BlockGasCost calculations
See https://github.com/ava-labs/coreth/pull/792
2025-03-13 12:41:14 +01:00
Stephen ButtolphandQuentin Mc Gaw e2eb81efd1 Remove header.Extra from EstimateNextBaseFee
See https://github.com/ava-labs/coreth/pull/793
2025-03-13 12:41:03 +01:00
Stephen ButtolphandQuentin Mc Gaw 95b67daaa4 Refactor header.Extra verification
See https://github.com/ava-labs/coreth/pull/788
2025-03-13 12:40:52 +01:00
Stephen ButtolphandQuentin Mc Gaw f2d604b380 Add F-Upgrade upgrades.Config support
See https://github.com/ava-labs/coreth/pull/770
2025-03-13 12:40:29 +01:00
be9a0e3614 remove ctx locks and use chain locks (#1483)
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2025-03-10 19:28:42 +00:00
40c6e3a8f0 eliminate an impossible error case from state.WriteState (#1473)
Signed-off-by: Tsachi Herman <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2025-03-06 13:37:25 +03:00
Ceyhun OnurandGitHub 7de5659d16 bump version to v0.7.2 (#1467) 2025-03-05 00:19:55 +03:00
Ceyhun OnurandGitHub 083e51fce9 fix multiarch docker binary build (#1461) 2025-03-04 23:26:34 +03:00
Ceyhun OnurandGitHub 225841e6f3 use ctx in validatorsManager (#1465) 2025-03-04 23:06:53 +03:00
b5698242c8 chore: Bump avalanchego to master (#1443)
Co-authored-by: Martin HS <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
Co-authored-by: Richard Pringle <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
2025-02-24 06:41:24 -08:00
5d1b0d8a14 Remove legacy gossip (#1435)
* Began #1428 by removing legacy gossip handler from network.go and its test file.

* Completed all recommended removals in #1428. Did not address any other changes in the original PR outside the scope of this issue

* Skip registration in Codec for removed EthTxsGossip type to ensure that numbering is consistent

* Fixed small RELEASES.md error incorrectly denoting version

* Apply suggestions from code review

Nit - typo, reduce git diffs

Co-authored-by: Quentin McGaw <[email protected]>
Signed-off-by: Austin Larson <[email protected]>

* Changed test codec version name for clarity

* Removed testCodecVersion due to later comparison with message.Version - use this for tests instead

---------

Signed-off-by: Austin Larson <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
2025-01-29 13:15:55 -05:00
337a89abb5 sync coreth changes up to 3148809 (#1434)
* move config package (coreth c167754ba)

* refactor: Split config package so it doesn't import core, core/vm (#734)

Co-authored-by: Quentin McGaw <[email protected]>

* bump avalanchego (same as coreth's 4765329f)

* Apply upstream fixes (up to d3cc618) (#766)

Co-authored-by: maskpp <[email protected]>
Co-authored-by: Aaron Chen <[email protected]>
Co-authored-by: Shiming Zhang <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Nathan <[email protected]>
Co-authored-by: Eric <[email protected]>

* fix panic if config duration is set to 0 (#765)

* fix mocks

* antithesis script patch: change dir for avalanchego build (for go.mod)

---------

Co-authored-by: Quentin McGaw <[email protected]>
Co-authored-by: maskpp <[email protected]>
Co-authored-by: Aaron Chen <[email protected]>
Co-authored-by: Shiming Zhang <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Nathan <[email protected]>
Co-authored-by: Eric <[email protected]>
2025-01-29 18:14:55 +03:00
arturrezandGitHub ae44afce7e deprecate avago keystore (#1426)
* deprecate avago keystore

* lint
2025-01-22 14:17:52 +03:00
Ceyhun OnurandGitHub 9f69e1d752 bump versions (#1419) 2025-01-07 20:48:11 +00:00
Quentin McGawandGitHub 5983bc9577 chore(all): simplify mocks generation (#1413)
- Localized mockgen commands in the package where they are needed
- Generate mocks from your IDE directly
- Platform independent way of generating mocks
- Check automatically mocks are kept up to date with their matching interfaces
- Check automatically mocks all have a matching source controlled generation command
- Remove license headers for generated mocks
- Generating mocks section added in contributing document
- Use same mockgen version as specified in go.mod
2025-01-07 13:21:54 +01:00
659ab8ce1c add validators pkg readme (#1398)
* add validators pkg readme

* Apply suggestions from code review

Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* Apply suggestions from code review

Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* Apply suggestions from code review

Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* nits

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Meaghan FitzGerald <[email protected]>
2024-12-30 13:42:09 -08:00
02588fd2f1 bump avalanchego to master (updates x/crypto) (#1410)
* bump avalanchego to master (updates x/crypto)

* fix

* Encapsulate Signer (#693)

* Remove the bls dependency
---------
Co-authored-by: Darioush Jalali <[email protected]>

* bump to v1.12.1

---------

Co-authored-by: Richard Pringle <[email protected]>
2024-12-18 14:40:44 +00:00
Ceyhun OnurandGitHub bb5aab6ce6 bump versions (#1406)
* bump avago to v1.12.0

* close database on shutdown

* update release notes

* rename verdb

* close only if standalone db

* bump avago branch version

* bump avago

* bump versions

---------

Signed-off-by: Ceyhun Onur <[email protected]>
2024-12-10 20:36:24 +03:00
Ceyhun OnurandGitHub 6a67aa9986 close database on shutdown (#1403)
* bump avago to v1.12.0

* close database on shutdown

* update release notes

* rename verdb

* close only if standalone db

* bump avago branch version

* bump avago
2024-12-10 20:20:57 +03:00
mountcountandGitHub f4c6dbd6f6 chore: fix problematic const name and some typos in comment (#1400)
Signed-off-by: mountcount <[email protected]>
2024-12-02 11:38:57 +03:00
Ceyhun OnurandGitHub 73729349c1 use nodeID filter and uptimePerc (#1390)
* use nodeID filter and uptimePerc

* add uptime seconds
2024-11-19 17:22:47 +03:00
Ceyhun OnurandGitHub 513e24c51e bump avago to v1.11.13-rc.1 (#1389)
* fix start timestamp

* add client

* rename sov to l1validator

* bump avago to v1.11.13-rc.1

* update compatibility
2024-11-16 01:22:56 +03:00
Ceyhun OnurandGitHub e04b627a99 rename sov to l1validator (#1387)
* fix start timestamp

* add client

* rename sov to l1validator
2024-11-15 16:47:21 -05:00
43fe68684d Refactor uptime tracking (#1388)
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
2024-11-15 19:01:56 +00:00
20b05f32c8 add db inspect (#1382)
* add db inspect

* Update plugin/evm/database.go

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

* reduce db code from vm

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-15 15:12:10 +00:00
Ceyhun OnurandGitHub 3553eb698d Use startimestamp (#1386)
* fix start timestamp

* add client
2024-11-15 00:46:57 +03:00
d1db878de8 Sign validator uptime warp msg (#1367)
* Bump avalanchego to master

* always sign uptime messages (testing branch)

* nits

* cleanup

* assign to correct `err`

* fix handler

* move ValidatorUptime type to subnet-evm

* disable always signing

* implement on the type itself

* remove unneeded code

* fix ut

* add validator state

* add pausable uptime manager

* remove stuttering name

* rename state listener

* add uptime tracking to VM

* remove unused param

* add wg for update validators

* update state before network shutdown

* restart bootstrapping status in test

* add get validator to state

* rename uptime to validator

* fix mock state

* tests

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* reviews

* reword errs

* fix test changes

* fix upgrades after deactivating latest in context

* use test branch from avalanchego

* use branch commit for ava version

* update e2e ava version

* update avago dep

* remove extra line...

* export struct

* implement acp118 signer and verifier

* avoid revalidating in sign

* refactor warp backend to use acp118 handler

* prune warp db before backend init

* add cache tests

* remove uptime msg type

* add cache test

* fix linter

* add validator uptimes

* bump avago getcurrentvalidators branch

* rename get validator IDs to NodeIDs

* sign uptime warp msg base on uptime calculator

* add tests

* reviews

* conflict fix

* custom err msg

* add listener mock

* bump avago test branch

* remove config

* remove api changes

* Revert "remove api changes"

This reverts commit 8ef763fca65a7144ac35b69889873728d3485558.

* remove wrapped cache

* use non-version db for validatorsDB

* remove errs from resume and pause

* check after stopping

* use expectedTime in tests

* reviews

* Update plugin/evm/vm.go

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

* fix len

* fix tests

* update avago branch

* use ctx from utils

* add empty check for source address

* nits

* remove log

* disable validators api by default

* fix test context

* use interfaces from pkgs

* improve comments

* Uptime validation nits (#1378)

* add uptime warp example

* remove log

* nit unused interface

* add weight and isSov as fields

* use validator struct in AddValidator

* add comments to example file

* fix test

* add new fields to tests

---------

Signed-off-by: Ceyhun Onur <[email protected]>

* Update plugin/evm/validators/state.go

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* pass locker

* rename addresscall verifier fn

* new fields and refactorings

* add new fields

* merge nits

* fix linter

* clarify comments

* update comment

* remove getnodeID

* bump to poc branch

* enable validators API by default

* reviews

* reviews

* update comment

* update to avago master

* revert test change

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
2024-11-13 22:43:56 +00:00
ecbb245cbf Uptime tracking api (#1374)
* add validator state

* add pausable uptime manager

* remove stuttering name

* rename state listener

* add uptime tracking to VM

* remove unused param

* add wg for update validators

* update state before network shutdown

* restart bootstrapping status in test

* add get validator to state

* rename uptime to validator

* fix mock state

* tests

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* reviews

* reword errs

* fix test changes

* fix upgrades after deactivating latest in context

* use test branch from avalanchego

* use branch commit for ava version

* update e2e ava version

* update avago dep

* remove extra line...

* export struct

* reviews

* conflict fix

* custom err msg

* add listener mock

* bump avago test branch

* remove config

* remove api changes

* Revert "remove api changes"

This reverts commit 8ef763fca65a7144ac35b69889873728d3485558.

* use non-version db for validatorsDB

* remove errs from resume and pause

* check after stopping

* use expectedTime in tests

* reviews

* Update plugin/evm/vm.go

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

* fix len

* remove log

* disable validators api by default

* use interfaces from pkgs

* improve comments

* new fields and refactorings

* add new fields

* fix linter

* clarify comments

* update comment

* bump to poc branch

* enable validators API by default

* reviews

* update comment

* update to avago master

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-13 22:23:26 +00:00
c0a9ad0fcd Uptime tracking (#1263)
* add validator state

* add pausable uptime manager

* remove stuttering name

* rename state listener

* add uptime tracking to VM

* remove unused param

* add wg for update validators

* update state before network shutdown

* restart bootstrapping status in test

* add get validator to state

* rename uptime to validator

* fix mock state

* tests

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* reviews

* reword errs

* fix test changes

* fix upgrades after deactivating latest in context

* use test branch from avalanchego

* use branch commit for ava version

* update e2e ava version

* update avago dep

* remove extra line...

* export struct

* reviews

* conflict fix

* custom err msg

* add listener mock

* bump avago test branch

* remove config

* remove api changes

* use non-version db for validatorsDB

* remove errs from resume and pause

* check after stopping

* use expectedTime in tests

* reviews

* fix len

* remove log

* use interfaces from pkgs

* improve comments

* new fields and refactorings

* fix linter

* clarify comments

* update comment

* bump to poc branch

* reviews

* update comment

* update to avago master

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-13 22:27:03 +03:00
e9820f74ab remove shared memory from precompiles and accept (#1383)
* add regression test

* remove shared memory from accept and precompile interface

* Update plugin/evm/vm_test.go

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

* revert changes to test helper

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-13 20:05:19 +03:00
7f9518dfe5 move interfaces to separate pkgs (#1379)
* add validator state

* add pausable uptime manager

* remove stuttering name

* rename state listener

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* reviews

* reword errs

* fix test changes

* fix upgrades after deactivating latest in context

* use branch commit for ava version

* reviews

* add listener mock

* remove errs from resume and pause

* check after stopping

* use expectedTime in tests

* reviews

* move interfaces to separate pkgs

* regen mock

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-05 22:17:08 +00:00
92f150a894 Pausable uptime manager (#1372)
* add validator state

* add pausable uptime manager

* remove stuttering name

* rename state listener

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* reviews

* reword errs

* fix test changes

* fix upgrades after deactivating latest in context

* use branch commit for ava version

* reviews

* add listener mock

* remove errs from resume and pause

* check after stopping

* use expectedTime in tests

* reviews

* fix requires

* underscore unused params

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-05 16:48:41 -05:00
f31eee0615 use verdb in accepted and metadb (#1375)
Co-authored-by: Darioush Jalali <[email protected]>
2024-11-05 00:01:28 +00:00
Darioush JalaliandGitHub 282cc026e8 tests: fix use of require.EventuallyWithT (#1376) 2024-11-04 18:13:00 +00:00
4e3537fdaf Validator state (#1371)
* add validator state

* remove stuttering name

* Update plugin/evm/validators/state.go

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

* use update enum

* Update plugin/evm/validators/state.go

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

* Update plugin/evm/validators/state.go

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

* respond to comments

* update avalanchego dep branch

* fix test changes

* fix upgrades after deactivating latest in context

* use branch commit for ava version

* add listener mock

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-10-30 19:05:35 +03:00
6beff52a57 Use acp 118 handler (#1359)
* Bump avalanchego to master

* always sign uptime messages (testing branch)

* nits

* cleanup

* assign to correct `err`

* fix handler

* move ValidatorUptime type to subnet-evm

* disable always signing

* implement on the type itself

* remove unneeded code

* fix ut

* implement acp118 signer and verifier

* avoid revalidating in sign

* refactor warp backend to use acp118 handler

* prune warp db before backend init

* add cache tests

* remove uptime msg type

* add cache test

* fix linter

* add validator uptimes

* use signature cache

* bump avago version

* nits

* rename pkg imports

* review fixes

* reviews

* bump avago

---------

Co-authored-by: Darioush Jalali <[email protected]>
2024-10-29 12:09:21 +03:00
Ceyhun OnurandGitHub e8709ba854 bump versions (#1370) 2024-10-22 06:42:39 -07:00
0623f9ecda add standalone dbs and configs (#1354)
* add standalone dbs and configs

* show value in config

* fix tests

* move to vm

* remove the noSkip flag

* reviews

* check isMemDB earlier

* rename var

* return nit

---------

Co-authored-by: Darioush Jalali <[email protected]>
2024-10-21 09:52:05 +00:00