Skip to content

Commit

Permalink
Prevent unnecessary bandwidth from activated ACPs (#3031)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu authored May 21, 2024
1 parent 301f14d commit 6a894d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ func getNetworkConfig(
// peers that we support these upgrades.
supportedACPs.Union(constants.ScheduledACPs)

// To decrease unnecessary network traffic, peers will not be notified of
// objection or support of activated ACPs.
supportedACPs.Difference(constants.ActivatedACPs)
objectedACPs.Difference(constants.ActivatedACPs)

config := network.Config{
ThrottlerConfig: network.ThrottlerConfig{
MaxInboundConnsPerSec: maxInboundConnsPerSec,
Expand Down
23 changes: 10 additions & 13 deletions utils/constants/acps.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package constants
import "github.com/ava-labs/avalanchego/utils/set"

var (
// CurrentACPs is the set of ACPs that are currently, at the time of
// release, marked as implementable and not activated.
// ActivatedACPs is the set of ACPs that are activated.
//
// See: https://github.com/orgs/avalanche-foundation/projects/1
CurrentACPs = set.Of[uint32](
ActivatedACPs = set.Of[uint32](
23, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/23-p-chain-native-transfers/README.md
24, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/24-shanghai-eips/README.md
25, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/25-vm-application-errors/README.md
Expand All @@ -20,14 +19,12 @@ var (
62, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/62-disable-addvalidatortx-and-adddelegatortx/README.md
)

// ScheduledACPs are the ACPs incuded into the next upgrade.
ScheduledACPs = set.Of[uint32](
23, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/23-p-chain-native-transfers/README.md
24, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/24-shanghai-eips/README.md
25, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/25-vm-application-errors/README.md
30, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/30-avalanche-warp-x-evm/README.md
31, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/31-enable-subnet-ownership-transfer/README.md
41, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/41-remove-pending-stakers/README.md
62, // https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/62-disable-addvalidatortx-and-adddelegatortx/README.md
)
// CurrentACPs is the set of ACPs that are currently, at the time of
// release, marked as implementable and not activated.
//
// See: https://github.com/orgs/avalanche-foundation/projects/1
CurrentACPs = set.Of[uint32]()

// ScheduledACPs are the ACPs included into the next upgrade.
ScheduledACPs = set.Of[uint32]()
)

0 comments on commit 6a894d0

Please sign in to comment.