Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop outbound gossip for non vdrs #862

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/VictoriaMetrics/fastcache v1.10.0
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825150237-723bc7b31724
github.com/ava-labs/avalanchego v1.10.10-rc.2
github.com/ava-labs/avalanchego v1.10.10-rc.4
github.com/cespare/cp v0.1.0
github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811
github.com/davecgh/go-spew v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825150237-723bc7b31724 h1:ptqFgQtJ5DyLb2lvuvawLJNlvo1A1qv+JXYTneNeg14=
github.com/ava-labs/avalanche-network-runner v1.7.2-0.20230825150237-723bc7b31724/go.mod h1:euKHwZ77sGvGfhVj4v9WPM4jD2b5N80ldE2XHqO7lwA=
github.com/ava-labs/avalanchego v1.10.10-rc.2 h1:nlHc1JwKb5TEc9oqPU2exvOpazhxr11N2ym/LzYxv4k=
github.com/ava-labs/avalanchego v1.10.10-rc.2/go.mod h1:BN97sZppDSvIMIfEjrLTjdPTFkGLkb0ISJHEcoxMMNk=
github.com/ava-labs/avalanchego v1.10.10-rc.4 h1:1oxQf1boQDliJspfGBqsYsqg91d4F3qiFTnwnp+EruY=
github.com/ava-labs/avalanchego v1.10.10-rc.4/go.mod h1:BN97sZppDSvIMIfEjrLTjdPTFkGLkb0ISJHEcoxMMNk=
github.com/ava-labs/coreth v0.12.5-rc.3 h1:cpmC+fSZMsO4gaFWqXHzAHrJACf05u5HPAYmwh7nmkU=
github.com/ava-labs/coreth v0.12.5-rc.3/go.mod h1:HI+jTIflnDFBd0bledgkgid1Uurwr8q1h7zb3LsFsSo=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
Expand Down
13 changes: 9 additions & 4 deletions plugin/evm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ const (
maxValidatorSetStaleness = time.Minute
throttlingPeriod = 10 * time.Second
throttlingLimit = 2
gossipFrequency = 10 * time.Second
)

var (
txGossipConfig = gossip.Config{
Namespace: "eth_tx_gossip",
Frequency: 10 * time.Second,
PollSize: 10,
}
txGossipHandlerConfig = gossip.HandlerConfig{
Expand Down Expand Up @@ -697,8 +697,8 @@ func (vm *VM) initBlockBuilding() error {
if err != nil {
return err
}

txGossiper, err := gossip.NewGossiper[GossipTx, *GossipTx](
var ethTxGossiper gossip.Gossiper
ethTxGossiper, err = gossip.NewPullGossiper[GossipTx, *GossipTx](
txGossipConfig,
vm.ctx.Log,
txPool,
Expand All @@ -708,10 +708,15 @@ func (vm *VM) initBlockBuilding() error {
if err != nil {
return err
}
txGossiper := gossip.ValidatorGossiper{
Gossiper: ethTxGossiper,
NodeID: vm.ctx.NodeID,
Validators: vm.validators,
}

vm.shutdownWg.Add(1)
go func() {
txGossiper.Gossip(ctx)
gossip.Every(ctx, vm.ctx.Log, txGossiper, gossipFrequency)
vm.shutdownWg.Done()
}()

Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Don't export them as they're used in the context of other calls
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.10.10-rc.2'}
AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.10.10-rc.4'}
AVALANCHEGO_VERSION=${AVALANCHEGO_VERSION:-$AVALANCHE_VERSION}
GINKGO_VERSION=${GINKGO_VERSION:-'v2.2.0'}

Expand Down