Skip to content

Add atomic code upgrade test coverage#7973

Draft
Copilot wants to merge 15 commits into
mainfrom
copilot/add-test-for-atomic-code-upgrade
Draft

Add atomic code upgrade test coverage#7973
Copilot wants to merge 15 commits into
mainfrom
copilot/add-test-for-atomic-code-upgrade

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #3390.

CCF supports replacing an old node set with a non-overlapping new node set via one governance reconfiguration proposal. This adds coverage and docs for that atomic code upgrade path.

  • Atomic reconfiguration helper
    • Added Consortium.replace_nodes() to trust multiple pending nodes and retire multiple existing nodes in one proposal.
    • Kept replace_node() as the single-node wrapper.
network.consortium.replace_nodes(
    primary,
    old_nodes,
    new_nodes,
    valid_from=valid_from,
)
  • Code upgrade test

    • Added test_update_all_nodes_atomically().
    • Starts a full replacement node set with the new package.
    • Submits one proposal containing all transition_node_to_trusted and remove_node actions.
    • Waits for primary election among the new nodes, then removes retired old nodes.
    • Preserves sequential upgrade coverage by upgrading back afterward.
  • Operations documentation

    • Documented the atomic alternative in the code upgrade procedure.
    • Clarified that new nodes should remain pending until the atomic proposal is submitted.

Copilot AI and others added 10 commits June 24, 2026 21:00
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test for atomic code upgrade Add atomic code upgrade test coverage Jun 24, 2026
Copilot AI requested a review from achamayou June 24, 2026 21:09
@achamayou

Copy link
Copy Markdown
Member

@copilot check code format and drop the reference to #1713, that's been addressed long ago.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot check code format and drop the reference to #1713, that's been addressed long ago.

Addressed in a870d10. I re-ran the targeted Python format check and removed the stale #1713 references from the updated code path.

@achamayou

Copy link
Copy Markdown
Member

@copilot look at the last complete Virtual C test and fix the failure. Don't forget to format the code.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI requested a review from achamayou June 27, 2026 08:35
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.

Add test for atomic code upgrade

2 participants