wasm: runtime env flag to allow permissionless store/instantiate (THOR_WASM_PERMISSION_MODE)#12
wasm: runtime env flag to allow permissionless store/instantiate (THOR_WASM_PERMISSION_MODE)#12
Conversation
…eper for permissionless mode
…onless regardless of Mimir
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
…tore default wasm manager behavior
…constructor and selector
…e for parity with default manager
Add bloctopus permissionless WASM manager with runtime env selection
Summary
Introduces a new permissionless WASM manager under
x/bloctopusthat bypasses all governance and permission checks for WASM operations (store, instantiate, execute, migrate, admin). The manager is selected at runtime viaTHOR_WASM_MANAGER=bloctopusenvironment variable, with the existing governance-controlled manager remaining as the default.Key changes:
x/bloctopus/wasm_manager.go: Complete WasmManager implementation usingwasmkeeper.NewDefaultPermissionKeeper(no restrictions)x/thorchain/managers.go: Runtime env-based manager selection inGetWasmManager()Review & Testing Checklist for Human
WasmMgrPermissionlesscorrectly implements allWasmManagerinterface methods with expected signatures and error handlingTHOR_WASM_MANAGER=bloctopusproperly switches managers and that any other value (or unset) uses default governance-controlled managerNotes