From 86e2a8ce889021cdfd3af84cc31fafa5338c4b5a Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Wed, 13 Nov 2024 15:53:52 -0600 Subject: [PATCH 1/9] depend on local relayer --- go.mod | 3 +++ go.sum | 2 -- tests/utils/chain.go | 17 +++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index aef2d58a7..486794379 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,9 @@ module github.com/ava-labs/teleporter go 1.22.8 +// TODONOW: remove this +replace github.com/ava-labs/awm-relayer => /Users/cameron.schultz/awm-relayer + require ( github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 github.com/supranational/blst v0.3.13 // indirect diff --git a/go.sum b/go.sum index 758f1df2c..5303f4d84 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 h1:UuCN1CYPZgf2FGGaO4XURVPWHjbv2U++VkarrADeT64= github.com/ava-labs/avalanchego v1.12.0-initial-poc.8/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= -github.com/ava-labs/awm-relayer v1.4.1-0.20241112172851-472c76dde821 h1:0T6NvMMTI/Wg8mINllGe331BzylMIWLVi3my6SunOek= -github.com/ava-labs/awm-relayer v1.4.1-0.20241112172851-472c76dde821/go.mod h1:BhcOTNDB8JH5dAP77TOSxPwXYX/cOO4XlqKzmKX/DGQ= github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8= github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE= github.com/ava-labs/subnet-evm v0.6.11 h1:XgIAn9ihPyGjrBFD2rXg2H76HFl6htliHabN0fjciaQ= diff --git a/tests/utils/chain.go b/tests/utils/chain.go index 713014596..16f01e843 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -556,27 +556,28 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu trackedSubnets := set.NewSet[ids.ID](len(subnets)) trackedSubnets.Add(subnets...) registry := prometheus.NewRegistry() + messageCreator, err := message.NewCreator( + logging.NoLog{}, + registry, + constants.DefaultNetworkCompressionType, + constants.DefaultNetworkMaximumInboundTimeout, + ) + Expect(err).Should(BeNil()) + appRequestNetwork, err := peers.NewNetwork( logging.Info, registry, trackedSubnets, + messageCreator, &cfg, ) Expect(err).Should(BeNil()) - messageCreator, err := message.NewCreator( - logging.NoLog{}, - registry, - constants.DefaultNetworkCompressionType, - constants.DefaultNetworkMaximumInboundTimeout, - ) - Expect(err).Should(BeNil()) agg, err := aggregator.NewSignatureAggregator( appRequestNetwork, logging.NoLog{}, 1024, metrics.NewSignatureAggregatorMetrics(prometheus.NewRegistry()), - messageCreator, // Setting the etnaTime to a minute ago so that the post-etna code path is used in the test time.Now().Add(-1*time.Minute), ) From 24fc1b55e51c7ed68dea062a9a5d998ef7dcbffd Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Wed, 13 Nov 2024 16:23:50 -0600 Subject: [PATCH 2/9] remove local dep --- go.mod | 5 +---- go.sum | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 486794379..2bd6a6417 100644 --- a/go.mod +++ b/go.mod @@ -2,16 +2,13 @@ module github.com/ava-labs/teleporter go 1.22.8 -// TODONOW: remove this -replace github.com/ava-labs/awm-relayer => /Users/cameron.schultz/awm-relayer - require ( github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 github.com/supranational/blst v0.3.13 // indirect ) require ( - github.com/ava-labs/awm-relayer v1.4.1-0.20241112172851-472c76dde821 + github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75 github.com/ava-labs/subnet-evm v0.6.11 github.com/ethereum/go-ethereum v1.13.14 github.com/onsi/ginkgo/v2 v2.21.0 diff --git a/go.sum b/go.sum index 5303f4d84..2b3e73806 100644 --- a/go.sum +++ b/go.sum @@ -60,6 +60,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 h1:UuCN1CYPZgf2FGGaO4XURVPWHjbv2U++VkarrADeT64= github.com/ava-labs/avalanchego v1.12.0-initial-poc.8/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= +github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75 h1:NHB3Br/TCFYZocy/DpQ1a/gx39JYcs4maWZ0fqgPazs= +github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75/go.mod h1:OoI7lXzWjq6jAxnroOg588s7meyTl+ezVYIMjsP23BM= github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8= github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE= github.com/ava-labs/subnet-evm v0.6.11 h1:XgIAn9ihPyGjrBFD2rXg2H76HFl6htliHabN0fjciaQ= From 9f91e4fc4ad8258c8e70f803f2ba66b5de2b0c45 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Fri, 15 Nov 2024 15:06:59 -0600 Subject: [PATCH 3/9] wip --- go.mod | 2 + tests/network/network.go | 27 ++- .../teleporter/teleporter_suite_test.go | 163 +++++++++--------- tests/utils/chain.go | 3 +- 4 files changed, 103 insertions(+), 92 deletions(-) diff --git a/go.mod b/go.mod index 2bd6a6417..7d7938bde 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/ava-labs/teleporter go 1.22.8 +replace github.com/ava-labs/awm-relayer => /Users/cameron.schultz/awm-relayer + require ( github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 github.com/supranational/blst v0.3.13 // indirect diff --git a/tests/network/network.go b/tests/network/network.go index bb83ad8fd..59870badb 100644 --- a/tests/network/network.go +++ b/tests/network/network.go @@ -6,6 +6,7 @@ import ( "encoding/base64" "encoding/hex" "encoding/json" + "fmt" goLog "log" "os" "sort" @@ -44,7 +45,7 @@ type LocalNetwork struct { tmpnet.Network extraNodes []*tmpnet.Node // to add as more subnet validators in the tests - primaryNetworkValidators []ids.NodeID + primaryNetworkValidators []*tmpnet.Node globalFundedKey *secp256k1.PrivateKey validatorManagers map[ids.ID]common.Address } @@ -165,9 +166,11 @@ func NewLocalNetwork( } // All nodes are specified as bootstrap validators - var primaryNetworkValidators []ids.NodeID + var primaryNetworkValidators []*tmpnet.Node + fmt.Println("Primary Network Validators") for _, node := range network.Nodes { - primaryNetworkValidators = append(primaryNetworkValidators, node.NodeID) + fmt.Println(node.NodeID, node.URI) + primaryNetworkValidators = append(primaryNetworkValidators, node) } localNetwork := &LocalNetwork{ @@ -265,6 +268,12 @@ func (n *LocalNetwork) ConvertSubnet( for _, vdr := range currentValidators { _, err := pChainWallet.IssueRemoveSubnetValidatorTx(vdr.NodeID, subnet.SubnetID) Expect(err).Should(BeNil()) + for _, node := range n.Network.Nodes { + if node.NodeID == vdr.NodeID { + fmt.Println("Restarting bootstrap node", node.NodeID) + n.Network.RestartNode(ctx, os.Stdout, node) + } + } } return nodes, validationIDs, proxyAdmin @@ -328,13 +337,14 @@ func (n *LocalNetwork) GetExtraNodes(count int) []*tmpnet.Node { return nodes } +func (n *LocalNetwork) GetPrimaryNetworkValidators() []*tmpnet.Node { + return n.primaryNetworkValidators +} + func (n *LocalNetwork) GetPrimaryNetworkInfo() interfaces.SubnetTestInfo { var nodeURIs []string - for _, nodeID := range n.primaryNetworkValidators { - uri, err := n.Network.GetURIForNodeID(nodeID) - Expect(err).Should(BeNil()) - - nodeURIs = append(nodeURIs, uri) + for _, node := range n.primaryNetworkValidators { + nodeURIs = append(nodeURIs, node.URI) } infoClient := info.NewClient(nodeURIs[0]) cChainBlockchainID, err := infoClient.GetBlockchainID(context.Background(), "C") @@ -492,7 +502,6 @@ func (n *LocalNetwork) Dir() string { func (n *LocalNetwork) GetPChainWallet() pwallet.Wallet { // Create the P-Chain wallet to issue transactions kc := secp256k1fx.NewKeychain(n.globalFundedKey) - n.GetSubnetsInfo() var subnetIDs []ids.ID for _, subnet := range n.GetSubnetsInfo() { subnetIDs = append(subnetIDs, subnet.SubnetID) diff --git a/tests/suites/teleporter/teleporter_suite_test.go b/tests/suites/teleporter/teleporter_suite_test.go index bf37d4a96..aa34ab891 100644 --- a/tests/suites/teleporter/teleporter_suite_test.go +++ b/tests/suites/teleporter/teleporter_suite_test.go @@ -11,8 +11,7 @@ import ( "github.com/ava-labs/avalanchego/utils/units" teleporterFlows "github.com/ava-labs/teleporter/tests/flows/teleporter" - registryFlows "github.com/ava-labs/teleporter/tests/flows/teleporter/registry" - localnetwork "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" deploymentUtils "github.com/ava-labs/teleporter/utils/deployment-utils" "github.com/ethereum/go-ethereum/log" @@ -30,7 +29,7 @@ const ( ) var ( - LocalNetworkInstance *localnetwork.LocalNetwork + LocalNetworkInstance *network.LocalNetwork TeleporterInfo utils.TeleporterTestInfo ) @@ -61,11 +60,11 @@ var _ = ginkgo.BeforeSuite(func() { ctx, cancel := context.WithTimeout(context.Background(), 120*2*time.Second) defer cancel() - LocalNetworkInstance = localnetwork.NewLocalNetwork( + LocalNetworkInstance = network.NewLocalNetwork( ctx, "teleporter-test-local-network", warpGenesisTemplateFile, - []localnetwork.SubnetSpec{ + []network.SubnetSpec{ { Name: "A", EVMChainID: 12345, @@ -132,81 +131,81 @@ var _ = ginkgo.Describe("[Teleporter integration tests]", func() { func() { teleporterFlows.BasicSendReceive(LocalNetworkInstance, TeleporterInfo) }) - ginkgo.It("Deliver to the wrong chain", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.DeliverToWrongChain(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Deliver to non-existent contract", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.DeliverToNonExistentContract(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Retry successful execution", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.RetrySuccessfulExecution(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Unallowed relayer", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.UnallowedRelayer(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Relay message twice", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.RelayMessageTwice(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Add additional fee amount", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.AddFeeAmount(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Send specific receipts", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.SendSpecificReceipts(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Insufficient gas", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.InsufficientGas(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Resubmit altered message", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.ResubmitAlteredMessage(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Calculate Teleporter message IDs", - ginkgo.Label(utilsLabel), - func() { - teleporterFlows.CalculateMessageID(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Relayer modifies message", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.RelayerModifiesMessage(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Validator churn", - ginkgo.Label(teleporterMessengerLabel), - func() { - teleporterFlows.ValidatorChurn(LocalNetworkInstance, TeleporterInfo) - }) - - // Teleporter Registry tests - ginkgo.It("Teleporter registry", - ginkgo.Label(upgradabilityLabel), - func() { - registryFlows.TeleporterRegistry(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Check upgrade access", - ginkgo.Label(upgradabilityLabel), - func() { - registryFlows.CheckUpgradeAccess(LocalNetworkInstance, TeleporterInfo) - }) - ginkgo.It("Pause and Unpause Teleporter", - ginkgo.Label(upgradabilityLabel), - func() { - registryFlows.PauseTeleporter(LocalNetworkInstance, TeleporterInfo) - }) + // ginkgo.It("Deliver to the wrong chain", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.DeliverToWrongChain(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Deliver to non-existent contract", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.DeliverToNonExistentContract(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Retry successful execution", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.RetrySuccessfulExecution(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Unallowed relayer", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.UnallowedRelayer(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Relay message twice", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.RelayMessageTwice(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Add additional fee amount", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.AddFeeAmount(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Send specific receipts", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.SendSpecificReceipts(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Insufficient gas", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.InsufficientGas(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Resubmit altered message", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.ResubmitAlteredMessage(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Calculate Teleporter message IDs", + // ginkgo.Label(utilsLabel), + // func() { + // teleporterFlows.CalculateMessageID(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Relayer modifies message", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.RelayerModifiesMessage(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Validator churn", + // ginkgo.Label(teleporterMessengerLabel), + // func() { + // teleporterFlows.ValidatorChurn(LocalNetworkInstance, TeleporterInfo) + // }) + + // // Teleporter Registry tests + // ginkgo.It("Teleporter registry", + // ginkgo.Label(upgradabilityLabel), + // func() { + // registryFlows.TeleporterRegistry(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Check upgrade access", + // ginkgo.Label(upgradabilityLabel), + // func() { + // registryFlows.CheckUpgradeAccess(LocalNetworkInstance, TeleporterInfo) + // }) + // ginkgo.It("Pause and Unpause Teleporter", + // ginkgo.Label(upgradabilityLabel), + // func() { + // registryFlows.PauseTeleporter(LocalNetworkInstance, TeleporterInfo) + // }) }) diff --git a/tests/utils/chain.go b/tests/utils/chain.go index 16f01e843..eab21084e 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -565,10 +565,11 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu Expect(err).Should(BeNil()) appRequestNetwork, err := peers.NewNetwork( - logging.Info, + logging.Off, registry, trackedSubnets, messageCreator, + nil, &cfg, ) Expect(err).Should(BeNil()) From 9d7734b844116c38c5d82d18da7ff6939410bf37 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Tue, 19 Nov 2024 18:12:21 -0600 Subject: [PATCH 4/9] wip --- go.mod | 20 ++++---- go.sum | 36 +++++++------- .../validator-manager/erc20_token_staking.go | 4 +- .../validator-manager/native_token_staking.go | 4 +- tests/network/network.go | 29 +++++------ tests/utils/chain.go | 8 +++- tests/utils/validator_manager.go | 48 +++++++++---------- 7 files changed, 77 insertions(+), 72 deletions(-) diff --git a/go.mod b/go.mod index 7d7938bde..4793b8b86 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,13 @@ go 1.22.8 replace github.com/ava-labs/awm-relayer => /Users/cameron.schultz/awm-relayer require ( - github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 + github.com/ava-labs/avalanchego v1.12.0-fuji github.com/supranational/blst v0.3.13 // indirect ) require ( - github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75 - github.com/ava-labs/subnet-evm v0.6.11 + github.com/ava-labs/awm-relayer v0.0.0-00010101000000-000000000000 + github.com/ava-labs/subnet-evm v0.6.12 github.com/ethereum/go-ethereum v1.13.14 github.com/onsi/ginkgo/v2 v2.21.0 github.com/onsi/gomega v1.35.1 @@ -28,7 +28,7 @@ require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/ava-labs/coreth v0.13.8 // indirect + github.com/ava-labs/coreth v0.13.9-rc.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect @@ -146,22 +146,22 @@ require ( go.opentelemetry.io/otel/sdk v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/mock v0.4.0 // indirect + go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.28.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect - golang.org/x/sync v0.8.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 // indirect golang.org/x/text v0.19.0 // indirect golang.org/x/time v0.3.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.68.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index 2b3e73806..a4a705560 100644 --- a/go.sum +++ b/go.sum @@ -58,14 +58,14 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/avalanchego v1.12.0-initial-poc.8 h1:UuCN1CYPZgf2FGGaO4XURVPWHjbv2U++VkarrADeT64= -github.com/ava-labs/avalanchego v1.12.0-initial-poc.8/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= -github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75 h1:NHB3Br/TCFYZocy/DpQ1a/gx39JYcs4maWZ0fqgPazs= -github.com/ava-labs/awm-relayer v1.4.1-0.20241113220127-99c58e925a75/go.mod h1:OoI7lXzWjq6jAxnroOg588s7meyTl+ezVYIMjsP23BM= -github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8= -github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE= +github.com/ava-labs/avalanchego v1.12.0-fuji h1:o/GbXrqW9CAXu2jX/a1dZtvFiiSVCWomJZyxF4hCQOA= +github.com/ava-labs/avalanchego v1.12.0-fuji/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= +github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU= +github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo= github.com/ava-labs/subnet-evm v0.6.11 h1:XgIAn9ihPyGjrBFD2rXg2H76HFl6htliHabN0fjciaQ= github.com/ava-labs/subnet-evm v0.6.11/go.mod h1:fP46lzBtiniRfpNH+Qu9BFvSsa02YGkAobxinZ78gDU= +github.com/ava-labs/subnet-evm v0.6.12 h1:jL3FmjdFcNfS0qwbehwN6DkAg9y7zexB1riiGBxRsM0= +github.com/ava-labs/subnet-evm v0.6.12/go.mod h1:vffwL4UqAh7ibpWjveUuUhamm3a9w75q92bG5vXdX5k= 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= @@ -649,8 +649,8 @@ go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lI go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= @@ -766,8 +766,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -780,8 +780,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1000,10 +1000,10 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1022,8 +1022,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/tests/flows/validator-manager/erc20_token_staking.go b/tests/flows/validator-manager/erc20_token_staking.go index 4f7925105..5f71bc5cd 100644 --- a/tests/flows/validator-manager/erc20_token_staking.go +++ b/tests/flows/validator-manager/erc20_token_staking.go @@ -155,7 +155,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { ) // Issue a tx to update the validator's weight on the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) @@ -223,7 +223,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { Expect(err).Should(BeNil()) // Issue a tx to update the validator's weight on the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) diff --git a/tests/flows/validator-manager/native_token_staking.go b/tests/flows/validator-manager/native_token_staking.go index 8470edbae..9e77eefe3 100644 --- a/tests/flows/validator-manager/native_token_staking.go +++ b/tests/flows/validator-manager/native_token_staking.go @@ -149,7 +149,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { ) // Issue a tx to update the validator's weight on the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) @@ -216,7 +216,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { Expect(err).Should(BeNil()) // Issue a tx to update the validator's weight on the P-Chain - network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) utils.PChainProposerVMWorkaround(network.GetPChainWallet()) utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5) diff --git a/tests/network/network.go b/tests/network/network.go index 59870badb..3912938bf 100644 --- a/tests/network/network.go +++ b/tests/network/network.go @@ -3,7 +3,6 @@ package network import ( "context" "crypto/ecdsa" - "encoding/base64" "encoding/hex" "encoding/json" "fmt" @@ -17,7 +16,6 @@ import ( "github.com/ava-labs/avalanchego/genesis" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" - "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/utils/units" @@ -123,15 +121,15 @@ func NewLocalNetwork( Expect(network).ShouldNot(BeNil()) // Activate Etna - upgrades := upgrade.Default - upgrades.EtnaTime = time.Now().Add(-1 * time.Minute) - upgradeJSON, err := json.Marshal(upgrades) - Expect(err).Should(BeNil()) + // upgrades := upgrade.Default + // upgrades.EtnaTime = time.Now().Add(-1 * time.Minute) + // upgradeJSON, err := json.Marshal(upgrades) + // Expect(err).Should(BeNil()) - upgradeBase64 := base64.StdEncoding.EncodeToString(upgradeJSON) - network.DefaultFlags.SetDefaults(tmpnet.FlagsMap{ - config.UpgradeFileContentKey: upgradeBase64, - }) + // upgradeBase64 := base64.StdEncoding.EncodeToString(upgradeJSON) + // network.DefaultFlags.SetDefaults(tmpnet.FlagsMap{ + // config.UpgradeFileContentKey: upgradeBase64, + // }) avalancheGoBuildPath, ok := os.LookupEnv("AVALANCHEGO_BUILD_PATH") Expect(ok).Should(Equal(true)) @@ -192,6 +190,7 @@ func (n *LocalNetwork) ConvertSubnet( senderKey *ecdsa.PrivateKey, proxy bool, ) ([]utils.Node, []ids.ID, *proxyadmin.ProxyAdmin) { + goLog.Println("Converting subnet", subnet.SubnetID) cChainInfo := n.GetPrimaryNetworkInfo() pClient := platformvm.NewClient(cChainInfo.NodeURIs[0]) currentValidators, err := pClient.GetCurrentValidators(ctx, subnet.SubnetID, nil) @@ -215,7 +214,7 @@ func (n *LocalNetwork) ConvertSubnet( // Construct the convert subnet info destAddr, err := address.ParseToID(utils.DefaultPChainAddress) Expect(err).Should(BeNil()) - vdrs := make([]*txs.ConvertSubnetValidator, len(tmpnetNodes)) + vdrs := make([]*txs.ConvertSubnetToL1Validator, len(tmpnetNodes)) for i, node := range tmpnetNodes { signer, err := node.GetProofOfPossession() Expect(err).Should(BeNil()) @@ -224,7 +223,7 @@ func (n *LocalNetwork) ConvertSubnet( NodePoP: signer, Weight: weights[i], }) - vdrs[i] = &txs.ConvertSubnetValidator{ + vdrs[i] = &txs.ConvertSubnetToL1Validator{ NodeID: node.NodeID.Bytes(), Weight: weights[i], Balance: units.Avax * 100, @@ -240,7 +239,7 @@ func (n *LocalNetwork) ConvertSubnet( } } pChainWallet := n.GetPChainWallet() - _, err = pChainWallet.IssueConvertSubnetTx( + _, err = pChainWallet.IssueConvertSubnetToL1Tx( subnet.SubnetID, subnet.BlockchainID, vdrManagerAddress[:], @@ -253,6 +252,7 @@ func (n *LocalNetwork) ConvertSubnet( utils.PChainProposerVMWorkaround(pChainWallet) utils.AdvanceProposerVM(ctx, subnet, senderKey, 5) + aggregator := n.GetSignatureAggregator() validationIDs := utils.InitializeValidatorSet( ctx, senderKey, @@ -260,9 +260,10 @@ func (n *LocalNetwork) ConvertSubnet( utils.GetPChainInfo(cChainInfo), vdrManagerAddress, n.GetNetworkID(), - n.GetSignatureAggregator(), + aggregator, nodes, ) + aggregator.Shutdown() // Remove the bootstrap nodes as subnet validators for _, vdr := range currentValidators { diff --git a/tests/utils/chain.go b/tests/utils/chain.go index eab21084e..5507f1cf1 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -565,7 +565,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu Expect(err).Should(BeNil()) appRequestNetwork, err := peers.NewNetwork( - logging.Off, + logging.Verbo, registry, trackedSubnets, messageCreator, @@ -576,7 +576,11 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu agg, err := aggregator.NewSignatureAggregator( appRequestNetwork, - logging.NoLog{}, + logging.NewLogger("dbg-sig-agg", logging.NewWrappedCore( + logging.Verbo, + os.Stdout, + logging.JSON.ConsoleEncoder(), + )), 1024, metrics.NewSignatureAggregatorMetrics(prometheus.NewRegistry()), // Setting the etnaTime to a minute ago so that the post-etna code path is used in the test diff --git a/tests/utils/validator_manager.go b/tests/utils/validator_manager.go index 8bd53fac9..15061dfb1 100644 --- a/tests/utils/validator_manager.go +++ b/tests/utils/validator_manager.go @@ -273,11 +273,11 @@ func InitializeValidatorSet( signatureAggregator *aggregator.SignatureAggregator, nodes []Node, ) []ids.ID { - log.Println("Initializing validator set") - initialValidators := make([]warpMessage.SubnetConversionValidatorData, len(nodes)) + log.Println("Initializing validator set", "subnet", subnetInfo.SubnetID) + initialValidators := make([]warpMessage.SubnetToL1ConverstionValidatorData, len(nodes)) initialValidatorsABI := make([]ivalidatormanager.InitialValidator, len(nodes)) for i, node := range nodes { - initialValidators[i] = warpMessage.SubnetConversionValidatorData{ + initialValidators[i] = warpMessage.SubnetToL1ConverstionValidatorData{ NodeID: node.NodeID.Bytes(), BLSPublicKey: node.NodePoP.PublicKey, Weight: nodes[i].Weight, @@ -289,7 +289,7 @@ func InitializeValidatorSet( } } - subnetConversionData := warpMessage.SubnetConversionData{ + subnetConversionData := warpMessage.SubnetToL1ConversionData{ SubnetID: subnetInfo.SubnetID, ManagerChainID: subnetInfo.BlockchainID, ManagerAddress: validatorManagerAddress[:], @@ -301,7 +301,7 @@ func InitializeValidatorSet( ValidatorManagerAddress: validatorManagerAddress, InitialValidators: initialValidatorsABI, } - subnetConversionID, err := warpMessage.SubnetConversionID(subnetConversionData) + subnetConversionID, err := warpMessage.SubnetToL1ConversionID(subnetConversionData) Expect(err).Should(BeNil()) subnetConversionSignedMessage := ConstructSubnetConversionMessage( subnetConversionID, @@ -553,7 +553,7 @@ func InitializeAndCompleteNativeValidatorRegistration( // (Sending to the P-Chain will be skipped for now) signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator) - _, err = pchainWallet.IssueRegisterSubnetValidatorTx( + _, err = pchainWallet.IssueRegisterL1ValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), @@ -631,7 +631,7 @@ func InitializeAndCompleteERC20ValidatorRegistration( // Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator) - _, err = pchainWallet.IssueRegisterSubnetValidatorTx( + _, err = pchainWallet.IssueRegisterL1ValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), @@ -699,7 +699,7 @@ func InitializeAndCompletePoAValidatorRegistration( // Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator) - _, err := pchainWallet.IssueRegisterSubnetValidatorTx( + _, err := pchainWallet.IssueRegisterL1ValidatorTx( 100*units.Avax, node.NodePoP.ProofOfPossession, signedWarpMessage.Bytes(), @@ -989,7 +989,7 @@ func InitializeAndCompleteEndInitialPoSValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) @@ -1066,7 +1066,7 @@ func InitializeAndCompleteEndPoSValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) @@ -1145,7 +1145,7 @@ func InitializeAndCompleteEndInitialPoAValidation( Expect(err).Should(BeNil()) // Deliver the Warp message to the P-Chain - pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes()) + pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes()) PChainProposerVMWorkaround(pchainWallet) AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5) @@ -1259,9 +1259,9 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator( networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { - justification := platformvm.SubnetValidatorRegistrationJustification{ - Preimage: &platformvm.SubnetValidatorRegistrationJustification_ConvertSubnetTxData{ - ConvertSubnetTxData: &platformvm.SubnetIDIndex{ + justification := platformvm.L1ValidatorRegistrationJustification{ + Preimage: &platformvm.L1ValidatorRegistrationJustification_ConvertSubnetToL1TxData{ + ConvertSubnetToL1TxData: &platformvm.SubnetIDIndex{ SubnetId: subnet.SubnetID[:], Index: index, }, @@ -1270,7 +1270,7 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator( justificationBytes, err := proto.Marshal(&justification) Expect(err).Should(BeNil()) - registrationPayload, err := warpMessage.NewSubnetValidatorRegistration(validationID, valid) + registrationPayload, err := warpMessage.NewL1ValidatorRegistration(validationID, valid) Expect(err).Should(BeNil()) registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes()) Expect(err).Should(BeNil()) @@ -1302,7 +1302,7 @@ func ConstructSubnetValidatorRegistrationMessage( networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { - msg, err := warpMessage.NewRegisterSubnetValidator( + msg, err := warpMessage.NewRegisterL1Validator( subnet.SubnetID, node.NodeID, node.NodePoP.PublicKey, @@ -1312,15 +1312,15 @@ func ConstructSubnetValidatorRegistrationMessage( node.Weight, ) Expect(err).Should(BeNil()) - justification := platformvm.SubnetValidatorRegistrationJustification{ - Preimage: &platformvm.SubnetValidatorRegistrationJustification_RegisterSubnetValidatorMessage{ - RegisterSubnetValidatorMessage: msg.Bytes(), + justification := platformvm.L1ValidatorRegistrationJustification{ + Preimage: &platformvm.L1ValidatorRegistrationJustification_RegisterL1ValidatorMessage{ + RegisterL1ValidatorMessage: msg.Bytes(), }, } justificationBytes, err := proto.Marshal(&justification) Expect(err).Should(BeNil()) - registrationPayload, err := warpMessage.NewSubnetValidatorRegistration(validationID, valid) + registrationPayload, err := warpMessage.NewL1ValidatorRegistration(validationID, valid) Expect(err).Should(BeNil()) registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes()) Expect(err).Should(BeNil()) @@ -1351,7 +1351,7 @@ func ConstructSubnetValidatorWeightUpdateMessage( signatureAggregator *aggregator.SignatureAggregator, networkID uint32, ) *avalancheWarp.Message { - payload, err := warpMessage.NewSubnetValidatorWeight(validationID, nonce, weight) + payload, err := warpMessage.NewL1ValidatorWeight(validationID, nonce, weight) Expect(err).Should(BeNil()) updateAddressedCall, err := warpPayload.NewAddressedCall(nil, payload.Bytes()) Expect(err).Should(BeNil()) @@ -1379,7 +1379,7 @@ func ConstructSubnetConversionMessage( networkID uint32, signatureAggregator *aggregator.SignatureAggregator, ) *avalancheWarp.Message { - subnetConversionPayload, err := warpMessage.NewSubnetConversion(subnetConversionID) + subnetConversionPayload, err := warpMessage.NewSubnetToL1Conversion(subnetConversionID) Expect(err).Should(BeNil()) subnetConversionAddressedCall, err := warpPayload.NewAddressedCall( nil, @@ -1422,7 +1422,7 @@ func ValidateRegisterSubnetValidatorMessage( var payloadInterface warpMessage.Payload ver, err := warpMessage.Codec.Unmarshal(msg.Payload, &payloadInterface) Expect(err).Should(BeNil()) - payload, ok := payloadInterface.(*warpMessage.RegisterSubnetValidator) + payload, ok := payloadInterface.(*warpMessage.RegisterL1Validator) Expect(ok).Should(BeTrue()) Expect(ver).Should(Equal(uint16(warpMessage.CodecVersion))) @@ -1444,7 +1444,7 @@ func ValidateSubnetValidatorWeightMessage( var payloadInterface warpMessage.Payload ver, err := warpMessage.Codec.Unmarshal(msg.Payload, &payloadInterface) Expect(err).Should(BeNil()) - payload, ok := payloadInterface.(*warpMessage.SubnetValidatorWeight) + payload, ok := payloadInterface.(*warpMessage.L1ValidatorWeight) Expect(ok).Should(BeTrue()) Expect(ver).Should(Equal(uint16(warpMessage.CodecVersion))) From 2180c98b96442ef05b4efcdbc919a881fbfb3dab Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 10:59:37 -0600 Subject: [PATCH 5/9] p2p tests passing --- go.sum | 2 - tests/network/network.go | 5 +- .../teleporter/teleporter_suite_test.go | 157 +++++++++--------- .../validator_manager_suite_test.go | 2 +- tests/utils/chain.go | 7 +- 5 files changed, 88 insertions(+), 85 deletions(-) diff --git a/go.sum b/go.sum index a4a705560..8b6c84b17 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,6 @@ github.com/ava-labs/avalanchego v1.12.0-fuji h1:o/GbXrqW9CAXu2jX/a1dZtvFiiSVCWom github.com/ava-labs/avalanchego v1.12.0-fuji/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU= github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo= -github.com/ava-labs/subnet-evm v0.6.11 h1:XgIAn9ihPyGjrBFD2rXg2H76HFl6htliHabN0fjciaQ= -github.com/ava-labs/subnet-evm v0.6.11/go.mod h1:fP46lzBtiniRfpNH+Qu9BFvSsa02YGkAobxinZ78gDU= github.com/ava-labs/subnet-evm v0.6.12 h1:jL3FmjdFcNfS0qwbehwN6DkAg9y7zexB1riiGBxRsM0= github.com/ava-labs/subnet-evm v0.6.12/go.mod h1:vffwL4UqAh7ibpWjveUuUhamm3a9w75q92bG5vXdX5k= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= diff --git a/tests/network/network.go b/tests/network/network.go index 3912938bf..cb341c999 100644 --- a/tests/network/network.go +++ b/tests/network/network.go @@ -276,6 +276,8 @@ func (n *LocalNetwork) ConvertSubnet( } } } + utils.PChainProposerVMWorkaround(pChainWallet) + utils.AdvanceProposerVM(ctx, subnet, senderKey, 5) return nodes, validationIDs, proxyAdmin } @@ -298,7 +300,8 @@ func (n *LocalNetwork) AddSubnetValidators( // Add the node to the network n.Network.Nodes = append(n.Network.Nodes, node) } - n.Network.StartNodes(context.Background(), os.Stdout, nodes...) + err := n.Network.StartNodes(context.Background(), os.Stdout, nodes...) + Expect(err).Should(BeNil()) // Update the tmpnet Subnet struct for _, tmpnetSubnet := range n.Network.Subnets { diff --git a/tests/suites/teleporter/teleporter_suite_test.go b/tests/suites/teleporter/teleporter_suite_test.go index aa34ab891..52d6662b9 100644 --- a/tests/suites/teleporter/teleporter_suite_test.go +++ b/tests/suites/teleporter/teleporter_suite_test.go @@ -11,6 +11,7 @@ import ( "github.com/ava-labs/avalanchego/utils/units" teleporterFlows "github.com/ava-labs/teleporter/tests/flows/teleporter" + registryFlows "github.com/ava-labs/teleporter/tests/flows/teleporter/registry" "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" deploymentUtils "github.com/ava-labs/teleporter/utils/deployment-utils" @@ -57,7 +58,7 @@ var _ = ginkgo.BeforeSuite(func() { Expect(err).Should(BeNil()) // Create the local network instance - ctx, cancel := context.WithTimeout(context.Background(), 120*2*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 240*2*time.Second) defer cancel() LocalNetworkInstance = network.NewLocalNetwork( @@ -131,81 +132,81 @@ var _ = ginkgo.Describe("[Teleporter integration tests]", func() { func() { teleporterFlows.BasicSendReceive(LocalNetworkInstance, TeleporterInfo) }) - // ginkgo.It("Deliver to the wrong chain", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.DeliverToWrongChain(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Deliver to non-existent contract", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.DeliverToNonExistentContract(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Retry successful execution", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.RetrySuccessfulExecution(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Unallowed relayer", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.UnallowedRelayer(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Relay message twice", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.RelayMessageTwice(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Add additional fee amount", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.AddFeeAmount(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Send specific receipts", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.SendSpecificReceipts(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Insufficient gas", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.InsufficientGas(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Resubmit altered message", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.ResubmitAlteredMessage(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Calculate Teleporter message IDs", - // ginkgo.Label(utilsLabel), - // func() { - // teleporterFlows.CalculateMessageID(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Relayer modifies message", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.RelayerModifiesMessage(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Validator churn", - // ginkgo.Label(teleporterMessengerLabel), - // func() { - // teleporterFlows.ValidatorChurn(LocalNetworkInstance, TeleporterInfo) - // }) - - // // Teleporter Registry tests - // ginkgo.It("Teleporter registry", - // ginkgo.Label(upgradabilityLabel), - // func() { - // registryFlows.TeleporterRegistry(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Check upgrade access", - // ginkgo.Label(upgradabilityLabel), - // func() { - // registryFlows.CheckUpgradeAccess(LocalNetworkInstance, TeleporterInfo) - // }) - // ginkgo.It("Pause and Unpause Teleporter", - // ginkgo.Label(upgradabilityLabel), - // func() { - // registryFlows.PauseTeleporter(LocalNetworkInstance, TeleporterInfo) - // }) + ginkgo.It("Deliver to the wrong chain", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.DeliverToWrongChain(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Deliver to non-existent contract", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.DeliverToNonExistentContract(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Retry successful execution", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.RetrySuccessfulExecution(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Unallowed relayer", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.UnallowedRelayer(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Relay message twice", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.RelayMessageTwice(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Add additional fee amount", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.AddFeeAmount(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Send specific receipts", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.SendSpecificReceipts(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Insufficient gas", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.InsufficientGas(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Resubmit altered message", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.ResubmitAlteredMessage(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Calculate Teleporter message IDs", + ginkgo.Label(utilsLabel), + func() { + teleporterFlows.CalculateMessageID(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Relayer modifies message", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.RelayerModifiesMessage(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Validator churn", + ginkgo.Label(teleporterMessengerLabel), + func() { + teleporterFlows.ValidatorChurn(LocalNetworkInstance, TeleporterInfo) + }) + + // Teleporter Registry tests + ginkgo.It("Teleporter registry", + ginkgo.Label(upgradabilityLabel), + func() { + registryFlows.TeleporterRegistry(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Check upgrade access", + ginkgo.Label(upgradabilityLabel), + func() { + registryFlows.CheckUpgradeAccess(LocalNetworkInstance, TeleporterInfo) + }) + ginkgo.It("Pause and Unpause Teleporter", + ginkgo.Label(upgradabilityLabel), + func() { + registryFlows.PauseTeleporter(LocalNetworkInstance, TeleporterInfo) + }) }) diff --git a/tests/suites/validator-manager/validator_manager_suite_test.go b/tests/suites/validator-manager/validator_manager_suite_test.go index 4e0d251fc..65d6126f0 100644 --- a/tests/suites/validator-manager/validator_manager_suite_test.go +++ b/tests/suites/validator-manager/validator_manager_suite_test.go @@ -34,7 +34,7 @@ func TestValidatorManager(t *testing.T) { // Define the before and after suite functions. var _ = ginkgo.BeforeEach(func() { // Create the local network instance - ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 240*time.Second) defer cancel() LocalNetworkInstance = localnetwork.NewLocalNetwork( ctx, diff --git a/tests/utils/chain.go b/tests/utils/chain.go index 5507f1cf1..cf581031f 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -540,9 +540,8 @@ func InstantiateGenesisTemplate( return subnetGenesisFile.Name() } -// // Aggregator utils -// +var instance = 0 func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.SignatureAggregator { cfg := sigAggConfig.Config{ @@ -565,6 +564,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu Expect(err).Should(BeNil()) appRequestNetwork, err := peers.NewNetwork( + "test-aggregator", logging.Verbo, registry, trackedSubnets, @@ -576,7 +576,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu agg, err := aggregator.NewSignatureAggregator( appRequestNetwork, - logging.NewLogger("dbg-sig-agg", logging.NewWrappedCore( + logging.NewLogger(fmt.Sprintf("dbg-sig-agg-%d", instance), logging.NewWrappedCore( logging.Verbo, os.Stdout, logging.JSON.ConsoleEncoder(), @@ -587,6 +587,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu time.Now().Add(-1*time.Minute), ) Expect(err).Should(BeNil()) + instance++ return agg } From 5f6874fd4b02a65c8eff3199893bd947f952b24f Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 11:13:21 -0600 Subject: [PATCH 6/9] cleanup --- tests/flows/governance/validator_set_sig.go | 5 ++++- tests/flows/ictt/erc20_home_erc20_remote.go | 9 +++++--- .../ictt/erc20_home_erc20_remote_multihop.go | 13 ++++++----- .../erc20_home_erc20_remote_send_and_call.go | 11 ++++++---- tests/flows/ictt/erc20_home_native_remote.go | 9 +++++--- .../ictt/erc20_home_native_remote_multihop.go | 15 ++++++++----- tests/flows/ictt/native_home_erc20_remote.go | 9 +++++--- .../ictt/native_home_erc20_remote_multihop.go | 11 ++++++---- tests/flows/ictt/native_home_native_remote.go | 9 +++++--- .../native_home_native_remote_multihop.go | 15 ++++++++----- .../ictt/registration_and_collateral_check.go | 7 ++++-- .../ictt/transparent_proxy_upgradeability.go | 9 +++++--- tests/flows/teleporter/basic_send_receive.go | 9 +++++--- .../deliver_to_nonexistent_contract.go | 6 ++++- .../teleporter/deliver_to_wrong_chain.go | 5 ++++- tests/flows/teleporter/insufficient_gas.go | 5 ++++- .../teleporter/registry/pause_teleporter.go | 7 ++++-- .../registry/teleporter_registry.go | 17 ++++++++------ tests/flows/teleporter/relay_message_twice.go | 7 ++++-- .../teleporter/relayer_modifies_message.go | 5 ++++- .../teleporter/resubmit_altered_message.go | 5 ++++- .../teleporter/retry_successful_execution.go | 5 ++++- .../teleporter/send_specific_receipts.go | 13 ++++++----- tests/flows/teleporter/unallowed_relayer.go | 5 ++++- tests/flows/teleporter/validator_churn.go | 9 +++++--- .../validator-manager/erc20_token_staking.go | 10 +++++++-- .../validator-manager/native_token_staking.go | 10 +++++++-- tests/network/network.go | 22 +++---------------- tests/utils/chain.go | 9 +------- 29 files changed, 168 insertions(+), 103 deletions(-) diff --git a/tests/flows/governance/validator_set_sig.go b/tests/flows/governance/validator_set_sig.go index 9ff4f3e99..4a8457907 100644 --- a/tests/flows/governance/validator_set_sig.go +++ b/tests/flows/governance/validator_set_sig.go @@ -145,6 +145,9 @@ func ValidatorSetSig(network *localnetwork.LocalNetwork) { // Test Case 1: validatorChain (subnetB) != targetChain (subnetA) // ************************************************************************************************ + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Execute the ValidatorSetSig executeCall and wait for acceptance receipt := utils.ExecuteValidatorSetSigCallAndVerify( ctx, @@ -153,7 +156,7 @@ func ValidatorSetSig(network *localnetwork.LocalNetwork) { validatorSetSigContractAddress, fundedKey, &offchainMessages[0], - network.GetSignatureAggregator(), + aggregator, true, ) diff --git a/tests/flows/ictt/erc20_home_erc20_remote.go b/tests/flows/ictt/erc20_home_erc20_remote.go index 9f996b60b..cfdfc7021 100644 --- a/tests/flows/ictt/erc20_home_erc20_remote.go +++ b/tests/flows/ictt/erc20_home_erc20_remote.go @@ -71,6 +71,9 @@ func ERC20TokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleport tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + utils.RegisterERC20TokenRemoteOnHome( ctx, teleporter, @@ -79,7 +82,7 @@ func ERC20TokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleport subnetAInfo, erc20TokenRemoteAddress, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Generate new recipient to receive transferred tokens @@ -119,7 +122,7 @@ func ERC20TokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleport true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -172,7 +175,7 @@ func ERC20TokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, teleport true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenHomeWithdrawal( diff --git a/tests/flows/ictt/erc20_home_erc20_remote_multihop.go b/tests/flows/ictt/erc20_home_erc20_remote_multihop.go index 4cfa4abea..8f19fb77c 100644 --- a/tests/flows/ictt/erc20_home_erc20_remote_multihop.go +++ b/tests/flows/ictt/erc20_home_erc20_remote_multihop.go @@ -86,6 +86,9 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register both ERC20TokenRemote instances on the ERC20TokenHome utils.RegisterERC20TokenRemoteOnHome( ctx, @@ -95,7 +98,7 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, subnetAInfo, erc20TokenRemoteAddressA, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) utils.RegisterERC20TokenRemoteOnHome( ctx, @@ -105,7 +108,7 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, subnetBInfo, erc20TokenRemoteAddressB, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Generate new recipient to receive transferred tokens @@ -145,7 +148,7 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -179,7 +182,7 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, cChainInfo, transferredAmount, secondaryFeeAmount, - network.GetSignatureAggregator(), + aggregator, ) // Multi-hop transfer back to Subnet A @@ -200,6 +203,6 @@ func ERC20TokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, cChainInfo, transferredAmount, secondaryFeeAmount, - network.GetSignatureAggregator(), + aggregator, ) } diff --git a/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go b/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go index d76eb4907..ab6c8c78d 100644 --- a/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go +++ b/tests/flows/ictt/erc20_home_erc20_remote_send_and_call.go @@ -87,6 +87,9 @@ func ERC20TokenHomeERC20TokenRemoteSendAndCall( tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + utils.RegisterERC20TokenRemoteOnHome( ctx, teleporter, @@ -95,7 +98,7 @@ func ERC20TokenHomeERC20TokenRemoteSendAndCall( subnetAInfo, erc20TokenRemoteAddress, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Generate new recipient to receive transferred tokens @@ -147,7 +150,7 @@ func ERC20TokenHomeERC20TokenRemoteSendAndCall( true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) event, err := utils.GetEventFromLogs(receipt.Logs, erc20TokenRemote.ParseCallSucceeded) @@ -199,7 +202,7 @@ func ERC20TokenHomeERC20TokenRemoteSendAndCall( true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -258,7 +261,7 @@ func ERC20TokenHomeERC20TokenRemoteSendAndCall( true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) homeEvent, err := utils.GetEventFromLogs(receipt.Logs, erc20TokenHome.ParseCallSucceeded) diff --git a/tests/flows/ictt/erc20_home_native_remote.go b/tests/flows/ictt/erc20_home_native_remote.go index 00b4f9e98..ea2cfa19e 100644 --- a/tests/flows/ictt/erc20_home_native_remote.go +++ b/tests/flows/ictt/erc20_home_native_remote.go @@ -74,6 +74,9 @@ func ERC20TokenHomeNativeTokenRemote(network *localnetwork.LocalNetwork, telepor burnedFeesReportingRewardPercentage, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + collateralAmount := utils.RegisterTokenRemoteOnHome( ctx, teleporter, @@ -85,7 +88,7 @@ func ERC20TokenHomeNativeTokenRemote(network *localnetwork.LocalNetwork, telepor utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) utils.AddCollateralToERC20TokenHome( @@ -138,7 +141,7 @@ func ERC20TokenHomeNativeTokenRemote(network *localnetwork.LocalNetwork, telepor true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens @@ -174,7 +177,7 @@ func ERC20TokenHomeNativeTokenRemote(network *localnetwork.LocalNetwork, telepor true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check that the recipient received the tokens diff --git a/tests/flows/ictt/erc20_home_native_remote_multihop.go b/tests/flows/ictt/erc20_home_native_remote_multihop.go index 03e340c0d..60c06ba35 100644 --- a/tests/flows/ictt/erc20_home_native_remote_multihop.go +++ b/tests/flows/ictt/erc20_home_native_remote_multihop.go @@ -78,6 +78,9 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, burnedFeesReportingRewardPercentage, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register both NativeTokenDestinations on the ERC20TokenHome collateralAmountA := utils.RegisterTokenRemoteOnHome( ctx, @@ -90,7 +93,7 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) collateralAmountB := utils.RegisterTokenRemoteOnHome( @@ -104,7 +107,7 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Add collateral for both NativeTokenDestinations @@ -171,7 +174,7 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens @@ -208,7 +211,7 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens @@ -232,7 +235,7 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, cChainInfo, amountToSend, big.NewInt(0), - network.GetSignatureAggregator(), + aggregator, ) // Multi-hop transfer back to Subnet A @@ -251,6 +254,6 @@ func ERC20TokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork, cChainInfo, amountToSend, secondaryFeeAmount, - network.GetSignatureAggregator(), + aggregator, ) } diff --git a/tests/flows/ictt/native_home_erc20_remote.go b/tests/flows/ictt/native_home_erc20_remote.go index c52d5c268..ccad64974 100644 --- a/tests/flows/ictt/native_home_erc20_remote.go +++ b/tests/flows/ictt/native_home_erc20_remote.go @@ -67,6 +67,9 @@ func NativeTokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, telepor tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + utils.RegisterERC20TokenRemoteOnHome( ctx, teleporter, @@ -75,7 +78,7 @@ func NativeTokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, telepor subnetAInfo, erc20TokenRemoteAddress, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Generate new recipient to receive transferred tokens @@ -116,7 +119,7 @@ func NativeTokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, telepor true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -169,7 +172,7 @@ func NativeTokenHomeERC20TokenRemote(network *localnetwork.LocalNetwork, telepor true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check that the recipient received the tokens diff --git a/tests/flows/ictt/native_home_erc20_remote_multihop.go b/tests/flows/ictt/native_home_erc20_remote_multihop.go index b8220b7bc..ff957ed04 100644 --- a/tests/flows/ictt/native_home_erc20_remote_multihop.go +++ b/tests/flows/ictt/native_home_erc20_remote_multihop.go @@ -81,6 +81,9 @@ func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register both ERC20Destinations on the NativeTokenHome utils.RegisterERC20TokenRemoteOnHome( ctx, @@ -90,7 +93,7 @@ func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, subnetAInfo, erc20TokenRemoteAddressA, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) utils.RegisterERC20TokenRemoteOnHome( @@ -101,7 +104,7 @@ func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, subnetBInfo, erc20TokenRemoteAddressB, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Generate new recipient to receive transferred tokens @@ -142,7 +145,7 @@ func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -175,6 +178,6 @@ func NativeTokenHomeERC20TokenRemoteMultiHop(network *localnetwork.LocalNetwork, cChainInfo, transferredAmount, secondaryFeeAmount, - network.GetSignatureAggregator(), + aggregator, ) } diff --git a/tests/flows/ictt/native_home_native_remote.go b/tests/flows/ictt/native_home_native_remote.go index 37e426b6b..346dbc70b 100644 --- a/tests/flows/ictt/native_home_native_remote.go +++ b/tests/flows/ictt/native_home_native_remote.go @@ -57,6 +57,9 @@ func NativeTokenHomeNativeDestination(network *localnetwork.LocalNetwork, telepo burnedFeesReportingRewardPercentage, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register the NativeTokenRemote on the NativeTokenHome collateralAmount := utils.RegisterTokenRemoteOnHome( ctx, @@ -69,7 +72,7 @@ func NativeTokenHomeNativeDestination(network *localnetwork.LocalNetwork, telepo big.NewInt(1), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) utils.AddCollateralToNativeTokenHome( @@ -121,7 +124,7 @@ func NativeTokenHomeNativeDestination(network *localnetwork.LocalNetwork, telepo true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckBalance( @@ -164,7 +167,7 @@ func NativeTokenHomeNativeDestination(network *localnetwork.LocalNetwork, telepo true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check that the recipient received the tokens diff --git a/tests/flows/ictt/native_home_native_remote_multihop.go b/tests/flows/ictt/native_home_native_remote_multihop.go index 4569fd727..897568157 100644 --- a/tests/flows/ictt/native_home_native_remote_multihop.go +++ b/tests/flows/ictt/native_home_native_remote_multihop.go @@ -77,6 +77,9 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork burnedFeesReportingRewardPercentage, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register both NativeTokenDestinations on the NativeTokenHome collateralAmountA := utils.RegisterTokenRemoteOnHome( ctx, @@ -89,7 +92,7 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) collateralAmountB := utils.RegisterTokenRemoteOnHome( @@ -103,7 +106,7 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Add collateral for both NativeTokenDestinations @@ -167,7 +170,7 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens @@ -203,7 +206,7 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens @@ -227,7 +230,7 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork cChainInfo, amountToSendA, big.NewInt(0), - network.GetSignatureAggregator(), + aggregator, ) // Again, send half of the received amount to account for gas expenses @@ -249,6 +252,6 @@ func NativeTokenHomeNativeTokenRemoteMultiHop(network *localnetwork.LocalNetwork cChainInfo, amountToSendB, secondaryFeeAmount, - network.GetSignatureAggregator(), + aggregator, ) } diff --git a/tests/flows/ictt/registration_and_collateral_check.go b/tests/flows/ictt/registration_and_collateral_check.go index 442db7fe5..03cd89ea1 100644 --- a/tests/flows/ictt/registration_and_collateral_check.go +++ b/tests/flows/ictt/registration_and_collateral_check.go @@ -98,6 +98,9 @@ func RegistrationAndCollateralCheck(network *localnetwork.LocalNetwork, teleport Expect(err).Should(BeNil()) utils.ExpectBigEqual(balance, initialBalance) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Register the NativeTokenRemote to the ERC20TokenHome collateralNeeded := utils.RegisterTokenRemoteOnHome( ctx, @@ -110,7 +113,7 @@ func RegistrationAndCollateralCheck(network *localnetwork.LocalNetwork, teleport utils.GetTokenMultiplier(decimalsShift), multiplyOnRemote, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Try sending again and expect failure since remote is not collateralized @@ -190,7 +193,7 @@ func RegistrationAndCollateralCheck(network *localnetwork.LocalNetwork, teleport true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the recipient received the tokens diff --git a/tests/flows/ictt/transparent_proxy_upgradeability.go b/tests/flows/ictt/transparent_proxy_upgradeability.go index 7dc99ee4e..71e6abc9a 100644 --- a/tests/flows/ictt/transparent_proxy_upgradeability.go +++ b/tests/flows/ictt/transparent_proxy_upgradeability.go @@ -97,6 +97,9 @@ func TransparentUpgradeableProxy(network *localnetwork.LocalNetwork, teleporter tokenDecimals, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + utils.RegisterERC20TokenRemoteOnHome( ctx, teleporter, @@ -105,7 +108,7 @@ func TransparentUpgradeableProxy(network *localnetwork.LocalNetwork, teleporter subnetAInfo, erc20TokenRemoteAddress, fundedKey, - network.GetSignatureAggregator(), + aggregator, ) // Send a transfer from primary network to Subnet A @@ -145,7 +148,7 @@ func TransparentUpgradeableProxy(network *localnetwork.LocalNetwork, teleporter true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) utils.CheckERC20TokenRemoteWithdrawal( @@ -211,7 +214,7 @@ func TransparentUpgradeableProxy(network *localnetwork.LocalNetwork, teleporter true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check that the transfer was successful, and expected balances are correct diff --git a/tests/flows/teleporter/basic_send_receive.go b/tests/flows/teleporter/basic_send_receive.go index e01577982..97da8c397 100644 --- a/tests/flows/teleporter/basic_send_receive.go +++ b/tests/flows/teleporter/basic_send_receive.go @@ -22,10 +22,13 @@ func BasicSendReceive(network *localnetwork.LocalNetwork, teleporter utils.Telep // Send a transaction to Subnet A to issue a Warp Message from the Teleporter contract to Subnet B ctx := context.Background() + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Clear the receipt queue from Subnet B -> Subnet A to have a clean slate for the test flow. // This is only done if the test non-external networks because external networks may have // an arbitrarily high number of receipts to be cleared from a given queue from unrelated messages. - teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo, network.GetSignatureAggregator()) + teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo, aggregator) feeAmount := big.NewInt(1) feeTokenAddress, feeToken := utils.DeployExampleERC20( @@ -74,7 +77,7 @@ func BasicSendReceive(network *localnetwork.LocalNetwork, teleporter utils.Telep true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) receiveEvent, err := utils.GetEventFromLogs( deliveryReceipt.Logs, @@ -109,7 +112,7 @@ func BasicSendReceive(network *localnetwork.LocalNetwork, teleporter utils.Telep true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) Expect(utils.CheckReceiptReceived( diff --git a/tests/flows/teleporter/deliver_to_nonexistent_contract.go b/tests/flows/teleporter/deliver_to_nonexistent_contract.go index 2257ba1d6..664310596 100644 --- a/tests/flows/teleporter/deliver_to_nonexistent_contract.go +++ b/tests/flows/teleporter/deliver_to_nonexistent_contract.go @@ -87,6 +87,10 @@ func DeliverToNonExistentContract(network *localnetwork.LocalNetwork, teleporter // // Relay the message to the destination // + + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + log.Info("Relaying the message to the destination") receipt = teleporter.RelayTeleporterMessage( ctx, @@ -96,7 +100,7 @@ func DeliverToNonExistentContract(network *localnetwork.LocalNetwork, teleporter true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) receiveEvent, err := utils.GetEventFromLogs(receipt.Logs, teleporter.TeleporterMessenger(subnetAInfo).ParseReceiveCrossChainMessage) diff --git a/tests/flows/teleporter/deliver_to_wrong_chain.go b/tests/flows/teleporter/deliver_to_wrong_chain.go index 22345242b..7a76b5cc9 100644 --- a/tests/flows/teleporter/deliver_to_wrong_chain.go +++ b/tests/flows/teleporter/deliver_to_wrong_chain.go @@ -57,6 +57,9 @@ func DeliverToWrongChain(network *localnetwork.LocalNetwork, teleporter utils.Te fundedKey, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + teleporter.RelayTeleporterMessage( ctx, receipt, @@ -65,7 +68,7 @@ func DeliverToWrongChain(network *localnetwork.LocalNetwork, teleporter utils.Te false, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // diff --git a/tests/flows/teleporter/insufficient_gas.go b/tests/flows/teleporter/insufficient_gas.go index 1b593b145..a71c21d7d 100644 --- a/tests/flows/teleporter/insufficient_gas.go +++ b/tests/flows/teleporter/insufficient_gas.go @@ -55,6 +55,9 @@ func InsufficientGas(network *localnetwork.LocalNetwork, teleporter utils.Telepo messageID := event.MessageID + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Relay message from SubnetA to SubnetB receipt = teleporter.RelayTeleporterMessage( ctx, @@ -64,7 +67,7 @@ func InsufficientGas(network *localnetwork.LocalNetwork, teleporter utils.Telepo true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check Teleporter message received on the destination diff --git a/tests/flows/teleporter/registry/pause_teleporter.go b/tests/flows/teleporter/registry/pause_teleporter.go index 84b713d90..f1815dcf1 100644 --- a/tests/flows/teleporter/registry/pause_teleporter.go +++ b/tests/flows/teleporter/registry/pause_teleporter.go @@ -50,6 +50,9 @@ func PauseTeleporter(network *localnetwork.LocalNetwork, teleporter utils.Telepo Expect(err).Should(BeNil()) Expect(isPaused).Should(BeTrue()) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Send a message from subnet A to subnet B, which should fail teleporter.SendExampleCrossChainMessageAndVerify( ctx, @@ -60,7 +63,7 @@ func PauseTeleporter(network *localnetwork.LocalNetwork, teleporter utils.Telepo testMessengerB, fundedKey, "message_1", - network.GetSignatureAggregator(), + aggregator, false, ) @@ -87,7 +90,7 @@ func PauseTeleporter(network *localnetwork.LocalNetwork, teleporter utils.Telepo testMessengerB, fundedKey, "message_2", - network.GetSignatureAggregator(), + aggregator, true, ) } diff --git a/tests/flows/teleporter/registry/teleporter_registry.go b/tests/flows/teleporter/registry/teleporter_registry.go index 85d252737..ad81e4980 100644 --- a/tests/flows/teleporter/registry/teleporter_registry.go +++ b/tests/flows/teleporter/registry/teleporter_registry.go @@ -87,6 +87,9 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel // Restart nodes with new chain config network.SetChainConfigs(chainConfigs) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Call addProtocolVersion on subnetB to register the new Teleporter version teleporter.AddProtocolVersionAndWaitForAcceptance( ctx, @@ -94,7 +97,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel newTeleporterAddress, fundedKey, offchainMessageB, - network.GetSignatureAggregator(), + aggregator, ) // Send a message using old Teleporter version to test messenger using new Teleporter version. @@ -108,7 +111,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel testMessengerB, fundedKey, "message_1", - network.GetSignatureAggregator(), + aggregator, true, ) @@ -145,7 +148,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel testMessengerB, fundedKey, "message_2", - network.GetSignatureAggregator(), + aggregator, false, ) @@ -164,7 +167,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel testMessengerC, fundedKey, "message_3", - network.GetSignatureAggregator(), + aggregator, false, ) @@ -175,7 +178,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel newTeleporterAddress, fundedKey, offchainMessageC, - network.GetSignatureAggregator(), + aggregator, ) // Send a message from A->B, which previously failed, but now using the new Teleporter version. @@ -189,7 +192,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel testMessengerC, fundedKey, "message_4", - network.GetSignatureAggregator(), + aggregator, true, ) @@ -201,7 +204,7 @@ func TeleporterRegistry(network *localnetwork.LocalNetwork, teleporter utils.Tel newTeleporterAddress, fundedKey, offchainMessageA, - network.GetSignatureAggregator(), + aggregator, ) latestVersionA, err := teleporter.TeleporterRegistry(subnetAInfo).LatestVersion(&bind.CallOpts{}) diff --git a/tests/flows/teleporter/relay_message_twice.go b/tests/flows/teleporter/relay_message_twice.go index 61e19f568..72677411e 100644 --- a/tests/flows/teleporter/relay_message_twice.go +++ b/tests/flows/teleporter/relay_message_twice.go @@ -49,6 +49,9 @@ func RelayMessageTwice(network *localnetwork.LocalNetwork, teleporter utils.Tele fundedKey, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // // Relay the message to the destination // @@ -60,7 +63,7 @@ func RelayMessageTwice(network *localnetwork.LocalNetwork, teleporter utils.Tele true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // @@ -85,6 +88,6 @@ func RelayMessageTwice(network *localnetwork.LocalNetwork, teleporter utils.Tele false, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) } diff --git a/tests/flows/teleporter/relayer_modifies_message.go b/tests/flows/teleporter/relayer_modifies_message.go index 366c142f1..fe4441a97 100644 --- a/tests/flows/teleporter/relayer_modifies_message.go +++ b/tests/flows/teleporter/relayer_modifies_message.go @@ -78,13 +78,16 @@ func relayAlteredMessage( ) Expect(err).Should(BeNil()) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + signedWarpMessage := utils.ConstructSignedWarpMessage( ctx, sourceReceipt, source, destination, nil, - network.GetSignatureAggregator(), + aggregator, ) // Construct the transaction to send the Warp message to the destination chain diff --git a/tests/flows/teleporter/resubmit_altered_message.go b/tests/flows/teleporter/resubmit_altered_message.go index 869d27273..37f621661 100644 --- a/tests/flows/teleporter/resubmit_altered_message.go +++ b/tests/flows/teleporter/resubmit_altered_message.go @@ -36,6 +36,9 @@ func ResubmitAlteredMessage(network *localnetwork.LocalNetwork, teleporter utils receipt, messageID := utils.SendCrossChainMessageAndWaitForAcceptance( ctx, teleporter.TeleporterMessenger(subnetAInfo), subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Relay the message to the destination receipt = teleporter.RelayTeleporterMessage( ctx, @@ -45,7 +48,7 @@ func ResubmitAlteredMessage(network *localnetwork.LocalNetwork, teleporter utils true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) log.Info("Checking the message was received on the destination") diff --git a/tests/flows/teleporter/retry_successful_execution.go b/tests/flows/teleporter/retry_successful_execution.go index 067ac9adf..b7e2743b4 100644 --- a/tests/flows/teleporter/retry_successful_execution.go +++ b/tests/flows/teleporter/retry_successful_execution.go @@ -65,6 +65,9 @@ func RetrySuccessfulExecution(network *localnetwork.LocalNetwork, teleporter uti teleporterMessageID := event.MessageID + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // // Relay the message to the destination // @@ -76,7 +79,7 @@ func RetrySuccessfulExecution(network *localnetwork.LocalNetwork, teleporter uti true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) receiveEvent, err := utils.GetEventFromLogs(receipt.Logs, teleporter.TeleporterMessenger(subnetBInfo).ParseReceiveCrossChainMessage) diff --git a/tests/flows/teleporter/send_specific_receipts.go b/tests/flows/teleporter/send_specific_receipts.go index 588a4b6a9..f7c8a05c0 100644 --- a/tests/flows/teleporter/send_specific_receipts.go +++ b/tests/flows/teleporter/send_specific_receipts.go @@ -27,8 +27,11 @@ func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.T _, fundedKey := network.GetFundedAccountInfo() ctx := context.Background() + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Clear the receipt queue from Subnet B -> Subnet A to have a clean slate for the test flow. - teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo, network.GetSignatureAggregator()) + teleporter.ClearReceiptQueue(ctx, fundedKey, subnetBInfo, subnetAInfo, aggregator) // Use mock token as the fee token mockTokenAddress, mockToken := utils.DeployExampleERC20( @@ -74,7 +77,7 @@ func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.T true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) receiveEvent1, err := utils.GetEventFromLogs( deliveryReceipt1.Logs, @@ -102,7 +105,7 @@ func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.T true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) receiveEvent2, err := utils.GetEventFromLogs( deliveryReceipt2.Logs, @@ -141,7 +144,7 @@ func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.T true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check that the message back to Subnet A was delivered @@ -195,7 +198,7 @@ func SendSpecificReceipts(network *localnetwork.LocalNetwork, teleporter utils.T true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Check delivered delivered, err = subnetATeleporterMessenger.MessageReceived( diff --git a/tests/flows/teleporter/unallowed_relayer.go b/tests/flows/teleporter/unallowed_relayer.go index 47ae8c8f9..983b5fabc 100644 --- a/tests/flows/teleporter/unallowed_relayer.go +++ b/tests/flows/teleporter/unallowed_relayer.go @@ -46,6 +46,9 @@ func UnallowedRelayer(network *localnetwork.LocalNetwork, teleporter utils.Telep ctx, teleporter.TeleporterMessenger(subnetAInfo), subnetAInfo, subnetBInfo, sendCrossChainMessageInput, fundedKey, ) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // // Relay the message to the destination // @@ -57,7 +60,7 @@ func UnallowedRelayer(network *localnetwork.LocalNetwork, teleporter utils.Telep false, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // diff --git a/tests/flows/teleporter/validator_churn.go b/tests/flows/teleporter/validator_churn.go index a043e32b0..8ccbe20b6 100644 --- a/tests/flows/teleporter/validator_churn.go +++ b/tests/flows/teleporter/validator_churn.go @@ -58,6 +58,9 @@ func ValidatorChurn(network *localnetwork.LocalNetwork, teleporter utils.Telepor Expect(err).Should(BeNil()) sentTeleporterMessage := sendEvent.Message + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Construct the signed warp message signedWarpMessage := utils.ConstructSignedWarpMessage( ctx, @@ -65,7 +68,7 @@ func ValidatorChurn(network *localnetwork.LocalNetwork, teleporter utils.Telepor subnetAInfo, subnetBInfo, nil, - network.GetSignatureAggregator(), + aggregator, ) // @@ -94,7 +97,7 @@ func ValidatorChurn(network *localnetwork.LocalNetwork, teleporter utils.Telepor } utils.InitializeAndCompletePoAValidatorRegistration( addValidatorsCtx, - network.GetSignatureAggregator(), + aggregator, fundedKey, fundedKey, subnetAInfo, @@ -168,7 +171,7 @@ func ValidatorChurn(network *localnetwork.LocalNetwork, teleporter utils.Telepor true, fundedKey, nil, - network.GetSignatureAggregator(), + aggregator, ) // Verify the message was delivered diff --git a/tests/flows/validator-manager/erc20_token_staking.go b/tests/flows/validator-manager/erc20_token_staking.go index 5f71bc5cd..9adaf3955 100644 --- a/tests/flows/validator-manager/erc20_token_staking.go +++ b/tests/flows/validator-manager/erc20_token_staking.go @@ -144,6 +144,9 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { Expect(err).Should(BeNil()) delegationID = initRegistrationEvent.DelegationID + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Gather subnet-evm Warp signatures for the SubnetValidatorWeightUpdateMessage & relay to the P-Chain signedWarpMessage := utils.ConstructSignedWarpMessage( context.Background(), @@ -151,7 +154,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { subnetAInfo, pChainInfo, nil, - network.GetSignatureAggregator(), + aggregator, ) // Issue a tx to update the validator's weight on the P-Chain @@ -210,6 +213,9 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { Expect(delegatorRemovalEvent.ValidationID[:]).Should(Equal(validationID[:])) Expect(delegatorRemovalEvent.DelegationID[:]).Should(Equal(delegationID[:])) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Gather subnet-evm Warp signatures for the SetSubnetValidatorWeightMessage & relay to the P-Chain // (Sending to the P-Chain will be skipped for now) signedWarpMessage := utils.ConstructSignedWarpMessage( @@ -218,7 +224,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) { subnetAInfo, pChainInfo, nil, - network.GetSignatureAggregator(), + aggregator, ) Expect(err).Should(BeNil()) diff --git a/tests/flows/validator-manager/native_token_staking.go b/tests/flows/validator-manager/native_token_staking.go index 9e77eefe3..dba3c4a1c 100644 --- a/tests/flows/validator-manager/native_token_staking.go +++ b/tests/flows/validator-manager/native_token_staking.go @@ -138,6 +138,9 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { Expect(err).Should(BeNil()) delegationID = initRegistrationEvent.DelegationID + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Gather subnet-evm Warp signatures for the SubnetValidatorWeightUpdateMessage & relay to the P-Chain signedWarpMessage := utils.ConstructSignedWarpMessage( context.Background(), @@ -145,7 +148,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { subnetAInfo, pChainInfo, nil, - network.GetSignatureAggregator(), + aggregator, ) // Issue a tx to update the validator's weight on the P-Chain @@ -203,6 +206,9 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { Expect(delegatorRemovalEvent.ValidationID[:]).Should(Equal(validationID[:])) Expect(delegatorRemovalEvent.DelegationID[:]).Should(Equal(delegationID[:])) + aggregator := network.GetSignatureAggregator() + defer aggregator.Shutdown() + // Gather subnet-evm Warp signatures for the SetSubnetValidatorWeightMessage & relay to the P-Chain // (Sending to the P-Chain will be skipped for now) signedWarpMessage := utils.ConstructSignedWarpMessage( @@ -211,7 +217,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) { subnetAInfo, pChainInfo, nil, - network.GetSignatureAggregator(), + aggregator, ) Expect(err).Should(BeNil()) diff --git a/tests/network/network.go b/tests/network/network.go index cb341c999..d0c406c36 100644 --- a/tests/network/network.go +++ b/tests/network/network.go @@ -5,7 +5,6 @@ import ( "crypto/ecdsa" "encoding/hex" "encoding/json" - "fmt" goLog "log" "os" "sort" @@ -120,17 +119,6 @@ func NewLocalNetwork( ) Expect(network).ShouldNot(BeNil()) - // Activate Etna - // upgrades := upgrade.Default - // upgrades.EtnaTime = time.Now().Add(-1 * time.Minute) - // upgradeJSON, err := json.Marshal(upgrades) - // Expect(err).Should(BeNil()) - - // upgradeBase64 := base64.StdEncoding.EncodeToString(upgradeJSON) - // network.DefaultFlags.SetDefaults(tmpnet.FlagsMap{ - // config.UpgradeFileContentKey: upgradeBase64, - // }) - avalancheGoBuildPath, ok := os.LookupEnv("AVALANCHEGO_BUILD_PATH") Expect(ok).Should(Equal(true)) @@ -165,11 +153,7 @@ func NewLocalNetwork( // All nodes are specified as bootstrap validators var primaryNetworkValidators []*tmpnet.Node - fmt.Println("Primary Network Validators") - for _, node := range network.Nodes { - fmt.Println(node.NodeID, node.URI) - primaryNetworkValidators = append(primaryNetworkValidators, node) - } + primaryNetworkValidators = append(primaryNetworkValidators, network.Nodes...) localNetwork := &LocalNetwork{ Network: *network, @@ -253,6 +237,7 @@ func (n *LocalNetwork) ConvertSubnet( utils.AdvanceProposerVM(ctx, subnet, senderKey, 5) aggregator := n.GetSignatureAggregator() + defer aggregator.Shutdown() validationIDs := utils.InitializeValidatorSet( ctx, senderKey, @@ -263,7 +248,6 @@ func (n *LocalNetwork) ConvertSubnet( aggregator, nodes, ) - aggregator.Shutdown() // Remove the bootstrap nodes as subnet validators for _, vdr := range currentValidators { @@ -271,7 +255,7 @@ func (n *LocalNetwork) ConvertSubnet( Expect(err).Should(BeNil()) for _, node := range n.Network.Nodes { if node.NodeID == vdr.NodeID { - fmt.Println("Restarting bootstrap node", node.NodeID) + goLog.Println("Restarting bootstrap node", node.NodeID) n.Network.RestartNode(ctx, os.Stdout, node) } } diff --git a/tests/utils/chain.go b/tests/utils/chain.go index cf581031f..636addc5d 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -541,8 +541,6 @@ func InstantiateGenesisTemplate( } // Aggregator utils -var instance = 0 - func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.SignatureAggregator { cfg := sigAggConfig.Config{ PChainAPI: &relayerConfig.APIConfig{ @@ -576,18 +574,13 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu agg, err := aggregator.NewSignatureAggregator( appRequestNetwork, - logging.NewLogger(fmt.Sprintf("dbg-sig-agg-%d", instance), logging.NewWrappedCore( - logging.Verbo, - os.Stdout, - logging.JSON.ConsoleEncoder(), - )), + logging.NoLog{}, 1024, metrics.NewSignatureAggregatorMetrics(prometheus.NewRegistry()), // Setting the etnaTime to a minute ago so that the post-etna code path is used in the test time.Now().Add(-1*time.Minute), ) Expect(err).Should(BeNil()) - instance++ return agg } From a3dbc67d68cc3b2f3e90858b1901577b5f579ad3 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 12:24:16 -0600 Subject: [PATCH 7/9] awm-relayer compat --- tests/utils/chain.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/utils/chain.go b/tests/utils/chain.go index 636addc5d..a859939cb 100644 --- a/tests/utils/chain.go +++ b/tests/utils/chain.go @@ -562,11 +562,9 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu Expect(err).Should(BeNil()) appRequestNetwork, err := peers.NewNetwork( - "test-aggregator", - logging.Verbo, + logging.Error, registry, trackedSubnets, - messageCreator, nil, &cfg, ) @@ -575,6 +573,7 @@ func NewSignatureAggregator(apiUri string, subnets []ids.ID) *aggregator.Signatu agg, err := aggregator.NewSignatureAggregator( appRequestNetwork, logging.NoLog{}, + messageCreator, 1024, metrics.NewSignatureAggregatorMetrics(prometheus.NewRegistry()), // Setting the etnaTime to a minute ago so that the post-etna code path is used in the test From a6e92843c3b13eef1e813fd898d9a44a2da6a2a0 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Fri, 22 Nov 2024 13:42:01 -0600 Subject: [PATCH 8/9] remove local awm-relayer dep --- go.mod | 24 +++++++++++------------- go.sum | 42 ++++++++++++++++++++++-------------------- scripts/versions.sh | 2 ++ 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index 4793b8b86..d2d3b2a64 100644 --- a/go.mod +++ b/go.mod @@ -2,26 +2,24 @@ module github.com/ava-labs/teleporter go 1.22.8 -replace github.com/ava-labs/awm-relayer => /Users/cameron.schultz/awm-relayer - require ( - github.com/ava-labs/avalanchego v1.12.0-fuji + github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928 github.com/supranational/blst v0.3.13 // indirect ) require ( - github.com/ava-labs/awm-relayer v0.0.0-00010101000000-000000000000 + github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee github.com/ava-labs/subnet-evm v0.6.12 github.com/ethereum/go-ethereum v1.13.14 - github.com/onsi/ginkgo/v2 v2.21.0 + github.com/onsi/ginkgo/v2 v2.22.0 github.com/onsi/gomega v1.35.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 - golang.org/x/tools v0.26.0 - google.golang.org/protobuf v1.35.1 + golang.org/x/tools v0.27.0 + google.golang.org/protobuf v1.35.2 ) require ( @@ -148,15 +146,15 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.30.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.31.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/time v0.3.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect diff --git a/go.sum b/go.sum index 8b6c84b17..62043f036 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,10 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ava-labs/avalanchego v1.12.0-fuji h1:o/GbXrqW9CAXu2jX/a1dZtvFiiSVCWomJZyxF4hCQOA= -github.com/ava-labs/avalanchego v1.12.0-fuji/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= +github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928 h1:th+K+wWgAYL/NsrFJyO+/sThLRdEDE0+I4vgbPLoWQQ= +github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= +github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee h1:Op1rpuqFo28RnurIfQRCgMmjpRzCcXmbRoCC0I3+NOo= +github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee/go.mod h1:2/GCie3ccW/rVJfOJmJyiGDjtZILWujpB/r/KcVV8/s= github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU= github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo= github.com/ava-labs/subnet-evm v0.6.12 h1:jL3FmjdFcNfS0qwbehwN6DkAg9y7zexB1riiGBxRsM0= @@ -487,8 +489,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= +github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -666,8 +668,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -706,8 +708,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -753,8 +755,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -846,12 +848,12 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -862,8 +864,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -925,8 +927,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1034,8 +1036,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/scripts/versions.sh b/scripts/versions.sh index b34659f58..a2fd7cbce 100755 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -34,6 +34,8 @@ AWM_RELAYER_VERSION=${AWM_RELAYER_VERSION:-'v1.0.0'} # Don't export them as they're used in the context of other calls AVALANCHEGO_VERSION=${AVALANCHEGO_VERSION:-$(extract_commit "$(getDepVersion github.com/ava-labs/avalanchego)")} +# Temporarily hardcode the Avalanchego version until outbound networking relaxation is available +AVALANCHEGO_VERSION=v1.12.0-fuji GINKGO_VERSION=${GINKGO_VERSION:-$(extract_commit "$(getDepVersion github.com/onsi/ginkgo/v2)")} SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-$(extract_commit "$(getDepVersion github.com/ava-labs/subnet-evm)")} From e0d59da7e66bc1a8941437c68e44ea18dbd39420 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Fri, 22 Nov 2024 14:23:59 -0600 Subject: [PATCH 9/9] latest awm-relayer --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d2d3b2a64..a0ad06c72 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( ) require ( - github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee + github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260 github.com/ava-labs/subnet-evm v0.6.12 github.com/ethereum/go-ethereum v1.13.14 github.com/onsi/ginkgo/v2 v2.22.0 diff --git a/go.sum b/go.sum index 62043f036..16b0e0967 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928 h1:th+K+wWgAYL/NsrFJyO+/sThLRdEDE0+I4vgbPLoWQQ= github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= -github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee h1:Op1rpuqFo28RnurIfQRCgMmjpRzCcXmbRoCC0I3+NOo= -github.com/ava-labs/awm-relayer v1.4.1-0.20241122193929-3dae643932ee/go.mod h1:2/GCie3ccW/rVJfOJmJyiGDjtZILWujpB/r/KcVV8/s= +github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260 h1:VRNzoY1xvXHphcXXmuXMrUFp5Gm/eiipVJMmNV+UN9c= +github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260/go.mod h1:/hrQpd8P3BfShbRoDE1vD1WZXBchu7r8CQPTEb5tWOQ= github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU= github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo= github.com/ava-labs/subnet-evm v0.6.12 h1:jL3FmjdFcNfS0qwbehwN6DkAg9y7zexB1riiGBxRsM0=