diff --git a/examples/morpheusvm/go.mod b/examples/morpheusvm/go.mod index 4ace01f578..47dfd92c7b 100644 --- a/examples/morpheusvm/go.mod +++ b/examples/morpheusvm/go.mod @@ -3,12 +3,12 @@ module github.com/ava-labs/hypersdk/examples/morpheusvm go 1.22.8 require ( - github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0 + github.com/ava-labs/avalanchego v1.11.13-0.20241127075308-7752928cccc0 github.com/ava-labs/hypersdk v0.0.1 github.com/fatih/color v1.13.0 github.com/onsi/ginkgo/v2 v2.13.1 github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20231127185646-65229373498e ) @@ -23,7 +23,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -40,6 +40,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // 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/ethereum/go-ethereum v1.13.14 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -49,12 +50,17 @@ require ( github.com/go-logr/logr v1.4.1 // 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 v0.0.0-20230315185526-52ccab3ef572 // 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/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -74,10 +80,13 @@ require ( github.com/inconshreveable/mousetrap v1.1.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.15.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect @@ -86,7 +95,12 @@ require ( 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/openzipkin/zipkin-go v0.4.1 // indirect @@ -112,7 +126,7 @@ require ( github.com/spf13/viper v1.12.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.3.0 // 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 @@ -133,24 +147,35 @@ require ( go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/grpc v1.66.0 // indirect google.golang.org/protobuf v1.34.2 // 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 ) replace github.com/ava-labs/hypersdk => ../../ diff --git a/examples/morpheusvm/go.sum b/examples/morpheusvm/go.sum index 97959a82ad..573c8fab20 100644 --- a/examples/morpheusvm/go.sum +++ b/examples/morpheusvm/go.sum @@ -58,8 +58,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0 h1:r/vgyq3kfRwHbaBbVRZUcS5WZPHdpWODvZNLvw5udKc= -github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0/go.mod h1:yFlG98ykZzMHSXazQzbpfTw1D0pt/p/WEjvuZ045W1I= +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.11.13-0.20241127075308-7752928cccc0 h1:90XHAAev0dyiCiIJA/d+nIABbdRJETre8rsXbi3WS1g= +github.com/ava-labs/avalanchego v1.11.13-0.20241127075308-7752928cccc0/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/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -96,8 +98,9 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -168,6 +171,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= @@ -209,6 +214,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.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -217,6 +223,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= @@ -233,8 +245,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -271,6 +283,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= @@ -281,10 +295,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= @@ -318,6 +335,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= @@ -363,9 +381,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= @@ -402,6 +424,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.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -436,13 +460,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= @@ -551,6 +584,7 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -560,12 +594,13 @@ 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= -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= @@ -654,8 +689,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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= @@ -738,8 +773,8 @@ golang.org/x/net v0.0.0-20211008194852-3b03d305991f/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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= 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= @@ -749,6 +784,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.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.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= @@ -761,8 +798,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.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.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-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -831,12 +868,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.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.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.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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= @@ -847,8 +884,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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -910,8 +947,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.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -983,12 +1020,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 v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +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/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= @@ -1007,8 +1042,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.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= 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= @@ -1032,6 +1067,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= @@ -1043,6 +1080,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= @@ -1058,8 +1096,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/go.mod b/go.mod index 950fba46a0..24b8c0d9f5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/ava-labs/hypersdk go 1.22.8 require ( - github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0 + github.com/ava-labs/avalanchego v1.11.13-0.20241127075308-7752928cccc0 github.com/bytecodealliance/wasmtime-go/v25 v25.0.0 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 github.com/gorilla/rpc v1.2.0 @@ -18,18 +18,18 @@ require ( github.com/prometheus/client_golang v1.16.0 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.12.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel v1.22.0 go.opentelemetry.io/otel/exporters/zipkin v1.11.2 go.opentelemetry.io/otel/sdk v1.22.0 go.opentelemetry.io/otel/trace v1.22.0 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.22.0 + golang.org/x/crypto v0.26.0 golang.org/x/exp v0.0.0-20231127185646-65229373498e - golang.org/x/sync v0.7.0 - golang.org/x/text v0.14.0 - google.golang.org/grpc v1.62.0 + golang.org/x/sync v0.8.0 + golang.org/x/text v0.17.0 + google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 ) @@ -45,7 +45,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -61,6 +61,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // 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/ethereum/go-ethereum v1.13.14 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -70,12 +71,17 @@ require ( github.com/go-logr/logr v1.4.1 // 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 v0.0.0-20230315185526-52ccab3ef572 // 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/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -92,10 +98,13 @@ require ( github.com/inconshreveable/mousetrap v1.0.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.15.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // 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 @@ -103,7 +112,12 @@ require ( 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/openzipkin/zipkin-go v0.4.1 // indirect @@ -126,7 +140,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.3.0 // 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/thepudds/fzgen v0.4.3 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -142,16 +156,27 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // 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.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 ) diff --git a/go.sum b/go.sum index 86546f72bb..a53fa68c9b 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0 h1:r/vgyq3kfRwHbaBbVRZUcS5WZPHdpWODvZNLvw5udKc= -github.com/ava-labs/avalanchego v1.11.12-rc.2.0.20241001202925-f03745d187d0/go.mod h1:yFlG98ykZzMHSXazQzbpfTw1D0pt/p/WEjvuZ045W1I= +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.11.13-0.20241127075308-7752928cccc0 h1:90XHAAev0dyiCiIJA/d+nIABbdRJETre8rsXbi3WS1g= +github.com/ava-labs/avalanchego v1.11.13-0.20241127075308-7752928cccc0/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/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -98,8 +100,9 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -170,6 +173,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= @@ -209,6 +214,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.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -217,6 +223,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= @@ -233,8 +245,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -271,6 +283,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= @@ -281,10 +295,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= @@ -318,6 +335,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= @@ -362,9 +380,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= @@ -401,6 +423,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.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -434,13 +458,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= @@ -551,6 +584,7 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -560,12 +594,13 @@ 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.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= -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= @@ -654,8 +689,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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= @@ -738,8 +773,8 @@ golang.org/x/net v0.0.0-20211008194852-3b03d305991f/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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= 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= @@ -749,6 +784,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.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.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= @@ -761,8 +798,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.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.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-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -831,12 +868,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.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.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.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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= @@ -847,8 +884,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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -910,8 +947,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.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -983,12 +1020,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 v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +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/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= @@ -1007,8 +1042,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.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= 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= @@ -1032,6 +1067,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= @@ -1043,6 +1080,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= @@ -1058,8 +1096,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/proto/dsmr/dsmr.proto b/proto/dsmr/dsmr.proto index 9617a136b0..f10c58c108 100644 --- a/proto/dsmr/dsmr.proto +++ b/proto/dsmr/dsmr.proto @@ -16,14 +16,6 @@ message GetChunkResponse { bytes chunk = 1; } -message GetChunkSignatureRequest { - bytes chunk = 1; -} - -message GetChunkSignatureResponse { - bytes signature = 1; -} - message ChunkCertificateGossip { bytes chunk_certificate = 1; } diff --git a/proto/pb/dsmr/dsmr.pb.go b/proto/pb/dsmr/dsmr.pb.go index 2e1b4e4492..4c19e2124a 100644 --- a/proto/pb/dsmr/dsmr.pb.go +++ b/proto/pb/dsmr/dsmr.pb.go @@ -125,100 +125,6 @@ func (x *GetChunkResponse) GetChunk() []byte { return nil } -type GetChunkSignatureRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *GetChunkSignatureRequest) Reset() { - *x = GetChunkSignatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_dsmr_dsmr_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChunkSignatureRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChunkSignatureRequest) ProtoMessage() {} - -func (x *GetChunkSignatureRequest) ProtoReflect() protoreflect.Message { - mi := &file_dsmr_dsmr_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChunkSignatureRequest.ProtoReflect.Descriptor instead. -func (*GetChunkSignatureRequest) Descriptor() ([]byte, []int) { - return file_dsmr_dsmr_proto_rawDescGZIP(), []int{2} -} - -func (x *GetChunkSignatureRequest) GetChunk() []byte { - if x != nil { - return x.Chunk - } - return nil -} - -type GetChunkSignatureResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *GetChunkSignatureResponse) Reset() { - *x = GetChunkSignatureResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dsmr_dsmr_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetChunkSignatureResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetChunkSignatureResponse) ProtoMessage() {} - -func (x *GetChunkSignatureResponse) ProtoReflect() protoreflect.Message { - mi := &file_dsmr_dsmr_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetChunkSignatureResponse.ProtoReflect.Descriptor instead. -func (*GetChunkSignatureResponse) Descriptor() ([]byte, []int) { - return file_dsmr_dsmr_proto_rawDescGZIP(), []int{3} -} - -func (x *GetChunkSignatureResponse) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - type ChunkCertificateGossip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -230,7 +136,7 @@ type ChunkCertificateGossip struct { func (x *ChunkCertificateGossip) Reset() { *x = ChunkCertificateGossip{} if protoimpl.UnsafeEnabled { - mi := &file_dsmr_dsmr_proto_msgTypes[4] + mi := &file_dsmr_dsmr_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -243,7 +149,7 @@ func (x *ChunkCertificateGossip) String() string { func (*ChunkCertificateGossip) ProtoMessage() {} func (x *ChunkCertificateGossip) ProtoReflect() protoreflect.Message { - mi := &file_dsmr_dsmr_proto_msgTypes[4] + mi := &file_dsmr_dsmr_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -256,7 +162,7 @@ func (x *ChunkCertificateGossip) ProtoReflect() protoreflect.Message { // Deprecated: Use ChunkCertificateGossip.ProtoReflect.Descriptor instead. func (*ChunkCertificateGossip) Descriptor() ([]byte, []int) { - return file_dsmr_dsmr_proto_rawDescGZIP(), []int{4} + return file_dsmr_dsmr_proto_rawDescGZIP(), []int{2} } func (x *ChunkCertificateGossip) GetChunkCertificate() []byte { @@ -277,22 +183,15 @@ var file_dsmr_dsmr_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x28, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x39, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x22, 0x45, 0x0a, 0x16, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x2b, - 0x0a, 0x11, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x68, 0x79, 0x70, 0x65, 0x72, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x64, 0x73, 0x6d, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x45, 0x0a, 0x16, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x73, 0x73, 0x69, + 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x2c, + 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, + 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x68, 0x79, 0x70, 0x65, 0x72, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x64, 0x73, 0x6d, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -307,13 +206,11 @@ func file_dsmr_dsmr_proto_rawDescGZIP() []byte { return file_dsmr_dsmr_proto_rawDescData } -var file_dsmr_dsmr_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_dsmr_dsmr_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_dsmr_dsmr_proto_goTypes = []interface{}{ - (*GetChunkRequest)(nil), // 0: dsmr.GetChunkRequest - (*GetChunkResponse)(nil), // 1: dsmr.GetChunkResponse - (*GetChunkSignatureRequest)(nil), // 2: dsmr.GetChunkSignatureRequest - (*GetChunkSignatureResponse)(nil), // 3: dsmr.GetChunkSignatureResponse - (*ChunkCertificateGossip)(nil), // 4: dsmr.ChunkCertificateGossip + (*GetChunkRequest)(nil), // 0: dsmr.GetChunkRequest + (*GetChunkResponse)(nil), // 1: dsmr.GetChunkResponse + (*ChunkCertificateGossip)(nil), // 2: dsmr.ChunkCertificateGossip } var file_dsmr_dsmr_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -354,30 +251,6 @@ func file_dsmr_dsmr_proto_init() { } } file_dsmr_dsmr_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunkSignatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dsmr_dsmr_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChunkSignatureResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dsmr_dsmr_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChunkCertificateGossip); i { case 0: return &v.state @@ -396,7 +269,7 @@ func file_dsmr_dsmr_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dsmr_dsmr_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/x/dsmr/certificate.go b/x/dsmr/certificate.go index 6f931fe142..044f81bc6a 100644 --- a/x/dsmr/certificate.go +++ b/x/dsmr/certificate.go @@ -12,8 +12,10 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/validators" "github.com/ava-labs/avalanchego/utils/units" + "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/avalanchego/vms/platformvm/warp" - "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload" + + "github.com/ava-labs/hypersdk/codec" acodec "github.com/ava-labs/avalanchego/codec" ) @@ -31,7 +33,6 @@ func init() { lc := linearcodec.NewDefault() err := errors.Join( - lc.RegisterType(&WarpChunkCertificate{}), Codec.RegisterCodec(CodecVersion, lc), ) if err != nil { @@ -39,19 +40,15 @@ func init() { } } -type NoVerifyChunkSignatureShare struct{} - -func (NoVerifyChunkSignatureShare) Verify(_ ids.ID) error { return nil } - -type NoVerifyChunkSignature struct{} - -func (NoVerifyChunkSignature) Verify() error { return nil } +type ChunkReference struct { + ChunkID ids.ID `serialize:"true"` + Producer ids.NodeID `serialize:"true"` + Expiry int64 `serialize:"true"` +} type ChunkCertificate struct { - ChunkID ids.ID `serialize:"true"` - Expiry int64 `serialize:"true"` - - Signature NoVerifyChunkSignature `serialize:"true"` + ChunkReference `serialize:"true"` + Signature *warp.BitSetSignature `serialize:"true"` } func (c *ChunkCertificate) GetChunkID() ids.ID { return c.ChunkID } @@ -66,174 +63,36 @@ func (c *ChunkCertificate) Bytes() []byte { return bytes } -func (c *ChunkCertificate) Verify(_ context.Context, _ interface{}) error { - return c.Signature.Verify() -} - -type WarpChunkPayload struct { - ChunkID ids.ID `serialize:"true"` - Slot int64 `serialize:"true"` - - bytes []byte -} - -func NewWarpChunkPayload(chunkID ids.ID, slot int64) (*WarpChunkPayload, error) { - payload := &WarpChunkPayload{ - ChunkID: chunkID, - Slot: slot, - } - - bytes, err := Codec.Marshal(CodecVersion, payload) - if err != nil { - return nil, err - } - payload.bytes = bytes - return payload, nil -} - -func ParseWarpChunkPayload(b []byte) (*WarpChunkPayload, error) { - warpChunkPayload := &WarpChunkPayload{bytes: b} - if _, err := Codec.Unmarshal(warpChunkPayload.bytes, warpChunkPayload); err != nil { - return nil, err - } - return warpChunkPayload, nil -} - -func (p *WarpChunkPayload) Bytes() []byte { return p.bytes } - -type UnsignedWarpChunkCertificate struct { - UnsignedMessage *warp.UnsignedMessage - AddressedCall *payload.AddressedCall - Payload *WarpChunkPayload -} - -func NewUnsignedWarpChunkCertificate( +func (c *ChunkCertificate) Verify( + ctx context.Context, networkID uint32, - sourceChainID ids.ID, - chunkID ids.ID, - slot int64, -) (*UnsignedWarpChunkCertificate, error) { - warpChunkPayload, err := NewWarpChunkPayload(chunkID, slot) - if err != nil { - return nil, err - } - - addressedCall, err := payload.NewAddressedCall([]byte{}, warpChunkPayload.Bytes()) - if err != nil { - return nil, err - } - unsignedMessage, err := warp.NewUnsignedMessage( - networkID, - sourceChainID, - addressedCall.Bytes(), - ) - if err != nil { - return nil, err - } - return &UnsignedWarpChunkCertificate{ - UnsignedMessage: unsignedMessage, - AddressedCall: addressedCall, - Payload: warpChunkPayload, - }, nil -} - -func ParseUnsignedWarpChunkCertificate(b []byte) (*UnsignedWarpChunkCertificate, error) { - unsignedMessage, err := warp.ParseUnsignedMessage(b) - if err != nil { - return nil, err - } - - addressedCall, err := payload.ParseAddressedCall(unsignedMessage.Payload) - if err != nil { - return nil, err - } - if len(addressedCall.SourceAddress) != 0 { - return nil, fmt.Errorf("failed to parse system source address: %x", addressedCall.SourceAddress) - } - - warpChunkPayload, err := ParseWarpChunkPayload(addressedCall.Payload) - if err != nil { - return nil, err - } - - return &UnsignedWarpChunkCertificate{ - UnsignedMessage: unsignedMessage, - AddressedCall: addressedCall, - Payload: warpChunkPayload, - }, nil -} - -func (c *UnsignedWarpChunkCertificate) ChunkID() ids.ID { - return c.Payload.ChunkID -} - -func (c *UnsignedWarpChunkCertificate) Slot() int64 { - return c.Payload.Slot -} - -func (c *UnsignedWarpChunkCertificate) Bytes() []byte { return c.UnsignedMessage.Bytes() } - -type WarpChunkCertificate struct { - UnsignedCertificate *UnsignedWarpChunkCertificate - Message *warp.Message -} - -func NewWarpChunkCertificate( - unsignedCertificate *UnsignedWarpChunkCertificate, - signature warp.Signature, -) (*WarpChunkCertificate, error) { - msg, err := warp.NewMessage(unsignedCertificate.UnsignedMessage, signature) - if err != nil { - return nil, err + chainID ids.ID, + pChainState validators.State, + pChainHeight uint64, + quorumNum uint64, + quorumDen uint64, +) error { + packer := wrappers.Packer{MaxSize: MaxMessageSize} + if err := codec.LinearCodec.MarshalInto(c.ChunkReference, &packer); err != nil { + return fmt.Errorf("failed to marshal chunk reference: %w", err) } - return &WarpChunkCertificate{ - UnsignedCertificate: unsignedCertificate, - Message: msg, - }, nil -} -func ParseWarpChunkCertificate(b []byte) (*WarpChunkCertificate, error) { - msg, err := warp.ParseMessage(b) + msg, err := warp.NewUnsignedMessage(networkID, chainID, packer.Bytes) if err != nil { - return nil, err + return fmt.Errorf("failed to initialize unsigned warp message: %w", err) } - cert, err := ParseUnsignedWarpChunkCertificate(msg.UnsignedMessage.Bytes()) - if err != nil { - return nil, err + if err := c.Signature.Verify( + ctx, + msg, + networkID, + pChainState, + pChainHeight, + quorumNum, + quorumDen, + ); err != nil { + return fmt.Errorf("failed verification: %w", err) } - return &WarpChunkCertificate{ - UnsignedCertificate: cert, - Message: msg, - }, nil -} - -func (c *WarpChunkCertificate) GetChunkID() ids.ID { return c.UnsignedCertificate.ChunkID() } - -func (c *WarpChunkCertificate) GetSlot() int64 { return c.UnsignedCertificate.Slot() } - -func (c *WarpChunkCertificate) Bytes() []byte { return c.Message.Bytes() } - -type WarpChunkVerificationContext struct { - NetworkID uint32 - PChainState validators.State - PChainHeight uint64 - QuorumNum uint64 - QuorumDen uint64 -} - -func (c *WarpChunkCertificate) Verify( - ctx context.Context, - verificationContext WarpChunkVerificationContext, -) error { - return c.Message.Signature.Verify( - ctx, - c.UnsignedCertificate.UnsignedMessage, - verificationContext.NetworkID, - verificationContext.PChainState, - verificationContext.PChainHeight, - verificationContext.QuorumNum, - verificationContext.QuorumDen, - ) + return nil } diff --git a/x/dsmr/certificate_test.go b/x/dsmr/certificate_test.go deleted file mode 100644 index ad31837e00..0000000000 --- a/x/dsmr/certificate_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package dsmr - -import ( - "encoding/hex" - "testing" - - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils/set" - "github.com/ava-labs/avalanchego/vms/platformvm/warp" - "github.com/stretchr/testify/require" -) - -const ( - expectedUnsignedWarpCertificateHex = "00000001869f3d0ad12b8ee8928edf248ca91ca55600fb383f07c32bff1d6dec472b25cf59a700000038000000000001000000000000002a0000e902a9a86640bfdb1cd0e36c0cc982b83e5765fad5f6bbe6abdcce7b5ae7d7c70000000000000049" - expectedSignedWarpCertHex = "00000001869f3d0ad12b8ee8928edf248ca91ca55600fb383f07c32bff1d6dec472b25cf59a700000038000000000001000000000000002a0000e902a9a86640bfdb1cd0e36c0cc982b83e5765fad5f6bbe6abdcce7b5ae7d7c700000000000000490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -) - -func TestUnsignedWarpCertificate(t *testing.T) { - require := require.New(t) - var ( - networkID = uint32(99999) - chainID = ids.FromStringOrPanic("TtF4d2QWbk5vzQGTEPrN48x6vwgAoAmKQ9cbp79inpQmcRKES") - chunkID = ids.FromStringOrPanic("2mcwQKiD8VEspmMJpL1dc7okQQ5dDVAWeCBZ7FWBFAbxpv3t7w") - slot = int64(73) - ) - - chunkCert, err := NewUnsignedWarpChunkCertificate(networkID, chainID, chunkID, slot) - require.NoError(err) - require.Equal(networkID, chunkCert.UnsignedMessage.NetworkID) - require.Equal(chainID, chunkCert.UnsignedMessage.SourceChainID) - require.Equal(chunkID, chunkCert.Payload.ChunkID) - require.Equal(slot, chunkCert.Payload.Slot) - - chunkCertBytes := chunkCert.Bytes() - require.Equal(expectedUnsignedWarpCertificateHex, hex.EncodeToString(chunkCertBytes)) - parsedChunkCert, err := ParseUnsignedWarpChunkCertificate(chunkCertBytes) - require.NoError(err) - require.Equal(networkID, parsedChunkCert.UnsignedMessage.NetworkID) - require.Equal(chainID, parsedChunkCert.UnsignedMessage.SourceChainID) - require.Equal(chunkID, parsedChunkCert.Payload.ChunkID) - require.Equal(slot, parsedChunkCert.Payload.Slot) -} - -func TestWarpCertificate(t *testing.T) { - require := require.New(t) - var ( - networkID = uint32(99999) - chainID = ids.FromStringOrPanic("TtF4d2QWbk5vzQGTEPrN48x6vwgAoAmKQ9cbp79inpQmcRKES") - chunkID = ids.FromStringOrPanic("2mcwQKiD8VEspmMJpL1dc7okQQ5dDVAWeCBZ7FWBFAbxpv3t7w") - slot = int64(73) - ) - - chunkCert, err := NewUnsignedWarpChunkCertificate(networkID, chainID, chunkID, slot) - require.NoError(err) - - signers := set.NewBits().Bytes() - signature := &warp.BitSetSignature{ - Signers: signers, - } - expectedNumSigners, err := signature.NumSigners() - require.NoError(err) - signedChunkCert, err := NewWarpChunkCertificate(chunkCert, signature) - require.NoError(err) - - signedChunkCertBytes := signedChunkCert.Bytes() - require.Equal(expectedSignedWarpCertHex, hex.EncodeToString(signedChunkCertBytes)) - require.Equal(networkID, signedChunkCert.UnsignedCertificate.UnsignedMessage.NetworkID) - require.Equal(chainID, signedChunkCert.UnsignedCertificate.UnsignedMessage.SourceChainID) - require.Equal(chunkID, signedChunkCert.UnsignedCertificate.Payload.ChunkID) - require.Equal(slot, signedChunkCert.UnsignedCertificate.Payload.Slot) - numSigners, err := signedChunkCert.Message.Signature.NumSigners() - require.NoError(err) - require.Equal(expectedNumSigners, numSigners) - - parsedSignedChunkCert, err := ParseWarpChunkCertificate(signedChunkCertBytes) - require.NoError(err) - require.Equal(networkID, parsedSignedChunkCert.UnsignedCertificate.UnsignedMessage.NetworkID) - require.Equal(chainID, parsedSignedChunkCert.UnsignedCertificate.UnsignedMessage.SourceChainID) - require.Equal(chunkID, parsedSignedChunkCert.UnsignedCertificate.Payload.ChunkID) - require.Equal(slot, parsedSignedChunkCert.UnsignedCertificate.Payload.Slot) - require.Equal(parsedSignedChunkCert.Message.Signature, signature) -} diff --git a/x/dsmr/node.go b/x/dsmr/node.go index 9151b7d8a2..59e5a0193b 100644 --- a/x/dsmr/node.go +++ b/x/dsmr/node.go @@ -8,13 +8,14 @@ import ( "errors" "fmt" "math/rand" + "time" "github.com/ava-labs/avalanchego/database" - "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/acp118" "github.com/ava-labs/avalanchego/utils/crypto/bls" + "github.com/ava-labs/avalanchego/utils/logging" "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/avalanchego/vms/platformvm/warp" @@ -22,82 +23,92 @@ import ( "github.com/ava-labs/hypersdk/consts" "github.com/ava-labs/hypersdk/proto/pb/dsmr" "github.com/ava-labs/hypersdk/utils" + + snowValidators "github.com/ava-labs/avalanchego/snow/validators" +) + +const ( + maxTimeSkew = 30 * time.Second ) var ( + _ snowValidators.State = (*pChain)(nil) + ErrEmptyChunk = errors.New("empty chunk") ErrNoAvailableChunkCerts = errors.New("no available chunk certs") ErrTimestampNotMonotonicallyIncreasing = errors.New("block timestamp must be greater than parent timestamp") + ErrEmptyBlock = errors.New("block must reference chunks") + ErrInvalidBlockParent = errors.New("invalid referenced block parent") + ErrInvalidBlockHeight = errors.New("invalid block height") + ErrInvalidBlockTimestamp = errors.New("invalid block timestamp") + ErrInvalidWarpSignature = errors.New("invalid warp signature") + ErrInvalidSignatureType = errors.New("invalid signature type") + ErrFailedToReplicate = errors.New("failed to replicate to sufficient stake") ) type Validator struct { - NodeID ids.NodeID - Weight uint64 + NodeID ids.NodeID + Weight uint64 + PublicKey *bls.PublicKey } func New[T Tx]( + log logging.Logger, nodeID ids.NodeID, networkID uint32, chainID ids.ID, pk *bls.PublicKey, signer warp.Signer, - chunkVerifier Verifier[T], + chunkStorage *ChunkStorage[T], + getChunkHandler p2p.Handler, + getChunkSignatureHandler p2p.Handler, + chunkCertificateGossipHandler p2p.Handler, getChunkClient *p2p.Client, getChunkSignatureClient *p2p.Client, chunkCertificateGossipClient *p2p.Client, - validators []Validator, + validators []Validator, // TODO remove hard-coded validator set + lastAccepted Block, + quorumNum uint64, + quorumDen uint64, ) (*Node[T], error) { - storage, err := newChunkStorage[T](NoVerifier[T]{}, memdb.New()) - if err != nil { - return nil, err - } - return &Node[T]{ - nodeID: nodeID, - networkID: networkID, - chainID: chainID, - pk: pk, - signer: signer, - getChunkClient: NewGetChunkClient[T](getChunkClient), - getChunkSignatureClient: NewGetChunkSignatureClient( - networkID, - chainID, - getChunkSignatureClient, - ), - chunkCertificateGossipClient: NewChunkCertificateGossipClient(chunkCertificateGossipClient), - validators: validators, - GetChunkHandler: &GetChunkHandler[T]{ - storage: storage, - }, - GetChunkSignatureHandler: acp118.NewHandler( - ChunkSignatureRequestVerifier[T]{ - verifier: chunkVerifier, - storage: storage, - }, - signer, - ), - ChunkCertificateGossipHandler: &ChunkCertificateGossipHandler[T]{ - storage: storage, - }, - storage: storage, + ID: nodeID, + LastAccepted: lastAccepted, + networkID: networkID, + chainID: chainID, + PublicKey: pk, + Signer: signer, + getChunkClient: NewGetChunkClient[T](getChunkClient), + chunkCertificateGossipClient: NewChunkCertificateGossipClient(chunkCertificateGossipClient), + validators: validators, + quorumNum: quorumNum, + quorumDen: quorumDen, + chunkSignatureAggregator: acp118.NewSignatureAggregator(log, getChunkSignatureClient), + GetChunkHandler: getChunkHandler, + GetChunkSignatureHandler: getChunkSignatureHandler, + ChunkCertificateGossipHandler: chunkCertificateGossipHandler, + storage: chunkStorage, }, nil } type Node[T Tx] struct { - nodeID ids.NodeID + ID ids.NodeID + PublicKey *bls.PublicKey + Signer warp.Signer + LastAccepted Block networkID uint32 chainID ids.ID - pk *bls.PublicKey - signer warp.Signer getChunkClient *TypedClient[*dsmr.GetChunkRequest, Chunk[T], []byte] - getChunkSignatureClient *TypedClient[*dsmr.GetChunkSignatureRequest, *dsmr.GetChunkSignatureResponse, []byte] chunkCertificateGossipClient *TypedClient[[]byte, []byte, *dsmr.ChunkCertificateGossip] validators []Validator - - GetChunkHandler *GetChunkHandler[T] - GetChunkSignatureHandler *acp118.Handler - ChunkCertificateGossipHandler *ChunkCertificateGossipHandler[T] - storage *chunkStorage[T] + quorumNum uint64 + quorumDen uint64 + chunkSignatureAggregator *acp118.SignatureAggregator + + GetChunkHandler p2p.Handler + GetChunkSignatureHandler p2p.Handler + ChunkCertificateGossipHandler p2p.Handler + storage *ChunkStorage[T] } // BuildChunk builds transactions into a Chunk @@ -107,69 +118,103 @@ func (n *Node[T]) BuildChunk( txs []T, expiry int64, beneficiary codec.Address, -) (Chunk[T], error) { +) (Chunk[T], ChunkCertificate, error) { if len(txs) == 0 { - return Chunk[T]{}, ErrEmptyChunk + return Chunk[T]{}, ChunkCertificate{}, ErrEmptyChunk } chunk, err := signChunk[T]( UnsignedChunk[T]{ - Producer: n.nodeID, + Producer: n.ID, Beneficiary: beneficiary, Expiry: expiry, Txs: txs, }, n.networkID, n.chainID, - n.pk, - n.signer, + n.PublicKey, + n.Signer, ) if err != nil { - return Chunk[T]{}, fmt.Errorf("failed to sign chunk: %w", err) + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to sign chunk: %w", err) } packer := wrappers.Packer{MaxSize: MaxMessageSize} - if err := codec.LinearCodec.MarshalInto(chunk, &packer); err != nil { - return Chunk[T]{}, err + if err := codec.LinearCodec.MarshalInto(ChunkReference{ + ChunkID: chunk.id, + Producer: chunk.Producer, + Expiry: chunk.Expiry, + }, &packer); err != nil { + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to marshal chunk reference: %w", err) + } + + unsignedMsg, err := warp.NewUnsignedMessage(n.networkID, n.chainID, packer.Bytes) + if err != nil { + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to initialize unsigned warp message: %w", err) + } + msg, err := warp.NewMessage( + unsignedMsg, + &warp.BitSetSignature{ + Signature: [bls.SignatureLen]byte{}, + }, + ) + if err != nil { + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to initialize warp message: %w", err) } - request := &dsmr.GetChunkSignatureRequest{ - Chunk: packer.Bytes, + canonicalValidators, _, err := warp.GetCanonicalValidatorSet( + ctx, + pChain{validators: n.validators}, + 0, + ids.Empty, + ) + if err != nil { + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to get canonical validator set: %w", err) } - for _, validator := range n.validators { - done := make(chan struct{}) - onResponse := func(context.Context, ids.NodeID, *dsmr.GetChunkSignatureResponse, error) { - defer close(done) - // TODO generate chunk cert - } + aggregatedMsg, _, _, ok, err := n.chunkSignatureAggregator.AggregateSignatures( + ctx, + msg, + chunk.bytes, + canonicalValidators, + n.quorumNum, + n.quorumDen, + ) + if err != nil { + return Chunk[T]{}, ChunkCertificate{}, fmt.Errorf("failed to aggregate signatures: %w", err) + } - if err := n.getChunkSignatureClient.AppRequest(ctx, validator.NodeID, request, onResponse); err != nil { - return Chunk[T]{}, err - } + if !ok { + return Chunk[T]{}, ChunkCertificate{}, ErrFailedToReplicate + } - <-done + bitSetSignature, ok := aggregatedMsg.Signature.(*warp.BitSetSignature) + if !ok { + return Chunk[T]{}, ChunkCertificate{}, ErrInvalidSignatureType } chunkCert := ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: chunk.id, + Producer: chunk.Producer, + Expiry: chunk.Expiry, + }, + Signature: bitSetSignature, } packer = wrappers.Packer{MaxSize: MaxMessageSize} if err := codec.LinearCodec.MarshalInto(&chunkCert, &packer); err != nil { - return Chunk[T]{}, err + return Chunk[T]{}, ChunkCertificate{}, err } if err := n.chunkCertificateGossipClient.AppGossip( ctx, &dsmr.ChunkCertificateGossip{ChunkCertificate: packer.Bytes}, ); err != nil { - return Chunk[T]{}, err + return Chunk[T]{}, ChunkCertificate{}, err } - return chunk, n.storage.AddLocalChunkWithCert(chunk, &chunkCert) + return chunk, chunkCert, n.storage.AddLocalChunkWithCert(chunk, &chunkCert) } func (n *Node[T]) BuildBlock(parent Block, timestamp int64) (Block, error) { @@ -208,13 +253,45 @@ func (n *Node[T]) BuildBlock(parent Block, timestamp int64) (Block, error) { return blk, nil } -func (*Node[T]) Execute(ctx context.Context, _ Block, block Block) error { - // TODO: Verify header fields - // TODO: de-duplicate chunk certificates (internal to block and across history) +func (n *Node[T]) Verify(ctx context.Context, parent Block, block Block) error { + if block.ParentID != parent.GetID() { + return fmt.Errorf( + "%w %s: expected %s", + ErrInvalidBlockParent, + block.ParentID, + parent.GetID(), + ) + } + + if block.Height != parent.Height+1 { + return fmt.Errorf( + "%w %d: expected %d", + ErrInvalidBlockHeight, + block.Height, + parent.Height+1, + ) + } + + if block.Timestamp <= parent.Timestamp || + block.Timestamp > parent.Timestamp+maxTimeSkew.Nanoseconds() { + return fmt.Errorf("%w %d: parent - %d", ErrInvalidBlockTimestamp, block.Timestamp, parent.Timestamp) + } + + if len(block.ChunkCerts) == 0 { + return fmt.Errorf("%w: %s", ErrEmptyBlock, block.GetID()) + } + for _, chunkCert := range block.ChunkCerts { - // TODO: verify chunks within a provided context - if err := chunkCert.Verify(ctx, struct{}{}); err != nil { - return err + if err := chunkCert.Verify( + ctx, + n.networkID, + n.chainID, + pChain{validators: n.validators}, + 0, + n.quorumNum, + n.quorumDen, + ); err != nil { + return fmt.Errorf("%w %s: %w", ErrInvalidWarpSignature, chunkCert.ChunkID, err) } } @@ -264,5 +341,39 @@ func (n *Node[T]) Accept(ctx context.Context, block Block) error { } } - return n.storage.SetMin(block.Timestamp, chunkIDs) + if err := n.storage.SetMin(block.Timestamp, chunkIDs); err != nil { + return fmt.Errorf("failed to prune chunks: %w", err) + } + + n.LastAccepted = block + return nil +} + +type pChain struct { + validators []Validator +} + +func (pChain) GetMinimumHeight(context.Context) (uint64, error) { + return 0, nil +} + +func (pChain) GetCurrentHeight(context.Context) (uint64, error) { + return 0, nil +} + +func (pChain) GetSubnetID(context.Context, ids.ID) (ids.ID, error) { + return ids.Empty, nil +} + +func (p pChain) GetValidatorSet(context.Context, uint64, ids.ID) (map[ids.NodeID]*snowValidators.GetValidatorOutput, error) { + result := make(map[ids.NodeID]*snowValidators.GetValidatorOutput, len(p.validators)) + for _, v := range p.validators { + result[v.NodeID] = &snowValidators.GetValidatorOutput{ + NodeID: v.NodeID, + PublicKey: v.PublicKey, + Weight: v.Weight, + } + } + + return result, nil } diff --git a/x/dsmr/node_test.go b/x/dsmr/node_test.go index 12b2e1cf3d..40682aac9a 100644 --- a/x/dsmr/node_test.go +++ b/x/dsmr/node_test.go @@ -9,12 +9,15 @@ import ( "testing" "time" + "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" + "github.com/ava-labs/avalanchego/network/p2p/acp118" "github.com/ava-labs/avalanchego/network/p2p/p2ptest" - "github.com/ava-labs/avalanchego/snow/validators" + "github.com/ava-labs/avalanchego/proto/pb/sdk" "github.com/ava-labs/avalanchego/snow/validators/validatorstest" "github.com/ava-labs/avalanchego/utils/crypto/bls" + "github.com/ava-labs/avalanchego/utils/logging" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/avalanchego/vms/platformvm/warp" @@ -22,11 +25,17 @@ import ( "github.com/ava-labs/hypersdk/codec" "github.com/ava-labs/hypersdk/proto/pb/dsmr" + + snowValidators "github.com/ava-labs/avalanchego/snow/validators" ) +const networkID = uint32(123) + var ( _ Tx = (*tx)(nil) _ Verifier[tx] = (*failVerifier)(nil) + + chainID = ids.Empty ) // Test that chunks can be built through Node.NewChunk @@ -80,46 +89,8 @@ func TestNode_BuildChunk(t *testing.T) { t.Run(tt.name, func(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - nodeID := ids.GenerateTestNodeID() - node, err := New[tx]( - nodeID, - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - - chunk, err := node.BuildChunk( + node := newTestNode(t) + chunk, _, err := node.BuildChunk( context.Background(), tt.txs, tt.expiry, @@ -130,13 +101,22 @@ func TestNode_BuildChunk(t *testing.T) { return } - r.Equal(nodeID, chunk.Producer) + r.Equal(node.ID, chunk.Producer) r.Equal(tt.beneficiary, chunk.Beneficiary) r.Equal(tt.expiry, chunk.Expiry) r.ElementsMatch(tt.txs, chunk.Txs) - // TODO verify signature + signer - r.NotEmpty(chunk.Signature) - r.NotEmpty(chunk.Signer) + + wantPkBytes := [bls.PublicKeyLen]byte{} + copy(wantPkBytes[:], bls.PublicKeyToCompressedBytes(node.PublicKey)) + r.Equal(wantPkBytes, chunk.Signer) + + packer := &wrappers.Packer{MaxSize: MaxMessageSize} + r.NoError(codec.LinearCodec.MarshalInto(chunk.UnsignedChunk, packer)) + msg, err := warp.NewUnsignedMessage(networkID, chainID, packer.Bytes) + r.NoError(err) + wantSignature, err := node.Signer.Sign(msg) + r.NoError(err) + r.Equal(wantSignature, chunk.Signature[:]) }) } } @@ -145,45 +125,10 @@ func TestNode_BuildChunk(t *testing.T) { func TestNode_GetChunk_AvailableChunk(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - node, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) + nodes := newNodes(t, 2) + node := nodes[0] - chunk, err := node.BuildChunk( + chunk, _, err := node.BuildChunk( context.Background(), []tx{{ID: ids.GenerateTestID(), Expiry: 123}}, 123, @@ -191,37 +136,30 @@ func TestNode_GetChunk_AvailableChunk(t *testing.T) { ) r.NoError(err) - blk, err := node.BuildBlock( - Block{ - ParentID: ids.GenerateTestID(), - Height: 0, - Timestamp: 1, - }, - 2, - ) + blk, err := node.BuildBlock(node.LastAccepted, node.LastAccepted.Timestamp+1) r.NoError(err) + r.NoError(node.Verify(context.Background(), node.LastAccepted, blk)) r.NoError(node.Accept(context.Background(), blk)) client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkHandler, )) done := make(chan struct{}) onResponse := func(_ context.Context, _ ids.NodeID, response Chunk[tx], err error) { defer close(done) - r.NoError(err) - r.NoError(err) r.Equal(chunk, response) } r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node.ID, &dsmr.GetChunkRequest{ ChunkId: chunk.id[:], Expiry: chunk.Expiry, @@ -235,45 +173,8 @@ func TestNode_GetChunk_AvailableChunk(t *testing.T) { func TestNode_GetChunk_PendingChunk(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - node, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - - chunk, err := node.BuildChunk( + node := newTestNode(t) + chunk, _, err := node.BuildChunk( context.Background(), []tx{{ID: ids.GenerateTestID(), Expiry: 123}}, 123, @@ -284,9 +185,10 @@ func TestNode_GetChunk_PendingChunk(t *testing.T) { client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkHandler, )) done := make(chan struct{}) @@ -298,7 +200,7 @@ func TestNode_GetChunk_PendingChunk(t *testing.T) { r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node.ID, &dsmr.GetChunkRequest{ ChunkId: chunk.id[:], Expiry: chunk.Expiry, @@ -312,50 +214,14 @@ func TestNode_GetChunk_PendingChunk(t *testing.T) { func TestNode_GetChunk_UnknownChunk(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - node, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - + node := newTestNode(t) client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkHandler, )) done := make(chan struct{}) @@ -367,7 +233,7 @@ func TestNode_GetChunk_UnknownChunk(t *testing.T) { r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node.ID, &dsmr.GetChunkRequest{ ChunkId: ids.Empty[:], Expiry: 123, @@ -524,49 +390,12 @@ func TestNode_BuiltChunksAvailableOverGetChunk(t *testing.T) { t.Run(tt.name, func(t *testing.T) { r := require.New(t) - nodeID := ids.GenerateTestNodeID() - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - node, err := New[tx]( - nodeID, - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) + node := newTestNode(t) // Build some chunks wantChunks := make([]Chunk[tx], 0) for _, args := range tt.availableChunks { - chunk, err := node.BuildChunk( + chunk, _, err := node.BuildChunk( context.Background(), args.txs, args.expiry, @@ -577,23 +406,18 @@ func TestNode_BuiltChunksAvailableOverGetChunk(t *testing.T) { wantChunks = append(wantChunks, chunk) } - block, err := node.BuildBlock( - Block{ - ParentID: ids.GenerateTestID(), - Height: 0, - Timestamp: 1, - }, - 2, - ) + blk, err := node.BuildBlock(node.LastAccepted, node.LastAccepted.Timestamp+1) r.NoError(err) - r.NoError(node.Accept(context.Background(), block)) + r.NoError(node.Verify(context.Background(), node.LastAccepted, blk)) + r.NoError(node.Accept(context.Background(), blk)) client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkHandler, )) // Node must serve GetChunk requests for chunks that it accepted @@ -602,7 +426,7 @@ func TestNode_BuiltChunksAvailableOverGetChunk(t *testing.T) { done := make(chan struct{}) r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node.ID, &dsmr.GetChunkRequest{ ChunkId: chunk.id[:], Expiry: chunk.Expiry, @@ -622,13 +446,22 @@ func TestNode_BuiltChunksAvailableOverGetChunk(t *testing.T) { r.Contains(gotChunks, chunk.id) gotChunk := gotChunks[chunk.id] - r.Equal(nodeID, gotChunk.Producer) + r.Equal(node.ID, gotChunk.Producer) r.Equal(chunk.Expiry, gotChunk.Expiry) r.Equal(chunk.Beneficiary, gotChunk.Beneficiary) r.ElementsMatch(chunk.Txs, gotChunk.Txs) - // TODO verify - r.NotEmpty(chunk.Signer) - r.NotEmpty(chunk.Signature) + + wantPkBytes := [bls.PublicKeyLen]byte{} + copy(wantPkBytes[:], bls.PublicKeyToCompressedBytes(node.PublicKey)) + r.Equal(wantPkBytes, chunk.Signer) + + packer := &wrappers.Packer{MaxSize: MaxMessageSize} + r.NoError(codec.LinearCodec.MarshalInto(chunk.UnsignedChunk, packer)) + msg, err := warp.NewUnsignedMessage(networkID, chainID, packer.Bytes) + r.NoError(err) + wantSignature, err := node.Signer.Sign(msg) + r.NoError(err) + r.Equal(wantSignature, chunk.Signature[:]) } }) } @@ -656,93 +489,71 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { t.Run(tt.name, func(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk1, err := bls.NewSecretKey() + nodeID := ids.GenerateTestNodeID() + sk, err := bls.NewSecretKey() r.NoError(err) - pk1 := bls.PublicFromSecretKey(sk1) - signer1 := warp.NewSigner(sk1, networkID, chainID) + pk := bls.PublicFromSecretKey(sk) + signer := warp.NewSigner(sk, networkID, chainID) - node1, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk1, - signer1, - tt.verifier, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) + validators := []Validator{ + { + NodeID: nodeID, + Weight: 1, + PublicKey: pk, + }, + } + + chunkStorage, err := NewChunkStorage[tx](tt.verifier, memdb.New()) r.NoError(err) - client := NewGetChunkSignatureClient( + node, err := New[tx]( + logging.NoLog{}, + nodeID, networkID, chainID, - p2ptest.NewClient( - t, - context.Background(), - node1.GetChunkSignatureHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, + pk, + signer, + chunkStorage, + p2p.NoOpHandler{}, + acp118.NewHandler( + ChunkSignatureRequestVerifier[tx]{ + verifier: tt.verifier, + storage: chunkStorage, + }, + signer, ), - ) - - sk2, err := bls.NewSecretKey() - r.NoError(err) - pk2 := bls.PublicFromSecretKey(sk2) - signer2 := warp.NewSigner(sk2, networkID, chainID) - node2, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk2, - signer2, - tt.verifier, - p2ptest.NewClient( + p2p.NoOpHandler{}, + p2ptest.NewSelfClient( t, context.Background(), + nodeID, &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, ), - p2ptest.NewClient( + p2ptest.NewSelfClient( t, context.Background(), + nodeID, &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, ), - p2ptest.NewClient( + p2ptest.NewSelfClient( t, context.Background(), + nodeID, &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, ), - nil, + validators, + Block{ + ParentID: ids.GenerateTestID(), + Height: 0, + Timestamp: 0, + blkID: ids.GenerateTestID(), + }, + 1, + 1, ) r.NoError(err) - chunk, err := node2.BuildChunk( + + chunk, _, err := node.BuildChunk( context.Background(), []tx{{ID: ids.Empty, Expiry: 123}}, 123, @@ -750,8 +561,16 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { ) r.NoError(err) + packer := wrappers.Packer{MaxSize: MaxMessageSize} + r.NoError(codec.LinearCodec.MarshalInto(ChunkReference{ + ChunkID: chunk.id, + Producer: chunk.Producer, + Expiry: chunk.Expiry, + }, &packer)) + msg, err := warp.NewUnsignedMessage(networkID, chainID, packer.Bytes) + r.NoError(err) done := make(chan struct{}) - onResponse := func(_ context.Context, _ ids.NodeID, response *dsmr.GetChunkSignatureResponse, err error) { + onResponse := func(_ context.Context, _ ids.NodeID, response *sdk.SignatureResponse, err error) { defer close(done) r.ErrorIs(err, tt.wantErr) @@ -768,16 +587,11 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { context.Context, uint64, ids.ID, - ) (map[ids.NodeID]*validators.GetValidatorOutput, error) { - return map[ids.NodeID]*validators.GetValidatorOutput{ - node1.nodeID: { - NodeID: node1.nodeID, - PublicKey: pk1, - Weight: 1, - }, - node2.nodeID: { - NodeID: node2.nodeID, - PublicKey: pk2, + ) (map[ids.NodeID]*snowValidators.GetValidatorOutput, error) { + return map[ids.NodeID]*snowValidators.GetValidatorOutput{ + node.ID: { + NodeID: node.ID, + PublicKey: node.PublicKey, Weight: 1, }, }, nil @@ -785,14 +599,12 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { } signature := warp.BitSetSignature{ - Signers: getSignerBitSet(t, pChain, node1.nodeID).Bytes(), + Signers: getSignerBitSet(t, pChain, node.ID).Bytes(), Signature: [bls.SignatureLen]byte{}, } copy(signature.Signature[:], response.Signature) - msg, err := warp.NewUnsignedMessage(networkID, chainID, chunk.bytes) - r.NoError(err) r.NoError(signature.Verify( context.Background(), msg, @@ -800,17 +612,29 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { pChain, 0, 1, - 2, + 1, )) } - packer := wrappers.Packer{MaxSize: MaxMessageSize} - r.NoError(codec.LinearCodec.MarshalInto(chunk, &packer)) - + client := NewGetChunkSignatureClient( + networkID, + chainID, + p2ptest.NewClient( + t, + context.Background(), + ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkSignatureHandler, + ), + ) r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, - &dsmr.GetChunkSignatureRequest{Chunk: packer.Bytes}, + node.ID, + &sdk.SignatureRequest{ + Message: msg.Bytes(), + Justification: chunk.bytes, + }, onResponse, )) @@ -823,89 +647,54 @@ func TestNode_GetChunkSignature_SignValidChunk(t *testing.T) { func TestNode_GetChunkSignature_DuplicateChunk(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - node, err := New[tx]( - ids.EmptyNodeID, - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - - client := NewGetChunkSignatureClient( - networkID, - chainID, - p2ptest.NewClient( - t, - context.Background(), - node.GetChunkSignatureHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, - )) - - // Accept a chunk - r.NoError(err) - chunk, err := node.BuildChunk( + node := newTestNode(t) + chunk, _, err := node.BuildChunk( context.Background(), []tx{{ID: ids.Empty, Expiry: 123}}, 123, codec.Address{123}, ) r.NoError(err) - blk, err := node.BuildBlock( - Block{ - ParentID: ids.GenerateTestID(), - Height: 0, - Timestamp: 1, - }, - 2, - ) + blk, err := node.BuildBlock(node.LastAccepted, node.LastAccepted.Timestamp+1) r.NoError(err) + r.NoError(node.Verify(context.Background(), node.LastAccepted, blk)) r.NoError(node.Accept(context.Background(), blk)) done := make(chan struct{}) - onResponse := func(_ context.Context, _ ids.NodeID, _ *dsmr.GetChunkSignatureResponse, err error) { + onResponse := func(_ context.Context, _ ids.NodeID, _ *sdk.SignatureResponse, err error) { defer close(done) r.ErrorIs(err, ErrDuplicateChunk) } packer := wrappers.Packer{MaxSize: MaxMessageSize} - r.NoError(codec.LinearCodec.MarshalInto(chunk, &packer)) + r.NoError(codec.LinearCodec.MarshalInto(ChunkReference{ + ChunkID: chunk.id, + Producer: chunk.Producer, + Expiry: chunk.Expiry, + }, &packer)) + msg, err := warp.NewUnsignedMessage(networkID, chainID, packer.Bytes) + r.NoError(err) + client := NewGetChunkSignatureClient( + networkID, + chainID, + p2ptest.NewClient( + t, + context.Background(), + ids.EmptyNodeID, + p2p.NoOpHandler{}, + node.ID, + node.GetChunkSignatureHandler, + ), + ) r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, - &dsmr.GetChunkSignatureRequest{Chunk: packer.Bytes}, + node.ID, + &sdk.SignatureRequest{ + Message: msg.Bytes(), + Justification: chunk.bytes, + }, onResponse, )) @@ -916,84 +705,14 @@ func TestNode_GetChunkSignature_DuplicateChunk(t *testing.T) { func TestGetChunkSignature_PersistAttestedBlocks(t *testing.T) { r := require.New(t) - networkID := uint32(23) - chainID := ids.Empty - sk1, err := bls.NewSecretKey() - r.NoError(err) - pk1 := bls.PublicFromSecretKey(sk1) - signer1 := warp.NewSigner(sk1, networkID, chainID) - node1, err := New[tx]( - ids.EmptyNodeID, - networkID, - chainID, - pk1, - signer1, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - - sk2, err := bls.NewSecretKey() - r.NoError(err) - pk2 := bls.PublicFromSecretKey(sk2) - signer2 := warp.NewSigner(sk2, networkID, chainID) - node2, err := New[tx]( - ids.EmptyNodeID, - networkID, - chainID, - pk2, - signer2, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - node1.GetChunkHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - node1.GetChunkSignatureHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - node1.ChunkCertificateGossipHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - []Validator{{NodeID: node1.nodeID}}, - ) - r.NoError(err) + nodes := newNodes(t, 2) + node1 := nodes[0] + node2 := nodes[1] - chunk, err := node2.BuildChunk( + chunk, _, err := node1.BuildChunk( context.Background(), - []tx{{ID: ids.Empty, Expiry: 1}}, - 1, + []tx{{ID: ids.Empty, Expiry: 123}}, + 123, codec.Address{123}, ) r.NoError(err) @@ -1002,28 +721,23 @@ func TestGetChunkSignature_PersistAttestedBlocks(t *testing.T) { // chunk cert var blk Block for { - blk, err = node1.BuildBlock( - Block{ - ParentID: ids.Empty, - Height: 0, - Timestamp: 0, - }, - 1, - ) + blk, err = node2.BuildBlock(node2.LastAccepted, node2.LastAccepted.Timestamp+1) if err == nil { break } time.Sleep(time.Second) } - r.NoError(node1.Accept(context.Background(), blk)) + r.NoError(node2.Verify(context.Background(), node2.LastAccepted, blk)) + r.NoError(node2.Accept(context.Background(), blk)) client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node1.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node2.ID, + node2.GetChunkHandler, )) done := make(chan struct{}) @@ -1035,7 +749,7 @@ func TestGetChunkSignature_PersistAttestedBlocks(t *testing.T) { r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node2.ID, &dsmr.GetChunkRequest{ ChunkId: chunk.id[:], Expiry: chunk.Expiry, @@ -1251,48 +965,10 @@ func TestNode_NewBlock_IncludesChunkCerts(t *testing.T) { t.Run(tt.name, func(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk, err := bls.NewSecretKey() - r.NoError(err) - pk := bls.PublicFromSecretKey(sk) - signer := warp.NewSigner(sk, networkID, chainID) - - node, err := New[tx]( - ids.EmptyNodeID, - networkID, - chainID, - pk, - signer, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) - + node := newTestNode(t) wantChunks := make([]Chunk[tx], 0) for _, chunk := range tt.chunks { - chunk, err := node.BuildChunk( + chunk, _, err := node.BuildChunk( context.Background(), chunk.txs, chunk.expiry, @@ -1337,103 +1013,31 @@ func TestNode_NewBlock_IncludesChunkCerts(t *testing.T) { func TestAccept_RequestReferencedChunks(t *testing.T) { r := require.New(t) - networkID := uint32(123) - chainID := ids.Empty - sk1, err := bls.NewSecretKey() - r.NoError(err) - pk1 := bls.PublicFromSecretKey(sk1) - signer1 := warp.NewSigner(sk1, networkID, chainID) - r.NoError(err) - node1, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk1, - signer1, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - nil, - ) - r.NoError(err) + nodes := newNodes(t, 2) + node1 := nodes[0] + node2 := nodes[1] - chunk, err := node1.BuildChunk( + chunk, _, err := node1.BuildChunk( context.Background(), - []tx{{ID: ids.GenerateTestID(), Expiry: 1}}, - 1, + []tx{{ID: ids.GenerateTestID(), Expiry: 123}}, + 123, codec.Address{123}, ) r.NoError(err) - blk, err := node1.BuildBlock(Block{ - ParentID: ids.GenerateTestID(), - Height: 0, - Timestamp: 0, - }, 1) + blk, err := node1.BuildBlock(node1.LastAccepted, node1.LastAccepted.Timestamp+1) r.NoError(err) + r.NoError(node1.Verify(context.Background(), node1.LastAccepted, blk)) r.NoError(node1.Accept(context.Background(), blk)) - - sk2, err := bls.NewSecretKey() - r.NoError(err) - pk2 := bls.PublicFromSecretKey(sk2) - signer2 := warp.NewSigner(sk2, networkID, chainID) - node2, err := New[tx]( - ids.GenerateTestNodeID(), - networkID, - chainID, - pk2, - signer2, - NoVerifier[tx]{}, - p2ptest.NewClient( - t, - context.Background(), - node1.GetChunkHandler, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - p2ptest.NewClient( - t, - context.Background(), - &p2p.NoOpHandler{}, - ids.EmptyNodeID, - ids.EmptyNodeID, - ), - []Validator{{NodeID: node1.nodeID}}, - ) - r.NoError(err) + r.NoError(node2.Verify(context.Background(), node2.LastAccepted, blk)) r.NoError(node2.Accept(context.Background(), blk)) client := NewGetChunkClient[tx](p2ptest.NewClient( t, context.Background(), - node2.GetChunkHandler, - ids.EmptyNodeID, ids.EmptyNodeID, + p2p.NoOpHandler{}, + node2.ID, + node2.GetChunkHandler, )) done := make(chan struct{}) @@ -1445,7 +1049,7 @@ func TestAccept_RequestReferencedChunks(t *testing.T) { r.NoError(client.AppRequest( context.Background(), - ids.EmptyNodeID, + node2.ID, &dsmr.GetChunkRequest{ ChunkId: chunk.id[:], Expiry: chunk.Expiry, @@ -1455,7 +1059,7 @@ func TestAccept_RequestReferencedChunks(t *testing.T) { <-done } -func getSignerBitSet(t *testing.T, pChain validators.State, nodeIDs ...ids.NodeID) set.Bits { +func getSignerBitSet(t *testing.T, pChain snowValidators.State, nodeIDs ...ids.NodeID) set.Bits { validators, _, err := warp.GetCanonicalValidatorSet( context.Background(), pChain, @@ -1478,6 +1082,181 @@ func getSignerBitSet(t *testing.T, pChain validators.State, nodeIDs ...ids.NodeI return signerBitSet } +func Test_Verify(t *testing.T) { + r := require.New(t) + + node := newTestNode(t) + _, _, err := node.BuildChunk( + context.Background(), + []tx{{ID: ids.GenerateTestID(), Expiry: 1}}, + 100, + codec.Address{123}, + ) + r.NoError(err) + + blk, err := node.BuildBlock(node.LastAccepted, node.LastAccepted.Timestamp+1) + r.NoError(err) + r.NoError(node.Verify(context.Background(), node.LastAccepted, blk)) +} + +func Test_Verify_BadBlock(t *testing.T) { + tests := []struct { + name string + blk func(chunkCert ChunkCertificate, parent Block) Block + wantErr error + }{ + { + name: "invalid parent", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: ids.GenerateTestID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockParent, + }, + { + name: "invalid height - before parent", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height - 1, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockHeight, + }, + { + name: "invalid height - same as parent", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockHeight, + }, + { + name: "invalid height - too far into future", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 2, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockHeight, + }, + { + name: "invalid timestamp - before parent", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp - 1, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockTimestamp, + }, + { + name: "invalid timestamp - same as parent", + blk: func(chunkCert ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp, + ChunkCerts: []*ChunkCertificate{&chunkCert}, + } + }, + wantErr: ErrInvalidBlockTimestamp, + }, + { + name: "invalid timestamp - too far into future", + blk: func(_ ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp + time.Minute.Nanoseconds(), + } + }, + wantErr: ErrInvalidBlockTimestamp, + }, + { + name: "nil chunk certs", + blk: func(_ ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp + 1, + } + }, + wantErr: ErrEmptyBlock, + }, + { + name: "empty chunk certs", + blk: func(_ ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{}, + } + }, + wantErr: ErrEmptyBlock, + }, + { + name: "invalid signature", + blk: func(_ ChunkCertificate, parent Block) Block { + return Block{ + ParentID: parent.GetID(), + Height: parent.Height + 1, + Timestamp: parent.Timestamp + 1, + ChunkCerts: []*ChunkCertificate{ + { + ChunkReference: ChunkReference{ + ChunkID: ids.GenerateTestID(), + Producer: ids.GenerateTestNodeID(), + Expiry: 1, + }, + Signature: &warp.BitSetSignature{ + Signers: set.NewBits(1, 2, 3).Bytes(), + Signature: [96]byte{1, 2, 3}, + }, + }, + }, + } + }, + wantErr: ErrInvalidWarpSignature, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + r := require.New(t) + + node := newTestNode(t) + _, chunkCert, err := node.BuildChunk( + context.Background(), + []tx{{ID: ids.GenerateTestID(), Expiry: 2}}, + 100, + codec.Address{123}, + ) + r.NoError(err) + r.ErrorIs(node.Verify( + context.Background(), + node.LastAccepted, + tt.blk(chunkCert, node.LastAccepted), + ), tt.wantErr) + }) + } +} + type tx struct { ID ids.ID `serialize:"true"` Expiry int64 `serialize:"true"` @@ -1501,3 +1280,145 @@ type failVerifier struct{} func (failVerifier) Verify(Chunk[tx]) error { return errors.New("fail") } + +type testNode struct { + ChunkStorage *ChunkStorage[tx] + GetChunkHandler p2p.Handler + ChunkSignatureRequestHandler p2p.Handler + ChunkCertificateGossipHandler p2p.Handler + Sk *bls.SecretKey +} + +func newTestNode(t *testing.T) *Node[tx] { + return newNodes(t, 1)[0] +} + +func newNodes(t *testing.T, n int) []*Node[tx] { + nodes := make([]testNode, 0, n) + validators := make([]Validator, 0, n) + for i := 0; i < n; i++ { + sk, err := bls.NewSecretKey() + require.NoError(t, err) + pk := bls.PublicFromSecretKey(sk) + signer := warp.NewSigner(sk, networkID, chainID) + + chunkStorage, err := NewChunkStorage[tx](NoVerifier[tx]{}, memdb.New()) + require.NoError(t, err) + + getChunkHandler := &GetChunkHandler[tx]{ + storage: chunkStorage, + } + chunkSignatureRequestHandler := acp118.NewHandler(ChunkSignatureRequestVerifier[tx]{ + verifier: NoVerifier[tx]{}, + storage: chunkStorage, + }, signer) + chunkCertificateGossipHandler := ChunkCertificateGossipHandler[tx]{ + storage: chunkStorage, + } + + nodes = append(nodes, testNode{ + ChunkStorage: chunkStorage, + GetChunkHandler: getChunkHandler, + ChunkSignatureRequestHandler: chunkSignatureRequestHandler, + ChunkCertificateGossipHandler: chunkCertificateGossipHandler, + Sk: sk, + }) + + validators = append(validators, Validator{ + NodeID: ids.GenerateTestNodeID(), + Weight: 1, + PublicKey: pk, + }) + } + + result := make([]*Node[tx], 0, n) + for i, n := range nodes { + getChunkPeers := make(map[ids.NodeID]p2p.Handler) + chunkSignaturePeers := make(map[ids.NodeID]p2p.Handler) + chunkCertGossipPeers := make(map[ids.NodeID]p2p.Handler) + for j := range nodes { + if i == j { + continue + } + + getChunkPeers[validators[j].NodeID] = nodes[j].GetChunkHandler + chunkSignaturePeers[validators[j].NodeID] = nodes[j].ChunkSignatureRequestHandler + chunkCertGossipPeers[validators[j].NodeID] = nodes[j].ChunkCertificateGossipHandler + } + + node, err := New[tx]( + logging.NoLog{}, + validators[i].NodeID, + networkID, + chainID, + validators[i].PublicKey, + warp.NewSigner(n.Sk, networkID, chainID), + n.ChunkStorage, + n.GetChunkHandler, + n.ChunkSignatureRequestHandler, + n.ChunkCertificateGossipHandler, + p2ptest.NewClientWithPeers( + t, + context.Background(), + validators[i].NodeID, + n.GetChunkHandler, + getChunkPeers, + ), + p2ptest.NewClientWithPeers( + t, + context.Background(), + validators[i].NodeID, + n.ChunkSignatureRequestHandler, + chunkSignaturePeers, + ), + p2ptest.NewClientWithPeers( + t, + context.Background(), + validators[i].NodeID, + n.ChunkCertificateGossipHandler, + chunkCertGossipPeers, + ), + validators, + Block{ + ParentID: ids.Empty, + Height: 0, + Timestamp: 0, + blkID: ids.Empty, + }, + 1, + 1, + ) + require.NoError(t, err) + + result = append(result, node) + } + + // create a valid parent block for tests to verify off of + node := result[0] + _, _, err := node.BuildChunk( + context.Background(), + []tx{ + { + ID: ids.ID{}, + Expiry: 123, + Sponsor: codec.Address{}, + }, + }, + 123, + codec.Address{}, + ) + require.NoError(t, err) + + blk, err := node.BuildBlock(node.LastAccepted, node.LastAccepted.Timestamp+1) + require.NoError(t, err) + + require.NoError(t, node.Verify(context.Background(), node.LastAccepted, blk)) + require.NoError(t, node.Accept(context.Background(), blk)) + + for _, n := range result[1:] { + require.NoError(t, n.Verify(context.Background(), n.LastAccepted, blk)) + require.NoError(t, n.Accept(context.Background(), blk)) + } + + return result +} diff --git a/x/dsmr/p2p.go b/x/dsmr/p2p.go index 561838690e..f4f9baf484 100644 --- a/x/dsmr/p2p.go +++ b/x/dsmr/p2p.go @@ -45,7 +45,7 @@ var ( ) type GetChunkHandler[T Tx] struct { - storage *chunkStorage[T] + storage *ChunkStorage[T] } func (*GetChunkHandler[_]) AppGossip(context.Context, ids.NodeID, []byte) {} @@ -111,11 +111,15 @@ type ChunkSignature struct { type ChunkSignatureRequestVerifier[T Tx] struct { verifier Verifier[T] - storage *chunkStorage[T] + storage *ChunkStorage[T] } -func (c ChunkSignatureRequestVerifier[T]) Verify(_ context.Context, message *warp.UnsignedMessage, _ []byte) *common.AppError { - chunk, err := ParseChunk[T](message.Payload) +func (c ChunkSignatureRequestVerifier[T]) Verify( + _ context.Context, + _ *warp.UnsignedMessage, + justification []byte, +) *common.AppError { + chunk, err := ParseChunk[T](justification) if err != nil { return &common.AppError{ Code: p2p.ErrUnexpected.Code, @@ -151,11 +155,11 @@ func (c ChunkSignatureRequestVerifier[T]) Verify(_ context.Context, message *war } type ChunkCertificateGossipHandler[T Tx] struct { - storage *chunkStorage[T] + storage *ChunkStorage[T] } // TODO error handling + logs -func (c ChunkCertificateGossipHandler[_]) AppGossip(_ context.Context, _ ids.NodeID, gossipBytes []byte) { +func (c ChunkCertificateGossipHandler[T]) AppGossip(_ context.Context, _ ids.NodeID, gossipBytes []byte) { gossip := &dsmr.ChunkCertificateGossip{} if err := proto.Unmarshal(gossipBytes, gossip); err != nil { return diff --git a/x/dsmr/storage.go b/x/dsmr/storage.go index 0cd5f98e37..c03069a3f4 100644 --- a/x/dsmr/storage.go +++ b/x/dsmr/storage.go @@ -10,6 +10,7 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/vms/platformvm/warp" "github.com/ava-labs/hypersdk/consts" "github.com/ava-labs/hypersdk/internal/emap" @@ -40,13 +41,13 @@ func (NoVerifier[T]) Verify(Chunk[T]) error { } type StoredChunkSignature[T Tx] struct { - Chunk Chunk[T] - LocalSignature NoVerifyChunkSignatureShare // Decouple signature share / certificate types - Cert *ChunkCertificate - Available bool + Chunk Chunk[T] + Cert *ChunkCertificate + // TODO what do we need this flag for? + Available bool } -// chunkStorage provides chunk, signature share, and chunk certificate storage +// ChunkStorage provides chunk, signature share, and chunk certificate storage // // Note: we only require chunk persistence until it has either been included // or expired. @@ -54,7 +55,7 @@ type StoredChunkSignature[T Tx] struct { // We do not require persistence of chunk certificates. // If a valid chunk certificate is included in a block, we already have it. // If a valid chunk certificate is dropped, the network may drop the chunk. -type chunkStorage[T Tx] struct { +type ChunkStorage[T Tx] struct { verifier Verifier[T] lock sync.RWMutex @@ -70,10 +71,10 @@ type chunkStorage[T Tx] struct { chunkMap map[ids.ID]*StoredChunkSignature[T] } -func newChunkStorage[T Tx]( +func NewChunkStorage[T Tx]( verifier Verifier[T], db database.Database, -) (*chunkStorage[T], error) { +) (*ChunkStorage[T], error) { minSlot := int64(0) minSlotBytes, err := db.Get(minSlotKey) if err != nil && err != database.ErrNotFound { @@ -88,7 +89,7 @@ func newChunkStorage[T Tx]( minSlot = int64(minSlotUint64) } - storage := &chunkStorage[T]{ + storage := &ChunkStorage[T]{ minimumExpiry: minSlot, chunkEMap: emap.NewEMap[emapChunk[T]](), chunkMap: make(map[ids.ID]*StoredChunkSignature[T]), @@ -98,7 +99,7 @@ func newChunkStorage[T Tx]( return storage, storage.init() } -func (s *chunkStorage[T]) init() error { +func (s *ChunkStorage[T]) init() error { iter := s.chunkDB.NewIteratorWithPrefix([]byte{pendingByte}) defer iter.Release() @@ -124,7 +125,7 @@ func (s *chunkStorage[T]) init() error { } // AddLocalChunkWithCert adds a chunk to storage with the local signature share and aggregated certificate -func (s *chunkStorage[T]) AddLocalChunkWithCert(c Chunk[T], cert *ChunkCertificate) error { +func (s *ChunkStorage[T]) AddLocalChunkWithCert(c Chunk[T], cert *ChunkCertificate) error { s.lock.Lock() defer s.lock.Unlock() @@ -133,7 +134,7 @@ func (s *chunkStorage[T]) AddLocalChunkWithCert(c Chunk[T], cert *ChunkCertifica // SetChunkCert sets the chunk certificate for the given chunkID // Assumes the caller has already verified the cert references the provided chunkID -func (s *chunkStorage[T]) SetChunkCert(chunkID ids.ID, cert *ChunkCertificate) error { +func (s *ChunkStorage[T]) SetChunkCert(chunkID ids.ID, cert *ChunkCertificate) error { s.lock.Lock() defer s.lock.Unlock() @@ -142,7 +143,6 @@ func (s *chunkStorage[T]) SetChunkCert(chunkID ids.ID, cert *ChunkCertificate) e return fmt.Errorf("failed to store cert for non-existent chunk: %s", chunkID) } storedChunk.Cert = cert - storedChunk.Available = true return nil } @@ -152,34 +152,30 @@ func (s *chunkStorage[T]) SetChunkCert(chunkID ids.ID, cert *ChunkCertificate) e // 3. Generate a local signature share and store it in memory // 4. Return the local signature share // TODO refactor and merge with AddLocalChunkWithCert -func (s *chunkStorage[T]) VerifyRemoteChunk(c Chunk[T]) (NoVerifyChunkSignatureShare, error) { +func (s *ChunkStorage[T]) VerifyRemoteChunk(c Chunk[T]) (*warp.BitSetSignature, error) { s.lock.Lock() defer s.lock.Unlock() chunkCertInfo, ok := s.chunkMap[c.id] if ok { - return chunkCertInfo.LocalSignature, nil + return chunkCertInfo.Cert.Signature, nil } if err := s.verifier.Verify(c); err != nil { - return NoVerifyChunkSignatureShare{}, err + return nil, err } if err := s.putVerifiedChunk(c, nil); err != nil { - return NoVerifyChunkSignatureShare{}, err + return nil, err } - return NoVerifyChunkSignatureShare{}, nil + return nil, nil } -func (s *chunkStorage[T]) putVerifiedChunk(c Chunk[T], cert *ChunkCertificate) error { +func (s *ChunkStorage[T]) putVerifiedChunk(c Chunk[T], cert *ChunkCertificate) error { if err := s.chunkDB.Put(pendingChunkKey(c.Expiry, c.id), c.bytes); err != nil { return err } s.chunkEMap.Add([]emapChunk[T]{{chunk: c}}) - chunkCert := &StoredChunkSignature[T]{ - Chunk: c, - LocalSignature: NoVerifyChunkSignatureShare{}, // TODO: add signer to generate actual signature share - Cert: cert, - } + chunkCert := &StoredChunkSignature[T]{Chunk: c, Cert: cert} s.chunkMap[c.id] = chunkCert return nil } @@ -187,7 +183,7 @@ func (s *chunkStorage[T]) putVerifiedChunk(c Chunk[T], cert *ChunkCertificate) e // TODO need to call this to expire chunks in server // SetMin sets the minimum timestamp on the expiring storage and marks the chunks that // must be saved, which would otherwise expire. -func (s *chunkStorage[T]) SetMin(updatedMin int64, saveChunks []ids.ID) error { +func (s *ChunkStorage[T]) SetMin(updatedMin int64, saveChunks []ids.ID) error { s.lock.Lock() defer s.lock.Unlock() @@ -231,13 +227,13 @@ func (s *chunkStorage[T]) SetMin(updatedMin int64, saveChunks []ids.ID) error { // GatherChunkCerts provides a slice of chunk certificates to build // a chunk based block. // TODO: switch from returning random chunk certs to ordered by expiry -func (s *chunkStorage[T]) GatherChunkCerts() []*ChunkCertificate { +func (s *ChunkStorage[T]) GatherChunkCerts() []*ChunkCertificate { s.lock.RLock() defer s.lock.RUnlock() chunkCerts := make([]*ChunkCertificate, 0, len(s.chunkMap)) for _, chunk := range s.chunkMap { - if chunk.Cert == nil { + if chunk.Cert == nil || chunk.Available { continue } chunkCerts = append(chunkCerts, chunk.Cert) @@ -248,7 +244,7 @@ func (s *chunkStorage[T]) GatherChunkCerts() []*ChunkCertificate { // GetChunkBytes returns the corresponding chunk bytes of the requested chunk // Both the slot and chunkID must be provided to create the relevant DB key, which // includes the slot to create a more sequential DB workload. -func (s *chunkStorage[T]) GetChunkBytes(expiry int64, chunkID ids.ID) ([]byte, bool, error) { +func (s *ChunkStorage[T]) GetChunkBytes(expiry int64, chunkID ids.ID) ([]byte, bool, error) { s.lock.RLock() defer s.lock.RUnlock() diff --git a/x/dsmr/storage_test.go b/x/dsmr/storage_test.go index fd7717649a..13d5c14ae8 100644 --- a/x/dsmr/storage_test.go +++ b/x/dsmr/storage_test.go @@ -12,6 +12,7 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/set" + "github.com/ava-labs/avalanchego/vms/platformvm/warp" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" @@ -35,10 +36,10 @@ func (t testVerifier[T]) Verify(chunk Chunk[T]) error { } func createTestStorage(t *testing.T, numValidChunks, numInvalidChunks int) ( - *chunkStorage[tx], + *ChunkStorage[tx], []Chunk[tx], []Chunk[tx], - func() *chunkStorage[tx], + func() *ChunkStorage[tx], ) { require := require.New(t) @@ -84,18 +85,18 @@ func createTestStorage(t *testing.T, numValidChunks, numInvalidChunks int) ( } testVerifier := testVerifier[tx]{correctIDs: set.Of(validChunkIDs...)} - storage, err := newChunkStorage[tx]( + storage, err := NewChunkStorage[tx]( testVerifier, db, ) require.NoError(err) - restart := func() *chunkStorage[tx] { + restart := func() *ChunkStorage[tx] { require.NoError(db.Close()) db, err = pebble.New(tempDir, pebble.NewDefaultConfig(), prometheus.NewRegistry()) require.NoError(err) - storage, err := newChunkStorage[tx]( + storage, err := NewChunkStorage[tx]( testVerifier, db, ) @@ -122,9 +123,12 @@ func TestStoreAndSaveValidChunk(t *testing.T) { require.Empty(chunkCerts) chunkCert := &ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: ids.GenerateTestID(), + Producer: ids.GenerateTestNodeID(), + Expiry: 1, + }, + Signature: &warp.BitSetSignature{}, } require.NoError(storage.SetChunkCert(chunk.id, chunkCert)) chunkCerts = storage.GatherChunkCerts() @@ -157,9 +161,12 @@ func TestStoreAndExpireValidChunk(t *testing.T) { require.Empty(chunkCerts) chunkCert := &ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: ids.GenerateTestID(), + Producer: ids.GenerateTestNodeID(), + Expiry: 1, + }, + Signature: &warp.BitSetSignature{}, } require.NoError(storage.SetChunkCert(chunk.id, chunkCert)) chunkCerts = storage.GatherChunkCerts() @@ -196,9 +203,12 @@ func TestStoreAndSaveLocalChunk(t *testing.T) { storage, validChunks, _, _ := createTestStorage(t, 1, 0) chunk := validChunks[0] chunkCert := &ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: ids.GenerateTestID(), + Producer: ids.GenerateTestNodeID(), + Expiry: 1, + }, + Signature: &warp.BitSetSignature{}, } require.NoError(storage.AddLocalChunkWithCert(chunk, chunkCert)) @@ -226,9 +236,12 @@ func TestStoreAndExpireLocalChunk(t *testing.T) { storage, validChunks, _, _ := createTestStorage(t, 1, 0) chunk := validChunks[0] chunkCert := &ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: ids.GenerateTestID(), + Producer: ids.GenerateTestNodeID(), + Expiry: 1, + }, + Signature: &warp.BitSetSignature{}, } require.NoError(storage.AddLocalChunkWithCert(chunk, chunkCert)) @@ -265,9 +278,12 @@ func TestRestartSavedChunks(t *testing.T) { chunkCerts := make([]*ChunkCertificate, 0, numChunks) for _, chunk := range validChunks { chunkCert := &ChunkCertificate{ - ChunkID: chunk.id, - Expiry: chunk.Expiry, - Signature: NoVerifyChunkSignature{}, + ChunkReference: ChunkReference{ + ChunkID: chunk.id, + Producer: chunk.Producer, + Expiry: chunk.Expiry, + }, + Signature: &warp.BitSetSignature{}, } chunkCerts = append(chunkCerts, chunkCert) } @@ -301,7 +317,7 @@ func TestRestartSavedChunks(t *testing.T) { validChunks[1].id, })) - confirmChunkStorage := func(storage *chunkStorage[tx]) { + confirmChunkStorage := func(storage *ChunkStorage[tx]) { // Confirm we can fetch the chunk bytes for the accepted and pending chunks for i, expectedChunk := range []Chunk[tx]{ validChunks[0], diff --git a/x/dsmr/typed_client.go b/x/dsmr/typed_client.go index ae88938186..85df6f86f3 100644 --- a/x/dsmr/typed_client.go +++ b/x/dsmr/typed_client.go @@ -14,7 +14,6 @@ import ( "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/utils/wrappers" - "github.com/ava-labs/avalanchego/vms/platformvm/warp" "google.golang.org/protobuf/proto" "github.com/ava-labs/hypersdk/codec" @@ -22,9 +21,9 @@ import ( ) var ( - _ Marshaler[*dsmr.GetChunkRequest, Chunk[Tx], []byte] = (*getChunkMarshaler[Tx])(nil) - _ Marshaler[*dsmr.GetChunkSignatureRequest, *dsmr.GetChunkSignatureResponse, []byte] = (*getChunkSignatureMarshaler)(nil) - _ Marshaler[[]byte, []byte, *dsmr.ChunkCertificateGossip] = (*chunkCertificateGossipMarshaler)(nil) + _ Marshaler[*dsmr.GetChunkRequest, Chunk[Tx], []byte] = (*getChunkMarshaler[Tx])(nil) + _ Marshaler[*sdk.SignatureRequest, *sdk.SignatureResponse, []byte] = (*getChunkSignatureMarshaler)(nil) + _ Marshaler[[]byte, []byte, *dsmr.ChunkCertificateGossip] = (*chunkCertificateGossipMarshaler)(nil) ) type Marshaler[T any, U any, V any] interface { @@ -110,29 +109,17 @@ type getChunkSignatureMarshaler struct { chainID ids.ID } -func (g getChunkSignatureMarshaler) MarshalRequest(request *dsmr.GetChunkSignatureRequest) ([]byte, error) { - msg, err := warp.NewUnsignedMessage(g.networkID, g.chainID, request.Chunk) - if err != nil { - return nil, err - } - - acp118Request := sdk.SignatureRequest{ - Message: msg.Bytes(), - Justification: nil, - } - - return proto.Marshal(&acp118Request) +func (getChunkSignatureMarshaler) MarshalRequest(request *sdk.SignatureRequest) ([]byte, error) { + return proto.Marshal(request) } -func (getChunkSignatureMarshaler) UnmarshalResponse(bytes []byte) (*dsmr.GetChunkSignatureResponse, error) { - acp118Response := sdk.SignatureResponse{} - if err := proto.Unmarshal(bytes, &acp118Response); err != nil { +func (getChunkSignatureMarshaler) UnmarshalResponse(bytes []byte) (*sdk.SignatureResponse, error) { + acp118Response := &sdk.SignatureResponse{} + if err := proto.Unmarshal(bytes, acp118Response); err != nil { return nil, err } - return &dsmr.GetChunkSignatureResponse{ - Signature: acp118Response.Signature, - }, nil + return acp118Response, nil } func (getChunkSignatureMarshaler) MarshalGossip(bytes []byte) ([]byte, error) { @@ -173,8 +160,8 @@ func NewGetChunkClient[T Tx](client *p2p.Client) *TypedClient[*dsmr.GetChunkRequ } } -func NewGetChunkSignatureClient(networkID uint32, chainID ids.ID, client *p2p.Client) *TypedClient[*dsmr.GetChunkSignatureRequest, *dsmr.GetChunkSignatureResponse, []byte] { - return &TypedClient[*dsmr.GetChunkSignatureRequest, *dsmr.GetChunkSignatureResponse, []byte]{ +func NewGetChunkSignatureClient(networkID uint32, chainID ids.ID, client *p2p.Client) *TypedClient[*sdk.SignatureRequest, *sdk.SignatureResponse, []byte] { + return &TypedClient[*sdk.SignatureRequest, *sdk.SignatureResponse, []byte]{ client: client, marshaler: getChunkSignatureMarshaler{ networkID: networkID,