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

Prevent unnecessary bandwidth from activated ACPs #3031

Merged
merged 7 commits into from
May 21, 2024
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
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](
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we missed this during a release... I'm not familiar with how we do releases but it feels like we might need to create/update some documentation so we don't miss this again in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's always going to be some lag since the ACPs will only be activated after the majority of the network chooses to activate it... not super sure how to go about this in AvalancheGo

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]()
)
Loading