You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add governance-controlled machine whitelist system
Implements machine whitelist management through governance proposals with
antehandler validation. Machine IDs must be exactly 20 bytes and validated
against passed governance proposals.
Changes:
- Add MsgUpdateMachineWhitelistProposal for governance proposals
- Add MsgUpdateMachineWhitelist for executing approved whitelists
- Implement antehandler validation in CountTXDecorator
- Queries governance module for proposal status
- Validates machine IDs match proposal exactly (order preserved)
- Rejects transactions if proposal not passed or IDs mismatch
- Add CLI command: update-machine-whitelist [proposal-id] [machine-ids-file]
- Supports JSON file format with hex-encoded machine IDs
- Validates each ID is 20 bytes
returnsdkerrors.ErrInvalidRequest.Wrapf("proposal with id %d not passed", msgUpdateWhitelist.ProposalId)
135
+
}
136
+
iflen(proposal.Messages) !=1 {
137
+
returnsdkerrors.ErrInvalidRequest.Wrapf("proposal with id %d has %d messages, expected exactly 1", msgUpdateWhitelist.ProposalId, len(proposal.Messages))
returnsdkerrors.ErrInvalidRequest.Wrapf("machine ids count %d does not match the proposal %d", len(msgUpdateWhitelist.MachineIds), len(updateMachineWhitelistProposalMsg.MachineIds))
152
+
}
153
+
// ensure the machine ids match the proposal exactly in order
0 commit comments