Skip to content

Commit

Permalink
Disable p2p sdk push re-gossip
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Feb 23, 2024
1 parent c60f7d2 commit 9d01c51
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
12 changes: 12 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release Notes

## [v1.11.1](https://github.com/ava-labs/avalanchego/releases/tag/v1.11.1)

This version is backwards compatible to [v1.10.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.0). It is optional, but encouraged.

The plugin version is unchanged at `33` and is compatible with version `v1.11.0`.

### Fixes

- Suspended transaction re-push gossip in the p2p SDK

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.11.0...v1.11.1

## [v1.11.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.11.0)

This upgrade consists of the following Avalanche Community Proposals (ACPs):
Expand Down
2 changes: 2 additions & 0 deletions network/p2p/gossip/gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ func TestPushGossiper(t *testing.T) {
// Tests that gossip to a peer should forward the gossip if it was not
// previously known
func TestPushGossipE2E(t *testing.T) {
t.SkipNow()

require := require.New(t)

// tx known by both the sender and the receiver which should not be
Expand Down
11 changes: 1 addition & 10 deletions network/p2p/gossip/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (h Handler[T]) AppRequest(_ context.Context, _ ids.NodeID, _ time.Time, req
return MarshalAppResponse(gossipBytes)
}

func (h Handler[_]) AppGossip(ctx context.Context, nodeID ids.NodeID, gossipBytes []byte) {
func (h Handler[_]) AppGossip(_ context.Context, nodeID ids.NodeID, gossipBytes []byte) {
gossip, err := ParseAppGossip(gossipBytes)
if err != nil {
h.log.Debug("failed to unmarshal gossip", zap.Error(err))
Expand All @@ -123,16 +123,7 @@ func (h Handler[_]) AppGossip(ctx context.Context, nodeID ids.NodeID, gossipByte
zap.Stringer("id", gossipable.GossipID()),
zap.Error(err),
)
continue
}

// continue gossiping messages we have not seen to other peers
h.accumulator.Add(gossipable)
}

if err := h.accumulator.Gossip(ctx); err != nil {
h.log.Error("failed to forward gossip", zap.Error(err))
return
}

receivedCountMetric, err := h.metrics.receivedCount.GetMetricWith(pushLabels)
Expand Down
3 changes: 2 additions & 1 deletion version/compatibility.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"33": [
"v1.11.0"
"v1.11.0",
"v1.11.1"
],
"31": [
"v1.10.18",
Expand Down
2 changes: 1 addition & 1 deletion version/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
Current = &Semantic{
Major: 1,
Minor: 11,
Patch: 0,
Patch: 1,
}
CurrentApp = &Application{
Name: Client,
Expand Down

0 comments on commit 9d01c51

Please sign in to comment.