Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
- Add forward-compatible `NewInterface` struct in `state/interface.rs` with a `size: u16` + `version: u8` on-disk prefix, V3-shaped body, and `flex_algo_node_segments`. Older readers can use the size prefix to skip past unknown future versions in constant time. Additive only — no callers, processors, or SDKs change in this PR ([#3666](https://github.com/malbeclabs/doublezero/pull/3666))
- Append `new_interfaces: Vec<NewInterface>` to `Device` after `max_multicast_publishers`, behind a custom `BorshSerialize` that projects the on-disk legacy `interfaces` slot from `new_interfaces` (always `Interface::V2` per #3653) and writes `new_interfaces` at the end of the layout. Legacy accounts with no trailing bytes deserialize cleanly: `Device::try_from` rebuilds `new_interfaces` from the legacy enum vec via per-variant `TryFrom`. Older readers continue to parse the legacy slot at its existing offset; newer readers gain forward-compat via the trailing vec. Mutations now go through `Device::replace_interface` / `push_interface` / `remove_interface` so both vecs stay in sync; `find_interface` returns `&NewInterface` and `find_interface_legacy` is a temporary helper for unrelated callers ([#3665](https://github.com/malbeclabs/doublezero/pull/3665))
- Migrate serviceability processors (`device/interface/{create,update,activate,delete,reject,remove,unlink}`, `link/{accept,activate,closeaccount,create,delete,update}`, `topology/backfill`) to read and mutate `Device::new_interfaces` directly. `device.interfaces` is no longer touched in `processors/`, and `Device::push_interface` now takes a `NewInterface`. `BackfillTopology` no longer mirrors `flex_algo_node_segments` into the legacy in-memory `interfaces` vec — segments live only in `new_interfaces` and are intentionally dropped on the V2-projected on-disk legacy slot ([#3658](https://github.com/malbeclabs/doublezero/issues/3658))
- Delete the `MigrateDeviceInterfaces` processor and integration tests from the serviceability program. `Device::TryFrom<&[u8]>` (#3665) now auto-promotes legacy `interfaces` into `new_interfaces` when the trailing vec is missing, and the next account write persists the promoted vec — no standalone migration step is needed. Variant 111 is retained as a `Deprecated111()` tombstone (no-op dispatch, slot reserved so it isn't reused) for compatibility with older clients still emitting the old discriminator ([#3662](https://github.com/malbeclabs/doublezero/issues/3662))

## [v0.21.0](https://github.com/malbeclabs/doublezero/compare/client/v0.20.0...client/v0.21.0) - 2026-05-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use crate::{
reject::process_reject_device_interface, remove::process_remove_device_interface,
unlink::process_unlink_device_interface, update::process_update_device_interface,
},
migrate_interfaces::process_migrate_device_interfaces,
reject::process_reject_device,
sethealth::process_set_health_device,
update::process_update_device,
Expand Down Expand Up @@ -448,9 +447,7 @@ pub fn process_instruction(
DoubleZeroInstruction::BackfillTopology(value) => {
process_topology_backfill(program_id, accounts, &value)?
}
DoubleZeroInstruction::MigrateDeviceInterfaces(value) => {
process_migrate_device_interfaces(program_id, accounts, &value)?
}
DoubleZeroInstruction::Deprecated111() => (),
};
Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use crate::processors::{
remove::DeviceInterfaceRemoveArgs, unlink::DeviceInterfaceUnlinkArgs,
update::DeviceInterfaceUpdateArgs,
},
migrate_interfaces::MigrateDeviceInterfacesArgs,
reject::DeviceRejectArgs,
sethealth::DeviceSetHealthArgs,
update::DeviceUpdateArgs,
Expand Down Expand Up @@ -235,7 +234,7 @@ pub enum DoubleZeroInstruction {
ClearTopology(TopologyClearArgs), // variant 109
BackfillTopology(TopologyBackfillArgs), // variant 110
Comment thread
elitegreg marked this conversation as resolved.

MigrateDeviceInterfaces(MigrateDeviceInterfacesArgs), // variant 111
Deprecated111(), // variant 111, (was MigrateDeviceInterfaces)
}

impl DoubleZeroInstruction {
Expand Down Expand Up @@ -376,7 +375,7 @@ impl DoubleZeroInstruction {
108 => Ok(Self::DeleteTopology(TopologyDeleteArgs::try_from(rest).unwrap())),
109 => Ok(Self::ClearTopology(TopologyClearArgs::try_from(rest).unwrap())),
110 => Ok(Self::BackfillTopology(TopologyBackfillArgs::try_from(rest).unwrap())),
111 => Ok(Self::MigrateDeviceInterfaces(MigrateDeviceInterfacesArgs::try_from(rest).unwrap())),
111 => Ok(Self::Deprecated111()),

_ => Err(ProgramError::InvalidInstructionData),
}
Expand Down Expand Up @@ -520,7 +519,7 @@ impl DoubleZeroInstruction {
Self::DeleteTopology(_) => "DeleteTopology".to_string(), // variant 108
Self::ClearTopology(_) => "ClearTopology".to_string(), // variant 109
Self::BackfillTopology(_) => "BackfillTopology".to_string(), // variant 110
Comment thread
elitegreg marked this conversation as resolved.
Self::MigrateDeviceInterfaces(_) => "MigrateDeviceInterfaces".to_string(), // variant 111
Self::Deprecated111() => "Deprecated111".to_string(), // variant 111
}
}

Expand Down Expand Up @@ -656,7 +655,7 @@ impl DoubleZeroInstruction {
Self::DeleteTopology(args) => format!("{args:?}"), // variant 108
Self::ClearTopology(args) => format!("{args:?}"), // variant 109
Self::BackfillTopology(args) => format!("{args:?}"), // variant 110
Comment thread
elitegreg marked this conversation as resolved.
Self::MigrateDeviceInterfaces(args) => format!("{args:?}"), // variant 111
Self::Deprecated111() => String::new(), // variant 111
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod closeaccount;
pub mod create;
pub mod delete;
pub mod interface;
pub mod migrate_interfaces;
pub mod reject;
pub mod sethealth;
pub mod update;
Loading
Loading