Skip to content

bugfix(serviceability): require ip-net for CYOA interfaces#3033

Merged
bgm-malbeclabs merged 1 commit intomainfrom
bgm/enforce_cyoa_ip-net
Feb 24, 2026
Merged

bugfix(serviceability): require ip-net for CYOA interfaces#3033
bgm-malbeclabs merged 1 commit intomainfrom
bgm/enforce_cyoa_ip-net

Conversation

@bgm-malbeclabs
Copy link
Contributor

@bgm-malbeclabs bgm-malbeclabs commented Feb 17, 2026

Summary of Changes

This PR adds the requirement to have an ip_net when a CYOA interface is created. Previously one could create a CYOA interface without an ip_net which would default to 0.0.0.0 which doesn't seem like desired behavior.

Closes #3032

Testing Verification

  • E2E tests have been updated to include the ip-net flag for CYOA interfaces

@bgm-malbeclabs bgm-malbeclabs marked this pull request as draft February 17, 2026 20:58
@bgm-malbeclabs bgm-malbeclabs changed the title bugfix(serviveability): close orphaned blocks when dz_prefixes shrink bugfix(serviveability): require ip-net for CYOA interfaces Feb 17, 2026
@bgm-malbeclabs bgm-malbeclabs force-pushed the bgm/enforce_cyoa_ip-net branch from 285a719 to 8ffc9d1 Compare February 17, 2026 23:39
@bgm-malbeclabs bgm-malbeclabs requested review from ben-malbeclabs, Copilot, elitegreg and nikw9944 and removed request for Copilot and elitegreg February 18, 2026 00:10
@bgm-malbeclabs bgm-malbeclabs marked this pull request as ready for review February 18, 2026 00:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a bug where CYOA (Choose Your Own Adventure) interfaces could be created without an ip_net, which would default to 0.0.0.0. The fix adds validation in the interface creation processor to require that CYOA interfaces must have an ip_net specified.

Changes:

  • Added validation to require ip_net for CYOA interfaces during creation
  • Added validation to restrict CYOA to physical interfaces only
  • Updated E2E tests to include ip-net flag when creating CYOA interfaces

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
smartcontract/programs/doublezero-serviceability/src/processors/device/interface/create.rs Added two new validation checks: CYOA can only be set on physical interfaces, and CYOA interfaces must have an ip_net
e2e/link_onchain_allocation_test.go Updated CYOA interface creation commands to include --ip-net flag
e2e/interface_validation_test.go Updated existing test to include --ip-net flag when creating CYOA interface
CHANGELOG.md Added entry documenting the requirement for ip-net on CYOA interfaces

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bgm-malbeclabs bgm-malbeclabs force-pushed the bgm/enforce_cyoa_ip-net branch from 2ef5801 to 5e0b722 Compare February 23, 2026 22:55
@bgm-malbeclabs bgm-malbeclabs changed the title bugfix(serviveability): require ip-net for CYOA interfaces bugfix(serviceability): require ip-net for CYOA interfaces Feb 23, 2026
@bgm-malbeclabs bgm-malbeclabs force-pushed the bgm/enforce_cyoa_ip-net branch from b2320a4 to 2535303 Compare February 24, 2026 16:34
Copy link
Contributor

@ben-malbeclabs ben-malbeclabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bgm-malbeclabs bgm-malbeclabs merged commit daf1d49 into main Feb 24, 2026
34 of 35 checks passed
@bgm-malbeclabs bgm-malbeclabs deleted the bgm/enforce_cyoa_ip-net branch February 24, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require ip-net for CYOA interfaces

3 participants