diff --git a/go.mod b/go.mod index fb7fb410a9..72b82932ec 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.7 + github.com/ava-labs/avalanchego v1.9.8 github.com/cespare/cp v0.1.0 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set v1.8.0 @@ -27,7 +27,7 @@ require ( github.com/onsi/gomega v1.24.2 github.com/prometheus/client_golang v1.14.0 github.com/prometheus/client_model v0.3.0 - github.com/rjeczalik/notify v0.9.2 + github.com/rjeczalik/notify v0.9.3 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/cast v1.5.0 github.com/spf13/pflag v1.0.5 @@ -94,6 +94,7 @@ require ( github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.1 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect + github.com/pires/go-proxyproto v0.6.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/common v0.37.0 // indirect diff --git a/go.sum b/go.sum index eac7c26609..0b4e002aee 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.7 h1:f2vS8jUBZmrqPcfU5NEa7dSHXbKfTB0EyjcCyvqxqPw= -github.com/ava-labs/avalanchego v1.9.7/go.mod h1:ckdSQHeoRN6PmQ3TLgWAe6Kh9tFpU4Lu6MgDW4GrU/Q= +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/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= @@ -465,6 +465,8 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8= +github.com/pires/go-proxyproto v0.6.2/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -503,8 +505,8 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= -github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= +github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= diff --git a/plugin/evm/gossiper.go b/plugin/evm/gossiper.go index 300958b78d..bc19021ebf 100644 --- a/plugin/evm/gossiper.go +++ b/plugin/evm/gossiper.go @@ -62,7 +62,7 @@ type pushGossiper struct { // [recentTxs] prevent us from over-gossiping the // same transaction in a short period of time. - recentTxs *cache.LRU + recentTxs *cache.LRU[common.Hash, interface{}] codec codec.Manager signer types.Signer @@ -86,7 +86,7 @@ func (vm *VM) createGossiper(stats GossipStats) Gossiper { txsToGossip: make(map[common.Hash]*types.Transaction), shutdownChan: vm.shutdownChan, shutdownWg: &vm.shutdownWg, - recentTxs: &cache.LRU{Size: recentCacheSize}, + recentTxs: &cache.LRU[common.Hash, interface{}]{Size: recentCacheSize}, codec: vm.networkCodec, signer: types.LatestSigner(vm.blockChain.Config()), stats: stats, diff --git a/plugin/evm/warp/backend.go b/plugin/evm/warp/backend.go index ac865daf51..7e973105ab 100644 --- a/plugin/evm/warp/backend.go +++ b/plugin/evm/warp/backend.go @@ -31,7 +31,7 @@ type WarpBackend interface { type warpBackend struct { db database.Database snowCtx *snow.Context - signatureCache *cache.LRU + signatureCache *cache.LRU[ids.ID, []byte] } // NewWarpBackend creates a new WarpBackend, and initializes the signature cache and message tracking database. @@ -39,7 +39,7 @@ func NewWarpBackend(snowCtx *snow.Context, db database.Database, signatureCacheS return &warpBackend{ db: db, snowCtx: snowCtx, - signatureCache: &cache.LRU{Size: signatureCacheSize}, + signatureCache: &cache.LRU[ids.ID, []byte]{Size: signatureCacheSize}, } } @@ -64,7 +64,7 @@ func (w *warpBackend) AddMessage(ctx context.Context, unsignedMessage *teleporte func (w *warpBackend) GetSignature(ctx context.Context, messageID ids.ID) ([]byte, error) { if sig, ok := w.signatureCache.Get(messageID); ok { - return sig.([]byte), nil + return sig, nil } unsignedMessageBytes, err := w.db.Get(messageID[:]) @@ -82,6 +82,6 @@ func (w *warpBackend) GetSignature(ctx context.Context, messageID ids.ID) ([]byt return nil, fmt.Errorf("failed to sign warp message: %w", err) } - w.signatureCache.Put(messageID[:], signature) + w.signatureCache.Put(messageID, signature) return signature, nil } diff --git a/scripts/versions.sh b/scripts/versions.sh index 4572877092..708a8c549a 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.7'} +AVALANCHEGO_VERSION=${AVALANCHE_VERSION:-'v1.9.8'} GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'} # This won't be used, but it's here to make code syncs easier