From 94160c299a9a20b0d46602b9fda7ffc66049c790 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 16:24:13 -0600 Subject: [PATCH 1/4] tests use sov compatible framework --- go.mod | 52 ++++++--- go.sum | 106 +++++++++++++----- peers/app_request_network.go | 2 +- peers/info_client.go | 4 +- .../validators/canonical_validator_client.go | 7 ++ relayer/main/main.go | 2 +- scripts/e2e_test.sh | 44 +++----- tests/allowed_addresses.go | 31 ++--- tests/basic_relay.go | 13 ++- tests/batch_relay.go | 10 +- tests/contracts/lib/teleporter | 2 +- tests/e2e_test.go | 43 ++++--- tests/etna_upgrade.go | 12 +- tests/manual_message.go | 19 ++-- tests/relay_message_api.go | 11 +- tests/shared_db.go | 16 +-- tests/signature_aggregator_api.go | 6 +- tests/utils/utils.go | 74 +++++++++--- tests/warp_api.go | 12 +- 19 files changed, 300 insertions(+), 166 deletions(-) diff --git a/go.mod b/go.mod index e108a4cd..f25a9646 100644 --- a/go.mod +++ b/go.mod @@ -3,16 +3,16 @@ module github.com/ava-labs/awm-relayer go 1.22.8 require ( - github.com/ava-labs/avalanchego v1.11.12 + github.com/ava-labs/avalanchego v1.12.0-initial-poc.9 github.com/ava-labs/coreth v0.13.8 - github.com/ava-labs/subnet-evm v0.6.11 - github.com/ava-labs/teleporter v1.0.7 + github.com/ava-labs/subnet-evm v0.6.12-rc.0 + github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c github.com/aws/aws-sdk-go-v2 v1.32.4 github.com/aws/aws-sdk-go-v2/config v1.28.3 github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 github.com/ethereum/go-ethereum v1.13.14 github.com/hashicorp/golang-lru/v2 v2.0.7 - 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/pingcap/errors v0.11.4 github.com/pkg/errors v0.9.1 @@ -24,7 +24,7 @@ require ( go.uber.org/mock v0.5.0 go.uber.org/zap v1.27.0 google.golang.org/grpc v1.68.0 - google.golang.org/protobuf v1.35.1 + google.golang.org/protobuf v1.35.2 ) require ( @@ -64,6 +64,7 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect @@ -73,12 +74,18 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -95,18 +102,25 @@ require ( github.com/huin/goupnp v1.3.0 // indirect github.com/jackpal/gateway v1.0.6 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect @@ -116,7 +130,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect @@ -125,7 +139,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect - github.com/supranational/blst v0.3.11 // indirect + github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect @@ -142,21 +156,33 @@ require ( go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.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/net v0.30.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/net v0.31.0 // indirect + golang.org/x/oauth2 v0.23.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 - golang.org/x/tools v0.26.0 // indirect + golang.org/x/tools v0.27.0 // indirect gonum.org/v1/gonum v0.11.0 // 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 + 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 + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.29.0 // indirect + k8s.io/apimachinery v0.29.0 // indirect + k8s.io/client-go v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect rsc.io/tmplfunc v0.0.3 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) require ( diff --git a/go.sum b/go.sum index e6e37b80..5e007832 100644 --- a/go.sum +++ b/go.sum @@ -58,14 +58,16 @@ github.com/alexliesenfeld/health v0.8.0/go.mod h1:TfNP0f+9WQVWMQRzvMUjlws4ceXKEL github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.12 h1:fpGs7xsHYjswIik3tdlGcDaHXh22DLcuf5Ri5+u4RNM= -github.com/ava-labs/avalanchego v1.11.12/go.mod h1:qSHmog3wMVjo/ruIAQo0ppXAilyni07NIu5K88RyhWE= +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.9 h1:dQhb+KlPoud+AkRV3A0suKCTodlUSzflGcZElESeVKo= +github.com/ava-labs/avalanchego v1.12.0-initial-poc.9/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= 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= -github.com/ava-labs/subnet-evm v0.6.11/go.mod h1:fP46lzBtiniRfpNH+Qu9BFvSsa02YGkAobxinZ78gDU= -github.com/ava-labs/teleporter v1.0.7 h1:9H0wTWhgWeA4u6uxi9KngdBu/LOoYsfAmIZhXNzuvf8= -github.com/ava-labs/teleporter v1.0.7/go.mod h1:wgCgU6vU5MtP83otpjEin8jL2jrflVBNQCTxVXMx/kU= +github.com/ava-labs/subnet-evm v0.6.12-rc.0 h1:I7s4QkUO8bjg+JB/KTwrmDH8Q2mQYVTKF8mFUSDqk+E= +github.com/ava-labs/subnet-evm v0.6.12-rc.0/go.mod h1:Pf122zopW1fELpOsw0PrdX4u6K/4VOWU2p5C3cHsYAs= +github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c h1:DqmojsxggU6Jpv9l6ZsS3eavapjqylAsuXBmj4B2SkU= +github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c/go.mod h1:kTnq4uBwtXVlTM2ooWBmKbscSwwmMA56AlV8uf+ywt8= github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= @@ -201,6 +203,8 @@ github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -242,6 +246,7 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -250,6 +255,12 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AE github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -306,6 +317,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -316,10 +329,13 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -353,6 +369,7 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -396,9 +413,13 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -435,6 +456,8 @@ github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -464,15 +487,22 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -493,8 +523,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= @@ -534,8 +564,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -582,13 +612,14 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= @@ -675,8 +706,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= @@ -760,8 +791,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= @@ -771,6 +802,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.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= @@ -851,12 +884,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= @@ -867,8 +900,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= @@ -930,8 +963,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= @@ -1039,8 +1072,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= @@ -1050,6 +1083,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1061,6 +1096,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1076,8 +1112,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/peers/app_request_network.go b/peers/app_request_network.go index f5673214..e790b41b 100644 --- a/peers/app_request_network.go +++ b/peers/app_request_network.go @@ -164,7 +164,7 @@ func (n *appRequestNetwork) ConnectPeers(nodeIDs set.Set[ids.NodeID]) set.Set[id startInfoAPICall := time.Now() // Get the list of publicly discoverable peers - peers, err := n.infoAPI.Peers(context.Background()) + peers, err := n.infoAPI.Peers(context.Background(), nil) n.setInfoAPICallLatencyMS(float64(time.Since(startInfoAPICall).Milliseconds())) if err != nil { n.logger.Error( diff --git a/peers/info_client.go b/peers/info_client.go index bf6ea091..dbefc0ac 100644 --- a/peers/info_client.go +++ b/peers/info_client.go @@ -68,8 +68,8 @@ func (i *InfoAPI) IsBootstrapped(ctx context.Context, chainID string) (bool, err return i.client.IsBootstrapped(ctx, chainID, i.options...) } -func (i *InfoAPI) Peers(ctx context.Context) ([]info.Peer, error) { - return i.client.Peers(ctx, i.options...) +func (i *InfoAPI) Peers(ctx context.Context, nodes []ids.NodeID) ([]info.Peer, error) { + return i.client.Peers(ctx, nodes, i.options...) } func (i *InfoAPI) Uptime(ctx context.Context) (*info.UptimeResponse, error) { diff --git a/peers/validators/canonical_validator_client.go b/peers/validators/canonical_validator_client.go index 4d51e1c3..3aed427b 100644 --- a/peers/validators/canonical_validator_client.go +++ b/peers/validators/canonical_validator_client.go @@ -101,6 +101,13 @@ func (v *CanonicalValidatorClient) GetValidatorSet( return res, nil } +func (v *CanonicalValidatorClient) GetCurrentValidatorSet( + _ context.Context, + _ ids.ID, +) (map[ids.ID]*validators.GetCurrentValidatorOutput, uint64, error) { + return nil, 0, nil +} + // Gets the current validator set of the given subnet ID, including the validators' BLS public // keys. The implementation currently makes two RPC requests, one to get the subnet validators, // and another to get their BLS public keys. This is necessary in order to enable the use of diff --git a/relayer/main/main.go b/relayer/main/main.go index da4a3d41..2e7e4b99 100644 --- a/relayer/main/main.go +++ b/relayer/main/main.go @@ -556,7 +556,7 @@ func startMetricsServer(logger logging.Logger, gatherer prometheus.Gatherer, por } func initializeMetrics() (prometheus.Gatherer, prometheus.Registerer, error) { - gatherer := metrics.NewMultiGatherer() + gatherer := metrics.NewPrefixGatherer() registry := prometheus.NewRegistry() if err := gatherer.Register("app", registry); err != nil { return nil, nil, err diff --git a/scripts/e2e_test.sh b/scripts/e2e_test.sh index 028d2547..2fe7ebcc 100755 --- a/scripts/e2e_test.sh +++ b/scripts/e2e_test.sh @@ -4,16 +4,10 @@ set -e -SUBNET_EVM_PATH= -LOCAL= -DATA_DIRECTORY= HELP= LOG_LEVEL= while [ $# -gt 0 ]; do case "$1" in - -l | --local) LOCAL=true ;; - -s | --subnet-evm) SUBNET_EVM_PATH=$2 ;; - -d | --data-dir) DATA_DIRECTORY=$2 ;; -v | --verbose) LOG_LEVEL=debug ;; -h | --help) HELP=true ;; esac @@ -25,42 +19,32 @@ if [ "$HELP" = true ]; then echo "Run E2E tests for AWM Relayer." echo "" echo "Options:" - echo " -l, --local Run the test locally. Requires --subnet-evm and --data-dir" - echo " -s, --subnet-evm Path to subnet-evm repo" - echo " -d, --data-dir Path to data directory" echo " -v, --verbose Enable debug logs" echo " -h, --help Print this help message" exit 0 fi -if [ "$LOCAL" = true ]; then - if [ -z "$DATA_DIRECTORY" ]; then - echo "Must specify data directory when running local" - exit 1 - fi - if [ -z "$SUBNET_EVM_PATH" ]; then - echo "Must specify subnet-evm path when running local" - exit 1 - fi - cwd=$PWD - cd $SUBNET_EVM_PATH - BASEDIR=$DATA_DIRECTORY AVALANCHEGO_BUILD_PATH=$DATA_DIRECTORY/avalanchego ./scripts/install_avalanchego_release.sh - ./scripts/build.sh $DATA_DIRECTORY/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy - - cd $cwd - export AVALANCHEGO_BUILD_PATH=$DATA_DIRECTORY/avalanchego - export DATA_DIR=$DATA_DIRECTORY/data -fi - BASE_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" cd .. && pwd ) source "$BASE_PATH"/scripts/constants.sh - source "$BASE_PATH"/scripts/versions.sh +BASEDIR=${BASEDIR:-"$HOME/.teleporter-deps"} + +cwd=$(pwd) +# Install the avalanchego and subnet-evm binaries +rm -rf $BASEDIR/avalanchego +BASEDIR=$BASEDIR AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego "${TELEPORTER_PATH}/scripts/install_avalanchego_release.sh" +BASEDIR=$BASEDIR "${TELEPORTER_PATH}/scripts/install_subnetevm_release.sh" + +cp ${BASEDIR}/subnet-evm/subnet-evm ${BASEDIR}/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy +echo "Copied ${BASEDIR}/subnet-evm/subnet-evm binary to ${BASEDIR}/avalanchego/plugins/" + +export AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego + # Build ginkgo # to install the ginkgo binary (required for test build and run) go install -v github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} @@ -76,4 +60,4 @@ RUN_E2E=true LOG_LEVEL=${LOG_LEVEL} ./tests/tests.test \ --ginkgo.focus=${GINKGO_FOCUS:-""} echo "e2e tests passed" -exit 0 +exit 0 \ No newline at end of file diff --git a/tests/allowed_addresses.go b/tests/allowed_addresses.go index f662878c..0c1c5386 100644 --- a/tests/allowed_addresses.go +++ b/tests/allowed_addresses.go @@ -13,6 +13,7 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/subnet-evm/accounts/abi/bind" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -36,11 +37,10 @@ const numKeys = 4 // - Deliver from a specific source address to a specific destination address // Then, checks that each relayer instance is able to properly catch up on missed messages that // match its particular configuration. -func AllowedAddresses(network interfaces.LocalNetwork) { +func AllowedAddresses(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -84,9 +84,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // All sources -> All destinations // Will send from allowed Address 0 -> 0 relayerConfig1 := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -94,9 +94,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Specific source -> All destinations // Will send from allowed Address 1 -> 0 relayerConfig2 := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -109,9 +109,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // All sources -> Specific destination // Will send from allowed Address 2 -> 0 relayerConfig3 := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -135,9 +135,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Specific source -> Specific destination // Will send from allowed Address 3 -> 0 relayerConfig4 := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -188,9 +188,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Allowed by Relayer 1 testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, allowedKeys[generalAllowedAddressIdx], allowedAddresses[generalAllowedAddressIdx], ) @@ -218,13 +218,14 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Disallowed by Relayer 2 _, _, id := testUtils.SendBasicTeleporterMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, allowedKeys[generalAllowedAddressIdx], // not allowed allowedAddresses[generalAllowedAddressIdx], ) Consistently(func() bool { - delivered, err := subnetBInfo.TeleporterMessenger.MessageReceived( + delivered, err := teleporter.TeleporterMessenger(subnetBInfo).MessageReceived( &bind.CallOpts{}, id, ) Expect(err).Should(BeNil()) @@ -234,9 +235,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Allowed by Relayer 2 testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, allowedKeys[relayer2AllowedSrcAddressIdx], allowedAddresses[generalAllowedAddressIdx], ) @@ -264,13 +265,14 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Disallowed by Relayer 3 _, _, id = testUtils.SendBasicTeleporterMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, allowedKeys[generalAllowedAddressIdx], allowedAddresses[generalAllowedAddressIdx], // not allowed ) Consistently(func() bool { - delivered, err := subnetBInfo.TeleporterMessenger.MessageReceived( + delivered, err := teleporter.TeleporterMessenger(subnetBInfo).MessageReceived( &bind.CallOpts{}, id, ) Expect(err).Should(BeNil()) @@ -280,9 +282,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Allowed by Relayer 3 testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, allowedKeys[generalAllowedAddressIdx], allowedAddresses[relayer3AllowedDstAddressIdx], ) @@ -309,13 +311,14 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Disallowed by Relayer 4 _, _, id = testUtils.SendBasicTeleporterMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, allowedKeys[generalAllowedAddressIdx], // not allowed allowedAddresses[generalAllowedAddressIdx], ) Consistently(func() bool { - delivered, err := subnetBInfo.TeleporterMessenger.MessageReceived( + delivered, err := teleporter.TeleporterMessenger(subnetBInfo).MessageReceived( &bind.CallOpts{}, id, ) Expect(err).Should(BeNil()) @@ -325,9 +328,9 @@ func AllowedAddresses(network interfaces.LocalNetwork) { // Allowed by Relayer 4 testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, allowedKeys[relayer4AllowedSrcAddressIdx], allowedAddresses[relayer4AllowedDstAddressIdx], ) diff --git a/tests/basic_relay.go b/tests/basic_relay.go index ed3aa2f2..f96bcc86 100644 --- a/tests/basic_relay.go +++ b/tests/basic_relay.go @@ -13,6 +13,7 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/subnet-evm/core/types" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -24,11 +25,10 @@ import ( // - Relaying from Subnet B to Subnet A // - Relaying an already delivered message // - Setting ProcessHistoricalBlocksFromHeight in config -func BasicRelay(network interfaces.LocalNetwork) { +func BasicRelay(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -46,9 +46,9 @@ func BasicRelay(network interfaces.LocalNetwork) { // Set up relayer config // relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -78,9 +78,9 @@ func BasicRelay(network interfaces.LocalNetwork) { log.Info("Sending transaction from Subnet A to Subnet B") testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -91,9 +91,9 @@ func BasicRelay(network interfaces.LocalNetwork) { log.Info("Test Relaying from Subnet B to Subnet A") testUtils.RelayBasicMessage( ctx, + teleporter, subnetBInfo, subnetAInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -172,6 +172,7 @@ func BasicRelay(network interfaces.LocalNetwork) { log.Info("Test Setting ProcessHistoricalBlocksFromHeight in config") testUtils.TriggerProcessMissedBlocks( ctx, + teleporter, subnetAInfo, subnetBInfo, relayerCleanup, diff --git a/tests/batch_relay.go b/tests/batch_relay.go index b1960a5c..db6d3b2e 100644 --- a/tests/batch_relay.go +++ b/tests/batch_relay.go @@ -12,6 +12,7 @@ import ( "github.com/ava-labs/subnet-evm/accounts/abi/bind" "github.com/ava-labs/subnet-evm/core/types" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -20,10 +21,9 @@ import ( ) // Processes multiple Warp messages contained in the same block -func BatchRelay(network interfaces.LocalNetwork) { - subnetAInfo, subnetBInfo := utils.GetTwoSubnets(network) +func BatchRelay(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { + subnetAInfo, subnetBInfo := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -34,12 +34,14 @@ func BatchRelay(network interfaces.LocalNetwork) { _, batchMessengerA := testUtils.DeployBatchCrossChainMessenger( ctx, fundedKey, + teleporter, fundedAddress, subnetAInfo, ) batchMessengerAddressB, batchMessengerB := testUtils.DeployBatchCrossChainMessenger( ctx, fundedKey, + teleporter, fundedAddress, subnetBInfo, ) @@ -57,9 +59,9 @@ func BatchRelay(network interfaces.LocalNetwork) { // Set up relayer config // relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) diff --git a/tests/contracts/lib/teleporter b/tests/contracts/lib/teleporter index f23da2da..1bd1eda4 160000 --- a/tests/contracts/lib/teleporter +++ b/tests/contracts/lib/teleporter @@ -1 +1 @@ -Subproject commit f23da2da8fdd5ef4e3bad46358054c4b36dec78b +Subproject commit 1bd1eda4cd1c0da51dcac8930c8e7f463edf586a diff --git a/tests/e2e_test.go b/tests/e2e_test.go index 2210d66a..f92cfdde 100644 --- a/tests/e2e_test.go +++ b/tests/e2e_test.go @@ -17,7 +17,8 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/awm-relayer/utils" - "github.com/ava-labs/teleporter/tests/local" + "github.com/ava-labs/teleporter/tests/network" + teleporterTestUtils "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/onsi/ginkgo/v2" @@ -29,7 +30,8 @@ const ( ) var ( - localNetworkInstance *local.LocalNetwork + localNetworkInstance *network.LocalNetwork + teleporterInfo teleporterTestUtils.TeleporterTestInfo decider *exec.Cmd cancelFn context.CancelFunc @@ -81,11 +83,11 @@ var _ = ginkgo.BeforeSuite(func() { Expect(err).Should(BeNil()) networkStartCtx, networkStartCancel := context.WithTimeout(ctx, 120*time.Second) defer networkStartCancel() - localNetworkInstance = local.NewLocalNetwork( + localNetworkInstance = network.NewLocalNetwork( networkStartCtx, "icm-off-chain-services-e2e-test", warpGenesisTemplateFile, - []local.SubnetSpec{ + []network.SubnetSpec{ { Name: "A", EVMChainID: 12345, @@ -103,21 +105,28 @@ var _ = ginkgo.BeforeSuite(func() { NodeCount: 2, }, }, + 4, 0, ) + teleporterInfo = teleporterTestUtils.NewTeleporterTestInfo(localNetworkInstance.GetAllSubnetsInfo()) + // Only need to deploy Teleporter on the C-Chain since it is included in the genesis of the subnet chains. _, fundedKey := localNetworkInstance.GetFundedAccountInfo() - log.Info("Deployed Teleporter contracts") - localNetworkInstance.DeployTeleporterContractToCChain( + teleporterInfo.DeployTeleporterMessenger( + networkStartCtx, + localNetworkInstance.GetPrimaryNetworkInfo(), teleporterDeployerTransaction, teleporterDeployerAddress, teleporterContractAddress, fundedKey, ) - localNetworkInstance.SetTeleporterContractAddress(teleporterContractAddress) // Deploy the Teleporter registry contracts to all subnets and the C-Chain. - localNetworkInstance.DeployTeleporterRegistryContracts(teleporterContractAddress, fundedKey) + for _, subnet := range localNetworkInstance.GetAllSubnetsInfo() { + teleporterInfo.SetTeleporter(teleporterContractAddress, subnet) + teleporterInfo.InitializeBlockchainID(subnet, fundedKey) + teleporterInfo.DeployTeleporterRegistry(subnet, fundedKey) + } decider = exec.CommandContext(ctx, "./tests/cmd/decider/decider") decider.Start() @@ -155,30 +164,30 @@ var _ = ginkgo.AfterSuite(cleanup) var _ = ginkgo.Describe("[AWM Relayer Integration Tests", func() { ginkgo.It("Manually Provided Message", func() { - ManualMessage(localNetworkInstance) + ManualMessage(localNetworkInstance, teleporterInfo) }) ginkgo.It("Basic Relay", func() { - BasicRelay(localNetworkInstance) + BasicRelay(localNetworkInstance, teleporterInfo) }) ginkgo.It("Shared Database", func() { - SharedDatabaseAccess(localNetworkInstance) + SharedDatabaseAccess(localNetworkInstance, teleporterInfo) }) ginkgo.It("Allowed Addresses", func() { - AllowedAddresses(localNetworkInstance) + AllowedAddresses(localNetworkInstance, teleporterInfo) }) ginkgo.It("Batch Message", func() { - BatchRelay(localNetworkInstance) + BatchRelay(localNetworkInstance, teleporterInfo) }) ginkgo.It("Relay Message API", func() { - RelayMessageAPI(localNetworkInstance) + RelayMessageAPI(localNetworkInstance, teleporterInfo) }) ginkgo.It("Warp API", func() { - WarpAPIRelay(localNetworkInstance) + WarpAPIRelay(localNetworkInstance, teleporterInfo) }) ginkgo.It("Signature Aggregator", func() { - SignatureAggregatorAPI(localNetworkInstance) + SignatureAggregatorAPI(localNetworkInstance, teleporterInfo) }) ginkgo.It("Etna Upgrade", func() { - EtnaUpgrade(localNetworkInstance) + EtnaUpgrade(localNetworkInstance, teleporterInfo) }) }) diff --git a/tests/etna_upgrade.go b/tests/etna_upgrade.go index 02ab768c..1c9ce1f2 100644 --- a/tests/etna_upgrade.go +++ b/tests/etna_upgrade.go @@ -9,6 +9,7 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -20,11 +21,10 @@ import ( // to the config and therefore are testing the pre-etna case // - Relaying from Subnet A to Subnet B // - Relaying from Subnet B to Subnet A -func EtnaUpgrade(network interfaces.LocalNetwork) { +func EtnaUpgrade(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) // @@ -41,9 +41,9 @@ func EtnaUpgrade(network interfaces.LocalNetwork) { // Set up relayer config // relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -75,9 +75,9 @@ func EtnaUpgrade(network interfaces.LocalNetwork) { log.Info("Sending transaction from Subnet A to Subnet B") testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -85,9 +85,9 @@ func EtnaUpgrade(network interfaces.LocalNetwork) { log.Info("Test Relaying from Subnet B to Subnet A") testUtils.RelayBasicMessage( ctx, + teleporter, subnetBInfo, subnetAInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) diff --git a/tests/manual_message.go b/tests/manual_message.go index b254ad99..6e4be6b2 100644 --- a/tests/manual_message.go +++ b/tests/manual_message.go @@ -17,6 +17,8 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/subnet-evm/accounts/abi/bind" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" + "github.com/ava-labs/teleporter/tests/utils" teleporterTestUtils "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -27,18 +29,17 @@ import ( // Tests relayer support for off-chain Teleporter Registry updates // - Configures the relayer to send an off-chain message to the Teleporter Registry // - Verifies that the Teleporter Registry is updated -func ManualMessage(network interfaces.LocalNetwork) { +func ManualMessage(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { cChainInfo := network.GetPrimaryNetworkInfo() - subnetAInfo, subnetBInfo := teleporterTestUtils.GetTwoSubnets(network) + subnetAInfo, subnetBInfo := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) // // Get the current Teleporter Registry version // - currentVersion, err := cChainInfo.TeleporterRegistry.LatestVersion(&bind.CallOpts{}) + currentVersion, err := teleporter.TeleporterRegistry(cChainInfo).LatestVersion(&bind.CallOpts{}) Expect(err).Should(BeNil()) expectedNewVersion := currentVersion.Add(currentVersion, big.NewInt(1)) @@ -66,18 +67,21 @@ func ManualMessage(network interfaces.LocalNetwork) { unsignedMessage, warpEnabledChainConfigC := teleporterTestUtils.InitOffChainMessageChainConfig( networkID, cChainInfo, + teleporter.TeleporterRegistryAddress(cChainInfo), newProtocolAddress, 2, ) _, warpEnabledChainConfigA := teleporterTestUtils.InitOffChainMessageChainConfig( networkID, subnetAInfo, + teleporter.TeleporterRegistryAddress(subnetAInfo), newProtocolAddress, 2, ) _, warpEnabledChainConfigB := teleporterTestUtils.InitOffChainMessageChainConfig( networkID, subnetBInfo, + teleporter.TeleporterRegistryAddress(subnetBInfo), newProtocolAddress, 2, ) @@ -89,10 +93,9 @@ func ManualMessage(network interfaces.LocalNetwork) { chainConfigs.Add(subnetAInfo, warpEnabledChainConfigA) // Restart nodes with new chain config - nodeIDs := network.GetAllNodeIDs() log.Info("Restarting nodes with new chain config") network.SetChainConfigs(chainConfigs) - network.RestartNodes(ctx, nodeIDs) + // Refresh the subnet info to get the new clients cChainInfo = network.GetPrimaryNetworkInfo() @@ -100,9 +103,9 @@ func ManualMessage(network interfaces.LocalNetwork) { // Set up relayer config // relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{cChainInfo}, []interfaces.SubnetTestInfo{cChainInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -150,7 +153,7 @@ func ManualMessage(network interfaces.LocalNetwork) { // Wait for all nodes to see new transaction time.Sleep(1 * time.Second) - newVersion, err := cChainInfo.TeleporterRegistry.LatestVersion(&bind.CallOpts{}) + newVersion, err := teleporter.TeleporterRegistry(cChainInfo).LatestVersion(&bind.CallOpts{}) Expect(err).Should(BeNil()) Expect(newVersion.Uint64()).Should(Equal(expectedNewVersion.Uint64())) } diff --git a/tests/relay_message_api.go b/tests/relay_message_api.go index 2c18ed81..67618d63 100644 --- a/tests/relay_message_api.go +++ b/tests/relay_message_api.go @@ -20,6 +20,7 @@ import ( subnetEvmInterfaces "github.com/ava-labs/subnet-evm/interfaces" "github.com/ava-labs/subnet-evm/precompile/contracts/warp" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" teleporterTestUtils "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/common" @@ -28,12 +29,11 @@ import ( . "github.com/onsi/gomega" ) -func RelayMessageAPI(network interfaces.LocalNetwork) { +func RelayMessageAPI(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { ctx := context.Background() subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -45,6 +45,7 @@ func RelayMessageAPI(network interfaces.LocalNetwork) { log.Info("Sending teleporter message") receipt, _, teleporterMessageID := testUtils.SendBasicTeleporterMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, fundedKey, @@ -54,9 +55,9 @@ func RelayMessageAPI(network interfaces.LocalNetwork) { // Set up relayer config relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -117,7 +118,7 @@ func RelayMessageAPI(network interfaces.LocalNetwork) { Expect(err).Should(BeNil()) receiveEvent, err := teleporterTestUtils.GetEventFromLogs( receipt.Logs, - subnetBInfo.TeleporterMessenger.ParseReceiveCrossChainMessage, + teleporter.TeleporterMessenger(subnetBInfo).ParseReceiveCrossChainMessage, ) Expect(err).Should(BeNil()) Expect(ids.ID(receiveEvent.MessageID)).Should(Equal(teleporterMessageID)) diff --git a/tests/shared_db.go b/tests/shared_db.go index 0114dd18..7817de78 100644 --- a/tests/shared_db.go +++ b/tests/shared_db.go @@ -6,6 +6,7 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -15,11 +16,10 @@ import ( const relayerCfgFnameA = "relayer-config-a.json" const relayerCfgFnameB = "relayer-config-b.json" -func SharedDatabaseAccess(network interfaces.LocalNetwork) { +func SharedDatabaseAccess(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -42,17 +42,17 @@ func SharedDatabaseAccess(network interfaces.LocalNetwork) { // // Relayer A will relay messages from Subnet A to Subnet B relayerConfigA := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo}, []interfaces.SubnetTestInfo{subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKeyA, ) // Relayer B will relay messages from Subnet B to Subnet A relayerConfigB := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo}, - teleporterContractAddress, fundedAddress, relayerKeyB, ) @@ -96,9 +96,9 @@ func SharedDatabaseAccess(network interfaces.LocalNetwork) { log.Info("Sending transaction from Subnet A to Subnet B") testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -109,9 +109,9 @@ func SharedDatabaseAccess(network interfaces.LocalNetwork) { log.Info("Test Relaying from Subnet B to Subnet A") testUtils.RelayBasicMessage( ctx, + teleporter, subnetBInfo, subnetAInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -122,6 +122,7 @@ func SharedDatabaseAccess(network interfaces.LocalNetwork) { log.Info("Testing processing missed blocks on Subnet A") testUtils.TriggerProcessMissedBlocks( ctx, + teleporter, subnetAInfo, subnetBInfo, relayerCleanupA, @@ -133,6 +134,7 @@ func SharedDatabaseAccess(network interfaces.LocalNetwork) { log.Info("Testing processing missed blocks on Subnet B") testUtils.TriggerProcessMissedBlocks( ctx, + teleporter, subnetBInfo, subnetAInfo, relayerCleanupB, diff --git a/tests/signature_aggregator_api.go b/tests/signature_aggregator_api.go index 2e26855e..d7cb8344 100644 --- a/tests/signature_aggregator_api.go +++ b/tests/signature_aggregator_api.go @@ -21,6 +21,7 @@ import ( "github.com/ava-labs/awm-relayer/signature-aggregator/metrics" testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/log" . "github.com/onsi/gomega" @@ -35,12 +36,12 @@ import ( // - Reads the warp message unsigned bytes from the log // - Sends the unsigned message to the signature aggregator API // - Confirms that the signed message is returned and matches the originally sent message -func SignatureAggregatorAPI(network interfaces.LocalNetwork) { +func SignatureAggregatorAPI(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { // Begin Setup step ctx := context.Background() subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() signatureAggregatorConfig := testUtils.CreateDefaultSignatureAggregatorConfig( @@ -71,6 +72,7 @@ func SignatureAggregatorAPI(network interfaces.LocalNetwork) { log.Info("Sending teleporter message") receipt, _, _ := testUtils.SendBasicTeleporterMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, fundedKey, diff --git a/tests/utils/utils.go b/tests/utils/utils.go index 70974a4b..09d8a255 100644 --- a/tests/utils/utils.go +++ b/tests/utils/utils.go @@ -110,9 +110,9 @@ func ReadHexTextFile(filename string) string { // Constructs a relayer config with all subnets as sources and destinations func CreateDefaultRelayerConfig( + teleporter teleporterTestUtils.TeleporterTestInfo, sourceSubnetsInfo []interfaces.SubnetTestInfo, destinationSubnetsInfo []interfaces.SubnetTestInfo, - teleporterContractAddress common.Address, fundedAddress common.Address, relayerKey *ecdsa.PrivateKey, ) relayercfg.Config { @@ -144,7 +144,7 @@ func CreateDefaultRelayerConfig( }, MessageContracts: map[string]relayercfg.MessageProtocolConfig{ - teleporterContractAddress.Hex(): { + teleporter.TeleporterMessengerAddress(subnetInfo).Hex(): { MessageFormat: relayercfg.TELEPORTER.String(), Settings: map[string]interface{}{ "reward-address": fundedAddress.Hex(), @@ -153,7 +153,7 @@ func CreateDefaultRelayerConfig( offchainregistry.OffChainRegistrySourceAddress.Hex(): { MessageFormat: relayercfg.OFF_CHAIN_REGISTRY.String(), Settings: map[string]interface{}{ - "teleporter-registry-address": subnetInfo.TeleporterRegistryAddress.Hex(), + "teleporter-registry-address": teleporter.TeleporterRegistryAddress(subnetInfo).Hex(), }, }, }, @@ -264,6 +264,7 @@ func FundRelayers( func SendBasicTeleporterMessageAsync( ctx context.Context, + teleporter teleporterTestUtils.TeleporterTestInfo, source interfaces.SubnetTestInfo, destination interfaces.SubnetTestInfo, fundedKey *ecdsa.PrivateKey, @@ -290,6 +291,7 @@ func SendBasicTeleporterMessageAsync( ) _, teleporterMessageID := teleporterTestUtils.SendCrossChainMessageAndWaitForAcceptance( ctx, + teleporter.TeleporterMessenger(source), source, destination, input, @@ -300,6 +302,7 @@ func SendBasicTeleporterMessageAsync( func SendBasicTeleporterMessage( ctx context.Context, + teleporter teleporterTestUtils.TeleporterTestInfo, source interfaces.SubnetTestInfo, destination interfaces.SubnetTestInfo, fundedKey *ecdsa.PrivateKey, @@ -325,6 +328,7 @@ func SendBasicTeleporterMessage( ) receipt, teleporterMessageID := teleporterTestUtils.SendCrossChainMessageAndWaitForAcceptance( ctx, + teleporter.TeleporterMessenger(source), source, destination, input, @@ -332,7 +336,7 @@ func SendBasicTeleporterMessage( ) sendEvent, err := teleporterTestUtils.GetEventFromLogs( receipt.Logs, - source.TeleporterMessenger.ParseSendCrossChainMessage, + teleporter.TeleporterMessenger(source).ParseSendCrossChainMessage, ) Expect(err).Should(BeNil()) @@ -341,9 +345,9 @@ func SendBasicTeleporterMessage( func RelayBasicMessage( ctx context.Context, + teleporter teleporterTestUtils.TeleporterTestInfo, source interfaces.SubnetTestInfo, destination interfaces.SubnetTestInfo, - teleporterContractAddress common.Address, fundedKey *ecdsa.PrivateKey, destinationAddress common.Address, ) { @@ -354,6 +358,7 @@ func RelayBasicMessage( _, _, teleporterMessageID := SendBasicTeleporterMessage( ctx, + teleporter, source, destination, fundedKey, @@ -361,10 +366,43 @@ func RelayBasicMessage( ) log.Info("Waiting for Teleporter message delivery") - err = utils.WaitTeleporterMessageDelivered(ctx, destination.TeleporterMessenger, teleporterMessageID) + err = WaitTeleporterMessageDelivered(ctx, teleporter.TeleporterMessenger(destination), teleporterMessageID) Expect(err).Should(BeNil()) } +// Blocks until the given teleporter message is delivered to the specified TeleporterMessenger +// before the timeout, or if an error occurred. +func WaitTeleporterMessageDelivered( + ctx context.Context, + teleporterMessenger *teleportermessenger.TeleporterMessenger, + teleporterMessageID ids.ID, +) error { + cctx, cancel := context.WithTimeout(ctx, 60*time.Second) + defer cancel() + + queryTicker := time.NewTicker(200 * time.Millisecond) + defer queryTicker.Stop() + for { + delivered, err := teleporterMessenger.MessageReceived( + &bind.CallOpts{}, teleporterMessageID, + ) + if err != nil { + return err + } + + if delivered { + return nil + } + + // Wait for the next round. + select { + case <-cctx.Done(): + return cctx.Err() + case <-queryTicker.C: + } + } +} + func WriteRelayerConfig(relayerConfig relayercfg.Config, fname string) string { data, err := json.MarshalIndent(relayerConfig, "", "\t") Expect(err).Should(BeNil()) @@ -398,6 +436,7 @@ func WriteSignatureAggregatorConfig(signatureAggregatorConfig signatureaggregato func TriggerProcessMissedBlocks( ctx context.Context, + teleporter teleporterTestUtils.TeleporterTestInfo, sourceSubnetInfo interfaces.SubnetTestInfo, destinationSubnetInfo interfaces.SubnetTestInfo, currRelayerCleanup context.CancelFunc, @@ -416,9 +455,9 @@ func TriggerProcessMissedBlocks( // Send three Teleporter messages from subnet A to subnet B log.Info("Sending three Teleporter messages from subnet A to subnet B") - _, _, id1 := SendBasicTeleporterMessage(ctx, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) - _, _, id2 := SendBasicTeleporterMessage(ctx, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) - _, _, id3 := SendBasicTeleporterMessage(ctx, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) + _, _, id1 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) + _, _, id2 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) + _, _, id3 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) currHeight, err := sourceSubnetInfo.RPCClient.BlockNumber(ctx) Expect(err).Should(BeNil()) @@ -442,7 +481,7 @@ func TriggerProcessMissedBlocks( defer relayerCleanup() // Wait for relayer to start up - startupCtx, startupCancel := context.WithTimeout(ctx, 15*time.Second) + startupCtx, startupCancel := context.WithTimeout(ctx, 60*time.Second) defer startupCancel() WaitForChannelClose(startupCtx, readyChan) @@ -450,18 +489,18 @@ func TriggerProcessMissedBlocks( <-newHeads log.Info("Waiting for Teleporter message delivery") - err = utils.WaitTeleporterMessageDelivered(ctx, destinationSubnetInfo.TeleporterMessenger, id3) + err = WaitTeleporterMessageDelivered(ctx, teleporter.TeleporterMessenger(destinationSubnetInfo), id3) Expect(err).Should(BeNil()) - delivered1, err := destinationSubnetInfo.TeleporterMessenger.MessageReceived( + delivered1, err := teleporter.TeleporterMessenger(destinationSubnetInfo).MessageReceived( &bind.CallOpts{}, id1, ) Expect(err).Should(BeNil()) - delivered2, err := destinationSubnetInfo.TeleporterMessenger.MessageReceived( + delivered2, err := teleporter.TeleporterMessenger(destinationSubnetInfo).MessageReceived( &bind.CallOpts{}, id2, ) Expect(err).Should(BeNil()) - delivered3, err := destinationSubnetInfo.TeleporterMessenger.MessageReceived( + delivered3, err := teleporter.TeleporterMessenger(destinationSubnetInfo).MessageReceived( &bind.CallOpts{}, id3, ) Expect(err).Should(BeNil()) @@ -473,6 +512,7 @@ func TriggerProcessMissedBlocks( func DeployBatchCrossChainMessenger( ctx context.Context, senderKey *ecdsa.PrivateKey, + teleporter teleporterTestUtils.TeleporterTestInfo, teleporterManager common.Address, subnet interfaces.SubnetTestInfo, ) (common.Address, *batchcrosschainmessenger.BatchCrossChainMessenger) { @@ -482,7 +522,7 @@ func DeployBatchCrossChainMessenger( address, tx, exampleMessenger, err := batchcrosschainmessenger.DeployBatchCrossChainMessenger( opts, subnet.RPCClient, - subnet.TeleporterRegistryAddress, + teleporter.TeleporterRegistryAddress(subnet), teleporterManager, ) Expect(err).Should(BeNil()) @@ -518,14 +558,14 @@ func runExecutable( go func() { scanner := bufio.NewScanner(cmdStdOutReader) for scanner.Scan() { - log.Info(scanner.Text()) + fmt.Println(scanner.Text()) } cmdOutput <- "Command execution finished" }() go func() { scanner := bufio.NewScanner(cmdStdErrReader) for scanner.Scan() { - log.Error(scanner.Text()) + fmt.Println(scanner.Text()) } cmdOutput <- "Command execution finished" }() diff --git a/tests/warp_api.go b/tests/warp_api.go index 9a374fc2..194ed5c4 100644 --- a/tests/warp_api.go +++ b/tests/warp_api.go @@ -15,6 +15,7 @@ import ( testUtils "github.com/ava-labs/awm-relayer/tests/utils" "github.com/ava-labs/teleporter/tests/interfaces" + "github.com/ava-labs/teleporter/tests/network" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -28,11 +29,10 @@ const rpcSignatureMetricName = "app_fetch_signature_rpc_count" // - Relaying from Subnet A to Subnet B // - Relaying from Subnet B to Subnet A // - Verifying the messages were signed using the Warp API -func WarpAPIRelay(network interfaces.LocalNetwork) { +func WarpAPIRelay(network *network.LocalNetwork, teleporter utils.TeleporterTestInfo) { subnetAInfo := network.GetPrimaryNetworkInfo() - subnetBInfo, _ := utils.GetTwoSubnets(network) + subnetBInfo, _ := network.GetTwoSubnets() fundedAddress, fundedKey := network.GetFundedAccountInfo() - teleporterContractAddress := network.GetTeleporterContractAddress() err := testUtils.ClearRelayerStorage() Expect(err).Should(BeNil()) @@ -50,9 +50,9 @@ func WarpAPIRelay(network interfaces.LocalNetwork) { // Set up relayer config // relayerConfig := testUtils.CreateDefaultRelayerConfig( + teleporter, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, []interfaces.SubnetTestInfo{subnetAInfo, subnetBInfo}, - teleporterContractAddress, fundedAddress, relayerKey, ) @@ -85,9 +85,9 @@ func WarpAPIRelay(network interfaces.LocalNetwork) { log.Info("Sending transaction from Subnet A to Subnet B") testUtils.RelayBasicMessage( ctx, + teleporter, subnetAInfo, subnetBInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) @@ -98,9 +98,9 @@ func WarpAPIRelay(network interfaces.LocalNetwork) { log.Info("Test Relaying from Subnet B to Subnet A") testUtils.RelayBasicMessage( ctx, + teleporter, subnetBInfo, subnetAInfo, - teleporterContractAddress, fundedKey, fundedAddress, ) From 63b71987e84f4498d26366932489154be44f1271 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 16:48:56 -0600 Subject: [PATCH 2/4] bump deps --- go.mod | 8 ++++---- go.sum | 14 ++++++++------ peers/validators/canonical_validator_client.go | 4 +++- signature-aggregator/aggregator/aggregator_test.go | 7 +++++++ tests/contracts/lib/teleporter | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index f25a9646..7f1d45b4 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/ava-labs/awm-relayer go 1.22.8 require ( - github.com/ava-labs/avalanchego v1.12.0-initial-poc.9 - github.com/ava-labs/coreth v0.13.8 - github.com/ava-labs/subnet-evm v0.6.12-rc.0 - github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c + github.com/ava-labs/avalanchego v1.12.0-fuji + github.com/ava-labs/coreth v0.13.9-rc.1 + github.com/ava-labs/subnet-evm v0.6.12 + github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8 github.com/aws/aws-sdk-go-v2 v1.32.4 github.com/aws/aws-sdk-go-v2/config v1.28.3 github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 diff --git a/go.sum b/go.sum index 5e007832..5200b56d 100644 --- a/go.sum +++ b/go.sum @@ -60,14 +60,16 @@ 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 h1:dQhb+KlPoud+AkRV3A0suKCTodlUSzflGcZElESeVKo= github.com/ava-labs/avalanchego v1.12.0-initial-poc.9/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= -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.12-rc.0 h1:I7s4QkUO8bjg+JB/KTwrmDH8Q2mQYVTKF8mFUSDqk+E= -github.com/ava-labs/subnet-evm v0.6.12-rc.0/go.mod h1:Pf122zopW1fELpOsw0PrdX4u6K/4VOWU2p5C3cHsYAs= -github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c h1:DqmojsxggU6Jpv9l6ZsS3eavapjqylAsuXBmj4B2SkU= -github.com/ava-labs/teleporter v1.0.8-0.20241121220053-1bd1eda4cd1c/go.mod h1:kTnq4uBwtXVlTM2ooWBmKbscSwwmMA56AlV8uf+ywt8= +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= +github.com/ava-labs/subnet-evm v0.6.12/go.mod h1:vffwL4UqAh7ibpWjveUuUhamm3a9w75q92bG5vXdX5k= +github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8 h1:jsH1wv1GgeztvipQG3di1OTruSHbFAwwP4K6clzTRLE= +github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8/go.mod h1:Q4/DDZPLI5f96xDykVXPT85PeJS3IqDPDJDk3UdQOuQ= github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= diff --git a/peers/validators/canonical_validator_client.go b/peers/validators/canonical_validator_client.go index 3aed427b..996e3523 100644 --- a/peers/validators/canonical_validator_client.go +++ b/peers/validators/canonical_validator_client.go @@ -15,6 +15,8 @@ import ( "github.com/ava-labs/awm-relayer/config" "github.com/ava-labs/awm-relayer/peers/utils" "go.uber.org/zap" + + pchainapi "github.com/ava-labs/avalanchego/vms/platformvm/api" ) var _ validators.State = &CanonicalValidatorClient{} @@ -89,7 +91,7 @@ func (v *CanonicalValidatorClient) GetValidatorSet( ) (map[ids.NodeID]*validators.GetValidatorOutput, error) { // First, attempt to use the "getValidatorsAt" RPC method. This method may not be available on // all API nodes, in which case we can fall back to using "getCurrentValidators" if needed. - res, err := v.client.GetValidatorsAt(ctx, subnetID, height, v.options...) + res, err := v.client.GetValidatorsAt(ctx, subnetID, pchainapi.Height(height), v.options...) if err != nil { v.logger.Debug( "P-chain RPC to getValidatorAt returned error. Falling back to getCurrentValidators", diff --git a/signature-aggregator/aggregator/aggregator_test.go b/signature-aggregator/aggregator/aggregator_test.go index 03273145..7e6a1b1a 100644 --- a/signature-aggregator/aggregator/aggregator_test.go +++ b/signature-aggregator/aggregator/aggregator_test.go @@ -397,3 +397,10 @@ func (p pChainStateStub) GetValidatorSet( } return output, nil } + +func (v *pChainStateStub) GetCurrentValidatorSet( + context.Context, + ids.ID, +) (map[ids.ID]*validators.GetCurrentValidatorOutput, uint64, error) { + return nil, 0, nil +} diff --git a/tests/contracts/lib/teleporter b/tests/contracts/lib/teleporter index 1bd1eda4..226937a9 160000 --- a/tests/contracts/lib/teleporter +++ b/tests/contracts/lib/teleporter @@ -1 +1 @@ -Subproject commit 1bd1eda4cd1c0da51dcac8930c8e7f463edf586a +Subproject commit 226937a967e8947034f2704de6f168bcf48e2d2b From 031b30fe3ab73590d85fe28951b8ecff3125cb4a Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 17:11:54 -0600 Subject: [PATCH 3/4] lint + build fix --- go.mod | 2 +- go.sum | 30 ++++-------------------------- peers/info_client.go | 5 ----- scripts/e2e_test.sh | 2 +- tests/utils/utils.go | 27 ++++++++++++++++++++++++--- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/go.mod b/go.mod index cd2ce406..120e7419 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ava-labs/coreth v0.13.9-rc.1 github.com/ava-labs/subnet-evm v0.6.12 github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8 - github.com/aws/aws-sdk-go-v2 v1.32.4 + github.com/aws/aws-sdk-go-v2 v1.32.5 github.com/aws/aws-sdk-go-v2/config v1.28.3 github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 github.com/ethereum/go-ethereum v1.13.14 diff --git a/go.sum b/go.sum index 6a9333b3..b86f59b0 100644 --- a/go.sum +++ b/go.sum @@ -62,37 +62,16 @@ 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-fuji h1:o/GbXrqW9CAXu2jX/a1dZtvFiiSVCWomJZyxF4hCQOA= github.com/ava-labs/avalanchego v1.12.0-fuji/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= -<<<<<<< HEAD -github.com/ava-labs/avalanchego v1.12.0-initial-poc.9 h1:dQhb+KlPoud+AkRV3A0suKCTodlUSzflGcZElESeVKo= -github.com/ava-labs/avalanchego v1.12.0-initial-poc.9/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM= -======= ->>>>>>> main 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= github.com/ava-labs/subnet-evm v0.6.12/go.mod h1:vffwL4UqAh7ibpWjveUuUhamm3a9w75q92bG5vXdX5k= -<<<<<<< HEAD github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8 h1:jsH1wv1GgeztvipQG3di1OTruSHbFAwwP4K6clzTRLE= github.com/ava-labs/teleporter v1.0.8-0.20241121223552-226937a967e8/go.mod h1:Q4/DDZPLI5f96xDykVXPT85PeJS3IqDPDJDk3UdQOuQ= -github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= -github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= -github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= -github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44/go.mod h1:0Lm2YJ8etJdEdw23s+q/9wTpOeo2HhNE97XcRa7T8MA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk= -======= -github.com/ava-labs/teleporter v1.0.7 h1:9H0wTWhgWeA4u6uxi9KngdBu/LOoYsfAmIZhXNzuvf8= -github.com/ava-labs/teleporter v1.0.7/go.mod h1:wgCgU6vU5MtP83otpjEin8jL2jrflVBNQCTxVXMx/kU= github.com/aws/aws-sdk-go-v2 v1.32.5 h1:U8vdWJuY7ruAkzaOdD7guwJjD06YSKmnKCJs7s3IkIo= github.com/aws/aws-sdk-go-v2 v1.32.5/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.28.5 h1:Za41twdCXbuyyWv9LndXxZZv3QhTG1DinqlFsSuvtI0= -github.com/aws/aws-sdk-go-v2/config v1.28.5/go.mod h1:4VsPbHP8JdcdUDmbTVgNL/8w9SqOkM5jyY8ljIxLO3o= +github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= +github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= github.com/aws/aws-sdk-go-v2/credentials v1.17.46 h1:AU7RcriIo2lXjUfHFnFKYsLCwgbz1E7Mm95ieIRDNUg= github.com/aws/aws-sdk-go-v2/credentials v1.17.46/go.mod h1:1FmYyLGL08KQXQ6mcTlifyFXfJVCNJTVGuQP4m0d/UA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 h1:sDSXIrlsFSFJtWKLQS4PUWRvrT580rrnuLydJrCQ/yA= @@ -101,15 +80,14 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 h1:4usbeaes3yJnCFC7k github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24/go.mod h1:5CI1JemjVwde8m2WG3cz23qHKPOxbpkq0HaoreEgLIY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 h1:N1zsICrQglfzaBnrfM0Ys00860C+QFwu6u/5+LomP+o= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24/go.mod h1:dCn9HbJ8+K31i8IQ8EWmWj0EiIk0+vKiHNMxTTYveAg= ->>>>>>> main github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwrSbwhECWQoI/g6WM9zqCcSpHDJIWSbMLOu4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= -github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 h1:CZImQdb1QbU9sGgJ9IswhVkxAcjkkD1eQTMA1KHWk+E= -github.com/aws/aws-sdk-go-v2/service/kms v1.37.6/go.mod h1:YJDdlK0zsyxVBxGU48AR/Mi8DMrGdc1E3Yij4fNrONA= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 h1:5dQJ6Q5QrQOqZxXjSbRXukBqU8Pgu6Ro6Qqtyd8yiz4= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.5/go.mod h1:A9vfQcNHVBCE7ZZN6H+UUJpXtbH26Vv6L7Zhk5nIJAY= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= diff --git a/peers/info_client.go b/peers/info_client.go index 417bc9ec..27c49e06 100644 --- a/peers/info_client.go +++ b/peers/info_client.go @@ -68,13 +68,8 @@ func (i *InfoAPI) IsBootstrapped(ctx context.Context, chainID string) (bool, err return i.client.IsBootstrapped(ctx, chainID, i.options...) } -<<<<<<< HEAD -func (i *InfoAPI) Peers(ctx context.Context, nodes []ids.NodeID) ([]info.Peer, error) { - return i.client.Peers(ctx, nodes, i.options...) -======= func (i *InfoAPI) Peers(ctx context.Context, nodeIDs []ids.NodeID) ([]info.Peer, error) { return i.client.Peers(ctx, nodeIDs, i.options...) ->>>>>>> main } func (i *InfoAPI) Uptime(ctx context.Context) (*info.UptimeResponse, error) { diff --git a/scripts/e2e_test.sh b/scripts/e2e_test.sh index a3200814..86bb6fe9 100755 --- a/scripts/e2e_test.sh +++ b/scripts/e2e_test.sh @@ -60,4 +60,4 @@ RUN_E2E=true LOG_LEVEL=${LOG_LEVEL} ./tests/tests.test \ --ginkgo.focus=${GINKGO_FOCUS:-""} echo "e2e tests passed" -exit 0 \ No newline at end of file +exit 0 diff --git a/tests/utils/utils.go b/tests/utils/utils.go index 09d8a255..84cfd42d 100644 --- a/tests/utils/utils.go +++ b/tests/utils/utils.go @@ -455,9 +455,30 @@ func TriggerProcessMissedBlocks( // Send three Teleporter messages from subnet A to subnet B log.Info("Sending three Teleporter messages from subnet A to subnet B") - _, _, id1 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) - _, _, id2 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) - _, _, id3 := SendBasicTeleporterMessage(ctx, teleporter, sourceSubnetInfo, destinationSubnetInfo, fundedKey, fundedAddress) + _, _, id1 := SendBasicTeleporterMessage( + ctx, + teleporter, + sourceSubnetInfo, + destinationSubnetInfo, + fundedKey, + fundedAddress, + ) + _, _, id2 := SendBasicTeleporterMessage( + ctx, + teleporter, + sourceSubnetInfo, + destinationSubnetInfo, + fundedKey, + fundedAddress, + ) + _, _, id3 := SendBasicTeleporterMessage( + ctx, + teleporter, + sourceSubnetInfo, + destinationSubnetInfo, + fundedKey, + fundedAddress, + ) currHeight, err := sourceSubnetInfo.RPCClient.BlockNumber(ctx) Expect(err).Should(BeNil()) From 27116f1cfc3151ef440863a99ff41f32d63a4213 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 21 Nov 2024 17:13:29 -0600 Subject: [PATCH 4/4] fix typo --- scripts/e2e_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/e2e_test.sh b/scripts/e2e_test.sh index 86bb6fe9..a920f8df 100755 --- a/scripts/e2e_test.sh +++ b/scripts/e2e_test.sh @@ -37,7 +37,7 @@ BASEDIR=${BASEDIR:-"$HOME/.teleporter-deps"} cwd=$(pwd) # Install the avalanchego and subnet-evm binaries rm -rf $BASEDIR/avalanchego -BASEDIR=$BASEDIR AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego ./scripts/install_avalanchego_release.sh" +BASEDIR=$BASEDIR AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego ./scripts/install_avalanchego_release.sh BASEDIR=$BASEDIR "${TELEPORTER_PATH}/scripts/install_subnetevm_release.sh" cp ${BASEDIR}/subnet-evm/subnet-evm ${BASEDIR}/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy