Skip to content

Commit

Permalink
Merge pull request #336 from ava-labs/update-avalanchego-version
Browse files Browse the repository at this point in the history
Add test message implementation + update avalanchego version
  • Loading branch information
patrick-ogrady authored Nov 4, 2022
2 parents 66d51b0 + 35be10c commit 67d6a5b
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 19 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.4
1.3.1
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/ava-labs/avalanche-network-runner
go 1.18

require (
github.com/ava-labs/avalanchego v1.9.1
github.com/ava-labs/coreth v0.11.1-rc.7
github.com/ava-labs/avalanchego v1.9.2
github.com/ava-labs/coreth v0.11.2-rc.0
github.com/ethereum/go-ethereum v1.10.25
github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0
github.com/onsi/ginkgo/v2 v2.4.0
Expand All @@ -27,7 +27,7 @@ require (
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/aead/siphash v1.0.1 // indirect
github.com/ava-labs/avalanche-ledger-go v0.0.10 // indirect
github.com/ava-labs/avalanche-ledger-go v0.0.11 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd v0.23.1 // indirect
Expand All @@ -48,7 +48,7 @@ require (
github.com/decred/dcrd/lru v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down Expand Up @@ -118,7 +118,7 @@ require (
github.com/tyler-smith/go-bip39 v1.0.2 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d // indirect
github.com/zondax/ledger-go v0.13.0 // indirect
go.opentelemetry.io/otel v1.11.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 // indirect
Expand Down
20 changes: 11 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
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/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/ava-labs/avalanche-ledger-go v0.0.10 h1:qEiTJvjuEmTYhYczk/CYvXoQuLlgd7xYyC2OcXOhAlw=
github.com/ava-labs/avalanche-ledger-go v0.0.10/go.mod h1:60Ftil/0sHi8IwjvBFyrvRsPVAue8zAkIMGuvXXMwVM=
github.com/ava-labs/avalanchego v1.9.1 h1:TJLvoA5kHAwsaBG80x57hCMnwJYWFDnHOoI/fw+Off8=
github.com/ava-labs/avalanchego v1.9.1/go.mod h1:EwV2l8rFtFObM9jKwAWX2uhDkUw9UEGkUlXo3ICG1yk=
github.com/ava-labs/coreth v0.11.1-rc.7 h1:cENs+9K/aLyRbvB7fa6JDOvKert3DAdsBfCNQBU5U9Y=
github.com/ava-labs/coreth v0.11.1-rc.7/go.mod h1:VBJEpNMEGphnEZ6KjsX43g2fq5v+pupk8xFQSdqXwyM=
github.com/ava-labs/avalanche-ledger-go v0.0.11 h1:AZ2cKEZ1noMZPCLvjyl/33LBu2u/ESgolr661epH0Ak=
github.com/ava-labs/avalanche-ledger-go v0.0.11/go.mod h1:ZU0gQAFDbyKV2WiBxsvvuigJbKgxVjWn509ajTYozT0=
github.com/ava-labs/avalanchego v1.9.2 h1:cMjFqnnePfx+Hq94j89B3EcWr3r5eORt/EnmZbBoYdc=
github.com/ava-labs/avalanchego v1.9.2/go.mod h1:ezcsL6vzAu1eL3Ws8QNobEAqadXFCheEogk1d2+bir4=
github.com/ava-labs/coreth v0.11.2-rc.0 h1:aK6Hd9I9t3FTqgofgPK5ZYFp8wfHzrUT/Aj4HtBRbTA=
github.com/ava-labs/coreth v0.11.2-rc.0/go.mod h1:gLc+jBTJXfoSyhBP6x6BU7/Tq1K4ptj5/y6T7qgmyyA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -151,8 +151,9 @@ github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays=
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down Expand Up @@ -493,8 +494,8 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ
github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg=
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d h1:0x2GQWgIP6+XAitVxzflRLcGOhnuEbhaBotwTbmpfMk=
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo=
github.com/zondax/ledger-go v0.13.0 h1:3brWtvAlfKqpe27JSUC/t1f0CvVVOX8zR/f/3+ShPBY=
github.com/zondax/ledger-go v0.13.0/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down Expand Up @@ -709,6 +710,7 @@ golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBc
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.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
2 changes: 1 addition & 1 deletion local/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (node *localNode) SendOutboundMessage(ctx context.Context, peerID string, c
if !ok {
return false, fmt.Errorf("peer with ID %s is not attached here", peerID)
}
msg := message.NewTestMsg(message.Op(op), content, false)
msg := NewTestMsg(message.Op(op), content, false)
return attachedPeer.Send(ctx, msg), nil
}

Expand Down
6 changes: 3 additions & 3 deletions local/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ func TestAttachPeer(t *testing.T) {

// Expect the peer to send these messages in this order.
expectedMessages := []message.Op{
message.Version,
message.PeerList,
message.Chits,
message.VersionOp,
message.PeerListOp,
message.ChitsOp,
}

// [p] define below will write to/read from [peerConn]
Expand Down
24 changes: 24 additions & 0 deletions local/test_message.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package local

import "github.com/ava-labs/avalanchego/message"

var _ message.OutboundMessage = &TestMsg{}

type TestMsg struct {
op message.Op
bytes []byte
bypassThrottling bool
}

func NewTestMsg(op message.Op, bytes []byte, bypassThrottling bool) *TestMsg {
return &TestMsg{
op: op,
bytes: bytes,
bypassThrottling: bypassThrottling,
}
}

func (m *TestMsg) BypassThrottling() bool { return m.bypassThrottling }
func (m *TestMsg) Op() message.Op { return m.op }
func (m *TestMsg) Bytes() []byte { return m.bytes }
func (*TestMsg) BytesSavedCompression() int { return 0 }
1 change: 1 addition & 0 deletions scripts/tests.e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if ! [[ "$0" =~ scripts/tests.e2e.sh ]]; then
exit 255
fi

# TODO: update when new subnet-evm release is out
DEFAULT_VERSION_1=1.9.0
DEFAULT_VERSION_2=1.9.0
DEFAULT_SUBNET_EVM_VERSION=0.4.0
Expand Down

0 comments on commit 67d6a5b

Please sign in to comment.