From 98f84c5c5da6312b84ae55da5e74d28433f5265d Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Mon, 2 Dec 2024 11:29:27 -0800 Subject: [PATCH] use libevm v1.13.14-0.1.0.rc-2 (#694) --- core/state/statedb_multicoin_test.go | 11 +++-------- core/types/state_account.go | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- scripts/versions.sh | 2 +- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/core/state/statedb_multicoin_test.go b/core/state/statedb_multicoin_test.go index 52410edb59..95cc98ef71 100644 --- a/core/state/statedb_multicoin_test.go +++ b/core/state/statedb_multicoin_test.go @@ -12,7 +12,6 @@ import ( "github.com/ava-labs/coreth/core/types" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/crypto" - "github.com/ava-labs/libevm/rlp" "github.com/holiman/uint256" ) @@ -147,16 +146,12 @@ func TestGenerateMultiCoinAccounts(t *testing.T) { // Get latest snapshot and make sure it has the correct account and storage snap := snaps.Snapshot(root) - snapAccount, err := snap.AccountRLP(addrHash) + snapAccount, err := snap.Account(addrHash) if err != nil { t.Fatal(err) } - account := new(types.StateAccount) - if err := rlp.DecodeBytes(snapAccount, account); err != nil { - t.Fatal(err) - } - if !types.IsMultiCoin(account) { - t.Fatalf("Expected SnapAccount to return IsMultiCoin: true, found: %v", types.IsMultiCoin(account)) + if !types.IsMultiCoin(snapAccount) { + t.Fatalf("Expected SnapAccount to return IsMultiCoin: true, found: false") } NormalizeCoinID(&assetID) diff --git a/core/types/state_account.go b/core/types/state_account.go index e864b90d0e..9af3d4ce15 100644 --- a/core/types/state_account.go +++ b/core/types/state_account.go @@ -48,6 +48,6 @@ type isMultiCoin bool var IsMultiCoinPayloads = ethtypes.RegisterExtras[isMultiCoin]() -func IsMultiCoin(a *StateAccount) bool { - return bool(IsMultiCoinPayloads.FromStateAccount(a)) +func IsMultiCoin(a ethtypes.ExtraPayloadCarrier) bool { + return bool(IsMultiCoinPayloads.FromPayloadCarrier(a)) } diff --git a/go.mod b/go.mod index 6e9b7f8d1b..2cb61bc575 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.11.13-0.20241106174551-4fb3f3c6b195 - github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1.0.20241126163706-cd51330a5e2e + github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241129191047-0a4ba1bb7045 + github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set/v2 v2.1.0 diff --git a/go.sum b/go.sum index cf1fd9d76e..50b81abf9f 100644 --- a/go.sum +++ b/go.sum @@ -56,10 +56,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.13-0.20241106174551-4fb3f3c6b195 h1:dyf52xlqlA/9SaiCv29oqbitRAYu7L890zK774xDNrE= -github.com/ava-labs/avalanchego v1.11.13-0.20241106174551-4fb3f3c6b195/go.mod h1:eZ/UmH4rDhhgL/FLqtJZYJ7ka73m88RmLrOoAyZFgD4= -github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1.0.20241126163706-cd51330a5e2e h1:WwDl/jyHr4oJ1VYUi+PEu6l05Vcl4rZv1xXJ0vVP1gI= -github.com/ava-labs/libevm v1.13.14-0.1.0-rc.1.0.20241126163706-cd51330a5e2e/go.mod h1:yBctIV/wnxXTF38h95943jvpuk4aj07TrjbpoGor6LQ= +github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241129191047-0a4ba1bb7045 h1:oOR9jYAlNm3FgWWatjCZIeOslLlmmbnCrqAErQDHngk= +github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241129191047-0a4ba1bb7045/go.mod h1:tubX8cWRjtVe6s6sm/2xeljfuhEISuJiVzvOiPiXSuI= +github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2 h1:CVbn0hSsPCl6gCkTCnqwuN4vtJgdVbkCqLXzYAE7qF8= +github.com/ava-labs/libevm v1.13.14-0.1.0.rc-2/go.mod h1:yBctIV/wnxXTF38h95943jvpuk4aj07TrjbpoGor6LQ= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= diff --git a/scripts/versions.sh b/scripts/versions.sh index c61354a444..fc1d045b95 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -6,4 +6,4 @@ set -euo pipefail # Don't export them as they're used in the context of other calls -AVALANCHE_VERSION=${AVALANCHE_VERSION:-'4fb3f3c6'} +AVALANCHE_VERSION=${AVALANCHE_VERSION:-'0a4ba1bb'}