Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented Aug 13, 2025

Make node migration idempotent by preventing re-registration of nodes with existing public keys in the blockchain registry

The migrateNodes CLI command now connects to the blockchain RPC to fetch existing registry nodes and passes both desired and existing nodes to the migrator. The migrator.WriteToRegistry function checks for existing nodes by matching SigningKeyPub and only adds them to the network instead of re-registering them, while new nodes are still added to the registry and optionally added to the network based on InCanonicalNetwork status.

📍Where to Start

Start with the migrateNodes CLI command changes in cmd/cli/main.go to understand how the migration process now fetches existing nodes from the blockchain registry.


Macroscope summarized 303319f.

@mkysel mkysel requested a review from a team as a code owner August 13, 2025 17:49
@graphite-app
Copy link

graphite-app bot commented Aug 13, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@mkysel mkysel merged commit eb2d88d into main Aug 15, 2025
10 checks passed
@mkysel mkysel deleted the mkysel/idempotent-migration branch August 15, 2025 15:19
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