serviceability: delete migrate_interfaces processor and instruction#3675
Merged
serviceability: delete migrate_interfaces processor and instruction#3675
Conversation
ben-dz
reviewed
May 5, 2026
ben-dz
reviewed
May 5, 2026
ben-dz
reviewed
May 5, 2026
Remove the `MigrateDeviceInterfaces` instruction (variant 111), its processor, and integration tests. `Device::TryFrom<&[u8]>` (#3665) auto-promotes legacy `interfaces` into `new_interfaces` when the trailing vec is missing, and the next account write persists the promoted vec, so a standalone migrate step is no longer needed. Also rewords two stale `MigrateDeviceInterfaces` doc comments in the Go SDK. Closes #3662
Per review: keep variant 111 in DoubleZeroInstruction so the slot is not reused for a future instruction. Variant 111 unpacks into `Deprecated111()` and dispatches to a no-op (auto-promotion on read is what actually performs the migration); name_string and get_args return "Deprecated111" / empty string respectively.
8c1bbee to
27a4435
Compare
ben-dz
approved these changes
May 5, 2026
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.
Summary
MigrateDeviceInterfacesinstruction (variant 111), its processor, and integration tests.Device::TryFrom<&[u8]>(landed in smartcontract: append new_interfaces vec to Device with custom serializer #3667 / serviceability: add new_interfaces vec to Device with custom serializer #3665) auto-promotes legacyinterfacesintonew_interfaceswhen the trailing vec is missing, and the next account write persists the promoted vec — so a standalone migrate step is no longer needed.MigrateDeviceInterfacesdoc comments in the Go SDK (serviceability/deserialize.go,serviceability/state.go); the Go SDK has no caller of this instruction, only stale references.Smartcontractbullet to theUnreleasedCHANGELOG.This is the cleanup step in the forward-compatible Device interfaces refactor (design: https://gist.github.com/elitegreg/e1d27c97034656a980fa8d7628ae16c5, Design #5 final bullet). Stack: #3666 → #3667 → this PR.
Closes #3662.
Testing Verification
make rust-fmt,make rust-lint, andcargo test -p doublezero-serviceabilityall pass; legacy-account compatibility paths (test_state_compatibility_device,test_device_legacy_account_rebuilds_new_vec,test_device_serialize_keeps_vecs_in_sync) still cover the auto-promotion behavior that replaces this instruction.go build ./...andgo vet ./...pass forsmartcontract/sdk/goafter the comment rewrites.grepforMigrateDeviceInterfaces/migrate_device_interfaces/migrate_interfacesreturns only the (intentional) historical and new CHANGELOG entries.