Skip to content

feat(gnovm): phase 2 — inert package storage and oracle activation#5888

Draft
moul wants to merge 2 commits into
masterfrom
worktree-phase2-inert-packages
Draft

feat(gnovm): phase 2 — inert package storage and oracle activation#5888
moul wants to merge 2 commits into
masterfrom
worktree-phase2-inert-packages

Conversation

@moul

@moul moul commented Jul 2, 2026

Copy link
Copy Markdown
Member

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.goAddInertPackage, GetInertPackage, DelInertPackage added to the Store interface and defaultStore; inert packages live at inert_pkg:<path> in iavlStore, invisible to normal package resolution
  • gno.land/pkg/sdk/vm/params.goCodeSubmissionPolicyInert = "inert", PkgApprovers []crypto.Address param, shared validateAddressSlice / mustParseAddressSlice helpers
  • gno.land/pkg/sdk/vm/msgs.goMsgEnablePackage and MsgDisablePackage message types
  • gno.land/pkg/sdk/vm/keeper.go — inert shortcut in AddPackage; EnablePackage (typecheck + execute + DelInertPackage); DisablePackage (stub, TODO)
  • gno.land/pkg/sdk/vm/handler.go — routes new messages
  • gno.land/pkg/sdk/vm/package.go — registers m_enable_pkg and m_disable_pkg
  • gno.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 — ADR

Test plan

  • go test ./gno.land/pkg/sdk/vm/... passes (codec parity + apphash pin updated)
  • go build ./gnovm/pkg/gnolang/... ./gno.land/pkg/sdk/vm/... clean
  • Integration test: set policy=inert, submit package, verify not callable, enable, verify callable
  • MsgDisablePackage full implementation (follow-up PR)

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.
@Gno2D2

Gno2D2 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
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:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related

Projects

Status: 📥 Inbox

Development

Successfully merging this pull request may close these issues.

2 participants