feat(gnovm): phase 2 — inert package storage and oracle activation#5888
Draft
moul wants to merge 2 commits into
Draft
feat(gnovm): phase 2 — inert package storage and oracle activation#5888moul wants to merge 2 commits into
moul wants to merge 2 commits into
Conversation
Add CodeSubmissionPolicyInert and PkgApprovers param. When policy=inert, MsgAddPackage stores packages in inert_pkg: key space without typechecking or execution. MsgEnablePackage (approver-gated) typechecks and activates. MsgDisablePackage stubbed pending baseStore object eviction strategy.
Collaborator
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
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
Phase 2 of the code-submission permissioning design (gist). Companion to / depends on #5885 (Phase 1).
Enables permissionless package submission while keeping the Go typechecker off the critical path: packages are stored inert (no typecheck, no execution) and activated later by a trusted approver (e.g., an off-chain oracle).
Changes
gnovm/pkg/gnolang/store.go—AddInertPackage,GetInertPackage,DelInertPackageadded to theStoreinterface anddefaultStore; inert packages live atinert_pkg:<path>in iavlStore, invisible to normal package resolutiongno.land/pkg/sdk/vm/params.go—CodeSubmissionPolicyInert = "inert",PkgApprovers []crypto.Addressparam, sharedvalidateAddressSlice/mustParseAddressSlicehelpersgno.land/pkg/sdk/vm/msgs.go—MsgEnablePackageandMsgDisablePackagemessage typesgno.land/pkg/sdk/vm/keeper.go— inert shortcut inAddPackage;EnablePackage(typecheck + execute + DelInertPackage);DisablePackage(stub, TODO)gno.land/pkg/sdk/vm/handler.go— routes new messagesgno.land/pkg/sdk/vm/package.go— registersm_enable_pkgandm_disable_pkggno.land/pkg/sdk/vm/pb3_gen.go— amino codec for new messages + new Params fields (14 policy, 15 submitters, 16 approvers)gno.land/adr/pr5885_phase2_inert_packages.md— ADRTest plan
go test ./gno.land/pkg/sdk/vm/...passes (codec parity + apphash pin updated)go build ./gnovm/pkg/gnolang/... ./gno.land/pkg/sdk/vm/...cleanMsgDisablePackagefull implementation (follow-up PR)