From 4209aa4a25b18d3e90560091a14660f664855a2f Mon Sep 17 00:00:00 2001 From: aaronbuchwald Date: Mon, 20 Feb 2023 14:47:36 -0800 Subject: [PATCH 1/3] Bump avalanchego to v1.9.9-rc.4 (#526) * Bump avalanchego to v1.9.9-rc.4 * Fix imports * Bump compatibility.json for latest avalanchego release --- compatibility.json | 2 +- go.mod | 16 ++++------- go.sum | 35 +++++++------------------ plugin/main.go | 3 ++- scripts/versions.sh | 2 +- warp/backend.go | 12 ++++----- warp/backend_test.go | 16 +++++------ warp/handlers/signature_request_test.go | 6 ++--- 8 files changed, 36 insertions(+), 56 deletions(-) diff --git a/compatibility.json b/compatibility.json index f9d90ad393..8356d50b59 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,6 +1,6 @@ { "rpcChainVMProtocolVersion": { - "v0.4.9": 22, + "v0.4.9": 23, "v0.4.8": 22, "v0.4.7": 21, "v0.4.6": 20, diff --git a/go.mod b/go.mod index 72b82932ec..9aafcadced 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/VictoriaMetrics/fastcache v1.10.0 - github.com/ava-labs/avalanchego v1.9.8 + github.com/ava-labs/avalanchego v1.9.9-rc.4 github.com/cespare/cp v0.1.0 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set v1.8.0 @@ -39,8 +39,8 @@ require ( github.com/urfave/cli/v2 v2.10.2 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d golang.org/x/sync v0.1.0 - golang.org/x/sys v0.3.0 - golang.org/x/text v0.5.0 + golang.org/x/sys v0.5.0 + golang.org/x/text v0.7.0 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac gopkg.in/urfave/cli.v1 v1.20.0 ) @@ -57,7 +57,6 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/fatih/color v1.13.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -72,10 +71,7 @@ require ( github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect - github.com/hashicorp/go-hclog v1.2.2 // indirect - github.com/hashicorp/go-plugin v1.4.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/influxdata/influxdb v1.8.3 // indirect github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect @@ -84,12 +80,10 @@ require ( github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect - github.com/oklog/run v1.1.0 // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.1 // indirect @@ -123,8 +117,8 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/term v0.3.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/term v0.5.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect google.golang.org/grpc v1.53.0-dev // indirect diff --git a/go.sum b/go.sum index 0b4e002aee..7df5146f0e 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/ava-labs/avalanchego v1.9.8 h1:5SHKqkWpBn9Pqxg2qpzDZ7FQqYFapzaCZwArapBdqAA= -github.com/ava-labs/avalanchego v1.9.8/go.mod h1:t9+R55TgRJxYCekRf/EicIjHBeeEQT04TQxpaF98+yM= +github.com/ava-labs/avalanchego v1.9.9-rc.4 h1:3KUGKGZ4+tcLz+E5jz3e+Ah6VDcLenv9fSwHiG8gTwg= +github.com/ava-labs/avalanchego v1.9.9-rc.4/go.mod h1:mnM/wzJIaKXzLV323Yh0EbLtsicoaFSgaDESrED9dr0= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -155,8 +155,6 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -304,18 +302,12 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M= -github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce h1:7UnVY3T/ZnHUrfviiAgIUjg2PXxsQfs5bphsG8F7Keo= -github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= @@ -345,7 +337,6 @@ 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/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 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= @@ -389,7 +380,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -406,8 +396,6 @@ github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4f github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -428,8 +416,6 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96d github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -718,8 +704,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 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= @@ -812,16 +798,15 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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= @@ -831,8 +816,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 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= diff --git a/plugin/main.go b/plugin/main.go index d8b4e772c2..f0258adcfa 100644 --- a/plugin/main.go +++ b/plugin/main.go @@ -4,6 +4,7 @@ package main import ( + "context" "fmt" "os" @@ -29,5 +30,5 @@ func main() { fmt.Printf("failed to set fd limit correctly due to: %s", err) os.Exit(1) } - rpcchainvm.Serve(&evm.VM{}) + rpcchainvm.Serve(context.Background(), &evm.VM{}) } diff --git a/scripts/versions.sh b/scripts/versions.sh index 708a8c549a..17d45440fb 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -3,7 +3,7 @@ # Set up the versions to be used - populate ENV variables only if they are not already populated SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-'v0.4.9'} # Don't export them as they're used in the context of other calls -AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.9.8'} +AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.9.9-rc.4'} GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'} # This won't be used, but it's here to make code syncs easier diff --git a/warp/backend.go b/warp/backend.go index 8cfac0b54e..ed22f7d655 100644 --- a/warp/backend.go +++ b/warp/backend.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/avalanchego/utils/hashing" - "github.com/ava-labs/avalanchego/vms/platformvm/teleporter" + avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp" ) var _ WarpBackend = &warpBackend{} @@ -22,7 +22,7 @@ var _ WarpBackend = &warpBackend{} // The backend is also used to query for warp message signatures by the signature request handler. type WarpBackend interface { // AddMessage signs [unsignedMessage] and adds it to the warp backend database - AddMessage(ctx context.Context, unsignedMessage *teleporter.UnsignedMessage) error + AddMessage(ctx context.Context, unsignedMessage *avalancheWarp.UnsignedMessage) error // GetSignature returns the signature of the requested message hash. GetSignature(ctx context.Context, messageHash ids.ID) ([bls.SignatureLen]byte, error) @@ -44,7 +44,7 @@ func NewWarpBackend(snowCtx *snow.Context, db database.Database, signatureCacheS } } -func (w *warpBackend) AddMessage(ctx context.Context, unsignedMessage *teleporter.UnsignedMessage) error { +func (w *warpBackend) AddMessage(ctx context.Context, unsignedMessage *avalancheWarp.UnsignedMessage) error { messageID := hashing.ComputeHash256Array(unsignedMessage.Bytes()) // In the case when a node restarts, and possibly changes its bls key, the cache gets emptied but the database does not. @@ -55,7 +55,7 @@ func (w *warpBackend) AddMessage(ctx context.Context, unsignedMessage *teleporte } var signature [bls.SignatureLen]byte - sig, err := w.snowCtx.TeleporterSigner.Sign(unsignedMessage) + sig, err := w.snowCtx.WarpSigner.Sign(unsignedMessage) if err != nil { return fmt.Errorf("failed to sign warp message: %w", err) } @@ -75,13 +75,13 @@ func (w *warpBackend) GetSignature(ctx context.Context, messageID ids.ID) ([bls. return [bls.SignatureLen]byte{}, fmt.Errorf("failed to get warp message %s from db: %w", messageID.String(), err) } - unsignedMessage, err := teleporter.ParseUnsignedMessage(unsignedMessageBytes) + unsignedMessage, err := avalancheWarp.ParseUnsignedMessage(unsignedMessageBytes) if err != nil { return [bls.SignatureLen]byte{}, fmt.Errorf("failed to parse unsigned message %s: %w", messageID.String(), err) } var signature [bls.SignatureLen]byte - sig, err := w.snowCtx.TeleporterSigner.Sign(unsignedMessage) + sig, err := w.snowCtx.WarpSigner.Sign(unsignedMessage) if err != nil { return [bls.SignatureLen]byte{}, fmt.Errorf("failed to sign warp message: %w", err) } diff --git a/warp/backend_test.go b/warp/backend_test.go index c4449245f5..65e8b317f8 100644 --- a/warp/backend_test.go +++ b/warp/backend_test.go @@ -12,7 +12,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/avalanchego/utils/hashing" - "github.com/ava-labs/avalanchego/vms/platformvm/teleporter" + avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp" "github.com/stretchr/testify/require" ) @@ -28,11 +28,11 @@ func TestAddAndGetValidMessage(t *testing.T) { snowCtx := snow.DefaultContextTest() sk, err := bls.NewSecretKey() require.NoError(t, err) - snowCtx.TeleporterSigner = teleporter.NewSigner(sk, sourceChainID) + snowCtx.WarpSigner = avalancheWarp.NewSigner(sk, sourceChainID) backend := NewWarpBackend(snowCtx, db, 500) // Create a new unsigned message and add it to the warp backend. - unsignedMsg, err := teleporter.NewUnsignedMessage(sourceChainID, destinationChainID, payload) + unsignedMsg, err := avalancheWarp.NewUnsignedMessage(sourceChainID, destinationChainID, payload) require.NoError(t, err) err = backend.AddMessage(context.Background(), unsignedMsg) require.NoError(t, err) @@ -42,7 +42,7 @@ func TestAddAndGetValidMessage(t *testing.T) { signature, err := backend.GetSignature(context.Background(), messageID) require.NoError(t, err) - expectedSig, err := snowCtx.TeleporterSigner.Sign(unsignedMsg) + expectedSig, err := snowCtx.WarpSigner.Sign(unsignedMsg) require.NoError(t, err) require.Equal(t, expectedSig, signature[:]) } @@ -51,7 +51,7 @@ func TestAddAndGetUnknownMessage(t *testing.T) { db := memdb.New() backend := NewWarpBackend(snow.DefaultContextTest(), db, 500) - unsignedMsg, err := teleporter.NewUnsignedMessage(sourceChainID, destinationChainID, payload) + unsignedMsg, err := avalancheWarp.NewUnsignedMessage(sourceChainID, destinationChainID, payload) require.NoError(t, err) // Try getting a signature for a message that was not added. @@ -66,13 +66,13 @@ func TestZeroSizedCache(t *testing.T) { snowCtx := snow.DefaultContextTest() sk, err := bls.NewSecretKey() require.NoError(t, err) - snowCtx.TeleporterSigner = teleporter.NewSigner(sk, sourceChainID) + snowCtx.WarpSigner = avalancheWarp.NewSigner(sk, sourceChainID) // Verify zero sized cache works normally, because the lru cache will be initialized to size 1 for any size parameter <= 0. backend := NewWarpBackend(snowCtx, db, 0) // Create a new unsigned message and add it to the warp backend. - unsignedMsg, err := teleporter.NewUnsignedMessage(sourceChainID, destinationChainID, payload) + unsignedMsg, err := avalancheWarp.NewUnsignedMessage(sourceChainID, destinationChainID, payload) require.NoError(t, err) err = backend.AddMessage(context.Background(), unsignedMsg) require.NoError(t, err) @@ -82,7 +82,7 @@ func TestZeroSizedCache(t *testing.T) { signature, err := backend.GetSignature(context.Background(), messageID) require.NoError(t, err) - expectedSig, err := snowCtx.TeleporterSigner.Sign(unsignedMsg) + expectedSig, err := snowCtx.WarpSigner.Sign(unsignedMsg) require.NoError(t, err) require.Equal(t, expectedSig, signature[:]) } diff --git a/warp/handlers/signature_request_test.go b/warp/handlers/signature_request_test.go index fa2d53664d..4c47ead388 100644 --- a/warp/handlers/signature_request_test.go +++ b/warp/handlers/signature_request_test.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/avalanchego/utils/hashing" - "github.com/ava-labs/avalanchego/vms/platformvm/teleporter" + avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp" "github.com/ava-labs/subnet-evm/plugin/evm/message" "github.com/ava-labs/subnet-evm/warp" "github.com/ava-labs/subnet-evm/warp/handlers/stats" @@ -26,10 +26,10 @@ func TestSignatureHandler(t *testing.T) { blsSecretKey, err := bls.NewSecretKey() require.NoError(t, err) - snowCtx.TeleporterSigner = teleporter.NewSigner(blsSecretKey, snowCtx.ChainID) + snowCtx.WarpSigner = avalancheWarp.NewSigner(blsSecretKey, snowCtx.ChainID) warpBackend := warp.NewWarpBackend(snowCtx, database, 100) - msg, err := teleporter.NewUnsignedMessage(snowCtx.ChainID, snowCtx.CChainID, []byte("test")) + msg, err := avalancheWarp.NewUnsignedMessage(snowCtx.ChainID, snowCtx.CChainID, []byte("test")) require.NoError(t, err) messageID := hashing.ComputeHash256Array(msg.Bytes()) From 804062364e053ec09b37a0d0ccdc855565dce0d9 Mon Sep 17 00:00:00 2001 From: aaronbuchwald Date: Tue, 21 Feb 2023 13:12:55 -0800 Subject: [PATCH 2/3] Bump AvalancheGo dep to v1.9.9 (#530) --- go.mod | 2 +- go.sum | 4 ++-- scripts/versions.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 9aafcadced..959f89b594 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/VictoriaMetrics/fastcache v1.10.0 - github.com/ava-labs/avalanchego v1.9.9-rc.4 + github.com/ava-labs/avalanchego v1.9.9 github.com/cespare/cp v0.1.0 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set v1.8.0 diff --git a/go.sum b/go.sum index 7df5146f0e..079a2539f6 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/ava-labs/avalanchego v1.9.9-rc.4 h1:3KUGKGZ4+tcLz+E5jz3e+Ah6VDcLenv9fSwHiG8gTwg= -github.com/ava-labs/avalanchego v1.9.9-rc.4/go.mod h1:mnM/wzJIaKXzLV323Yh0EbLtsicoaFSgaDESrED9dr0= +github.com/ava-labs/avalanchego v1.9.9 h1:R7GBCjFBC/taZeJNJ4MtdniifC7j9eLwRezhCGa/wmc= +github.com/ava-labs/avalanchego v1.9.9/go.mod h1:mnM/wzJIaKXzLV323Yh0EbLtsicoaFSgaDESrED9dr0= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= diff --git a/scripts/versions.sh b/scripts/versions.sh index 17d45440fb..32b7d83c31 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -3,7 +3,7 @@ # Set up the versions to be used - populate ENV variables only if they are not already populated SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-'v0.4.9'} # Don't export them as they're used in the context of other calls -AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.9.9-rc.4'} +AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.9.9'} GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'} # This won't be used, but it's here to make code syncs easier From 22d56f108c42baccd1332ebfb810f20e5ad76425 Mon Sep 17 00:00:00 2001 From: aaronbuchwald Date: Tue, 21 Feb 2023 13:20:35 -0800 Subject: [PATCH 3/3] Update AvalancheGo compatibility (#531) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1240d1757..bd4ff40d63 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,8 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and [v0.4.5] AvalancheGo@v1.9.4 (Protocol Version: 20) [v0.4.6] AvalancheGo@v1.9.4 (Protocol Version: 20) [v0.4.7] AvalancheGo@v1.9.5 (Protocol Version: 21) -[v0.4.8] AvalancheGo@v1.9.6-v1.9.7 (Protocol Version: 22) +[v0.4.8] AvalancheGo@v1.9.6-v1.9.8 (Protocol Version: 22) +[v0.4.9] AvalancheGo@v1.9.9 (Protocol Version: 23) ``` ## API