Repository navigation
Conversation
davidiw
commented
Oct 29, 2026
Comment on lines
+956
to
+979
| update_network_and_fullnode_addresses_internal(stake_pool, pool_address, new_network_addresses, new_fullnode_addresses); | ||
| } | ||
|
|
||
| /// Update validator addresses using core resources. This only takes effect in the next epoch. | ||
| /// Address bytes use the same encoding as the operator entry function. | ||
| public entry fun update_network_and_fullnode_addresses_by_core_resources( | ||
| core_resources: &signer, | ||
| pool_address: address, | ||
| new_network_addresses: vector<u8>, | ||
| new_fullnode_addresses: vector<u8>, | ||
| ) acquires StakePool, ValidatorConfig { | ||
| system_addresses::assert_core_resource(core_resources); | ||
| assert_reconfig_not_in_progress(); | ||
| assert_stake_pool_exists(pool_address); | ||
| let stake_pool = borrow_global_mut<StakePool>(pool_address); | ||
| update_network_and_fullnode_addresses_internal(stake_pool, pool_address, new_network_addresses, new_fullnode_addresses); | ||
| } | ||
|
|
||
| fun update_network_and_fullnode_addresses_internal( | ||
| stake_pool: &mut StakePool, | ||
| pool_address: address, | ||
| new_network_addresses: vector<u8>, | ||
| new_fullnode_addresses: vector<u8>, | ||
| ) acquires ValidatorConfig { |
Author
There was a problem hiding this comment.
This is the core change, the rest is tests
5 tasks done
davidiw
added a commit
that referenced
this pull request
Oct 29, 2026
## 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 - [x] New feature - [x] Documentation update - [x] Tests ## Which Components or Systems Does This Change Impact? - [x] Aptos Framework - [x] Aptos CLI/SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #443, which targets the active public development branch,
m1.Description
Adds
stake::update_network_and_fullnode_addresses_by_core_resources(&signer, address, vector<u8>, vector<u8>)as an entry function. It usessystem_addresses::assert_core_resource, preserves the operator path's reconfiguration and resource checks, and shares the existing address mutation/event implementation by passing the validated mutableStakePoolreference into the helper. The current validator set retains its addresses until the next epoch.Adds an offline host-swap helper using canonical BCS
Vec<NetworkAddress>decoding. It changes one selected host while retaining the TCP port, Noise IK public key, handshake version and other addresses. Usage is documented in the example. Generated stake documentation and SDK bindings include the new entry function.How Has This Been Tested?
pre-commiton affected source files andgit diff --checkpass.e296d877b2b04b4593301b0ec2c1ded44382d499with no blockers.Key Areas to Review
The new entry must grant only core resources access while keeping the existing operator authorization checks. The reconfiguration guard covers the asynchronous DKG interval, which can span transactions; the existence check preserves the explicit missing-pool error before borrowing. The shared mutation changes only the two address fields and existing event state; active validator discovery changes at the next epoch. Helper output is encoded address bytes for review and does not submit a transaction.
Type of Change
Which Components or Systems Does This Change Impact?