feat: register and audit agent-wallet rules on-chain#1388
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
|
@holdex pr submit-time 4h |
resolves: resolves: https://github.com/truflation/website/issues/4035
What
Part 2 of the Modular Agent Addresses (MAA) rule store: the node migration with the rule tables,
maa_create, and thepublic getters. Stacked on the precompiles PR — this PR's diff is the SQL plus integration tests; the precompiles it
calls live in the base branch.
Depends on (review/merge first):
Changes
048-maa.sql:maa_rules,maa_allowed_actions,maa_events(append-only audit),maa_create(therestricted/agent key signs), and 6 public getters. The rule is set once at creation and immutable — committed into
the wallet address via
rules_hash. The node computesrules_hashon-chain (never trusts a caller-supplied value), sothe address provably commits to the stored rule.
tests/streams/maa/): asserts on-chainmaa_createreproduces the golden-vector address, plusvalidation and audit behavior.
Testing
go test -tags kwiltest ./tests/streams/maa/— pass (~56s)Notes for reviewers
withdrawal/fee path are later work, not in this PR.
design: (1) whether the funding address and the wallet address are one identity (this PR makes them one); (2) whether
rules stay immutable or become editable (this PR is immutable).