Skip to content

Comments

feat(smartcontract): RFC 11 add on-chain resource allocation for Link#2695

Merged
elitegreg merged 3 commits intomainfrom
rg/rfc11-link-activation
Jan 22, 2026
Merged

feat(smartcontract): RFC 11 add on-chain resource allocation for Link#2695
elitegreg merged 3 commits intomainfrom
rg/rfc11-link-activation

Conversation

@vihu
Copy link
Contributor

@vihu vihu commented Jan 22, 2026

Summary

Fix #2406
Fix #2665

Add support for on-chain allocation/deallocation of tunnel_id and tunnel_net from ResourceExtension accounts (DeviceTunnelBlock, LinkIds) when activating and closing links.

Changes:

  • Add use_onchain_allocation flag to ActivateLink instruction
  • Add use_onchain_deallocation flag to CloseAccountLink instruction
  • Smart contract allocates from ResourceExtension bitmaps when flag is set
  • Activator passes --onchain-allocation flag to enable on-chain mode
  • SDK commands compute and include ResourceExtension PDAs when enabled
  • Add E2E test for full allocation/deallocation cycle

vihu added 2 commits January 22, 2026 19:11
Fix #2406
Fix #2665

Add support for on-chain allocation/deallocation of tunnel_id and
tunnel_net from ResourceExtension accounts (DeviceTunnelBlock, LinkIds)
when activating and closing links.

Changes:
- Add use_onchain_allocation flag to ActivateLink instruction
- Add use_onchain_deallocation flag to CloseAccountLink instruction
- Smart contract allocates from ResourceExtension bitmaps when flag is set
- Activator passes --onchain-allocation flag to enable on-chain mode
- SDK commands compute and include ResourceExtension PDAs when enabled
- Add E2E test for full allocation/deallocation cycle
@vihu vihu requested a review from elitegreg January 22, 2026 15:13
@elitegreg elitegreg enabled auto-merge (squash) January 22, 2026 19:09
@elitegreg elitegreg merged commit bc7005c into main Jan 22, 2026
21 checks passed
@elitegreg elitegreg deleted the rg/rfc11-link-activation branch January 22, 2026 19:20
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.

Phase 1: Modify CloseAccountLink to require ResourceExtension Phase 1: Modify ActivateLink to read from ResourceExtension bitmaps

2 participants