Conversation
c22987b to
6dc35c6
Compare
Contributor
Author
|
Note that merging this to main will require deploying device-health-oracle to testnet/mainnet-beta before promoting this change to those environments. |
martinsander00
approved these changes
Jan 26, 2026
d7b0a2d to
5e39ca4
Compare
martinsander00
approved these changes
Jan 28, 2026
6d24df5 to
0011997
Compare
nikw9944
commented
Mar 2, 2026
nikw9944
commented
Mar 5, 2026
deeae2d to
663a2e9
Compare
Contributor
|
|
martinsander00
approved these changes
Mar 27, 2026
- Use Pubkey::new_unique() for health_oracle in CLI test instead of Pubkey::default(), matching the pattern used for other authorities - Correct maxBatchSize comment: transaction wire cost is ~9 bytes per instruction (not 100-120), the actual bottleneck is compute units (~10-20k CUs per instruction against 200k default budget)
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
Context
This implements the device-health-oracle portion of RFC12 (network provisioning). The oracle automatically promotes devices and links from provisioning states (DeviceProvisioning, LinkProvisioning, SoftDrained, HardDrained) to ready states without performing actual health checks, matching the current activator behavior.
The batching implementation processes health updates in groups of 8. Transaction wire cost per instruction is only ~9 bytes (accounts are deduplicated as 1-byte indices), so transaction size is not the bottleneck. The limiting factor is compute units: each instruction deserializes GlobalState (which contains variable-length allowlists) plus the device/link account, costing roughly 10,000-20,000 CUs per instruction. With Solana's default 200,000 CU budget, 8 instructions is a conservative limit.
The SDK enum fixes resolve a mismatch where Go used sequential iota values (0,1,2,3...) while Rust uses explicit numeric values with gaps (0,1,3,4,5...). This caused incorrect state interpretation and is now aligned across languages.
Testing Verification