Skip to content

Allow core resources to update validator network addresses - #443

Merged
davidiw merged 1 commit into
m1from
feat/core-resource-network-addresses-m1
Oct 29, 2026
Merged

davidiw merged 1 commit into
m1from
feat/core-resource-network-addresses-m1

Conversation

@davidiw

@davidiw davidiw commented Oct 29, 2026 •

Copy link
Copy Markdown

Description

Adds stake::update_network_and_fullnode_addresses_by_core_resources(&signer, address, vector<u8>, vector<u8>) as an entry function. It uses the canonical core-resources guard, including decommission enforcement, and shares the operator's mutation/events. Both entry functions pass the validated &mut StakePool into the helper. Authorization, resource errors and reconfiguration guards retain their existing ordering; validator-set activation remains at the next epoch.

Adds an offline host-swap helper using canonical BCS Vec<NetworkAddress> decoding. It changes one selected host while preserving its port, Noise IK key, handshake version and other addresses. Generated SDK bindings and documentation include the new entry function.

Targets the public repository's active development branch, m1, and supersedes #442. This branch contains one feature commit directly on public m1; it includes no deployment changes.

How Has This Been Tested?

  • Eight new Move tests pass on this base: caller restriction, decommissioning, missing pool, reconfiguration, other-field preservation, both event formats, empty fullnode bytes and next-epoch activation.
  • Affected-source pre-commit and git diff --check pass.
  • Three host-helper tests and two existing operator/delegation Move regressions pass.
  • The signed-entry regression passes with both allowlists enabled and empty membership lists.
  • Independent security/correctness review completed on 7f93558674213c0d54e3d377a03699cdb2a9dbaf with no blockers.
  • CI is pending.
  • Full regression suites and formal verification have not been run.

Key Areas to Review

Only core resources may use the new entry; the existing operator path keeps its permission and operator-address checks. Shared mutation receives the pool reference and changes only the two address fields and existing event state. The reconfiguration guard covers the asynchronous DKG interval, which can span transactions. The host helper never signs or submits transactions.

Type of Change

  • New feature
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Aptos Framework
  • Aptos CLI/SDK

@Primata Primata left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving. The core-resources entry (stake.move:877-900) leaves the operator path unchanged: same checks, same order, then the shared helper. The new path uses the standard system_addresses::assert_core_resource guard, so it stops working once DECOMMISSION_CORE_RESOURCES is enabled. The helper writes only the two address fields and emits the existing event in both formats, and the change takes effect next epoch, as on the operator path. The eight new Move tests pass locally.

One note for the rotation itself: all four mainnet validators currently advertise AWS-generated load balancer names (*.elb.us-east-1.amazonaws.com) for both their validator and fullnode addresses. Those names go away with the load balancer, which is what pins the nodes. If this rotation points them at names on a domain we control, later host moves become DNS record changes, because nodes resolve the name on every dial, and the helper already accepts /dns/... replacements. An on-chain update would then only be needed to change a port or a node's network identity key, so moving nodes would no longer depend on core resources once DECOMMISSION_CORE_RESOURCES is enabled.

@rubujubi

Copy link
Copy Markdown
Collaborator

lgtm

@davidiw
davidiw merged commit c674d62 into m1 Oct 29, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants