Repository navigation
Bind native module manifest grants to the issued IPC instance - #75
Merged
secsovereign merged 1 commit intoNov 22, 2026
Merged
Conversation
secsovereign
left a comment
Member
There was a problem hiding this comment.
Review (draft)
Correct fix for the second GridPool/ZMQ failure mode: hub authz keyed the session by issued IPC id, while native spawn registered grants under the module name, so read_mempool fell through to legacy read-only and GetMempoolTransaction returned ReadMempool denied despite a correct module.toml.
What looks good
bind_native_grantsregisters nonempty capability lists on the instance id before spawn; empty/absent keeps legacy defaults (no undeclared mempool). Documented inMODULE_SYSTEM.md.- Subscribe registration moved to after a successful hub response — denied subscribe no longer mutates event-manager state.
- Revoke / unregister on spawn failure, crash monitor exit, unload, and dependent teardown — including hub unregister by instance id.
- Chain-tip heartbeat gated on
ReadChainStateso a mempool-only grant does not get a free chain read via the supervisor. - Unit test covers grant-on-instance / deny-on-other-id / revoke-on-unload.
Ask before merge
- Land #73 first (session demux). This PR does not replace that; ZMQ still needs the single reader for event/reply interleaving.
- Confirm the intentional behavior change: nonempty capability lists are exact (no silent legacy mempool). Any in-tree module with a partial list needs
read_mempool/read_blockchainspelled out — ZMQ’s manifest already does. - Mark ready for review once rebased on #73 (or on
mainafter #73) and CI is green. SameurlRUSTSEC-2026-0592 hard-fail as #73 will hit untilmainbumpsurl≥2.5.9. - Small nit: crash path now revokes by id via
ipc_handlewithout taking the old server mutex — good; double-check Windows/cfgpaths still compile (unix-only revoke is fine).
Merge posture
Want this after #73. Together with blvm-zmq 0.1.7 / #1 this is the node half of restoring hashblock/rawblock + mempool reads for GridPool.
secsovereign
marked this pull request as ready for review
November 22, 2026 19:03
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.
Problem
The native loader registered a manifest's capabilities under the module name, but the API hub looks them up using the issued IPC instance ID. As a result, a module declaring
read_mempoolfell back to the legacy read-only defaults and its normal transaction read was refused.Change
This makes native manifest policy effective, so module authors relying on an undeclared default capability should audit their nonempty manifests.
Verification
rawtxtxid matched the accepted transaction, and GridPool receivedhashblockandrawblockfor the same SV2-mined tip. No production environment was changed.