Add liquid alpha consensus mode controls to precompiles - #3102
Add liquid alpha consensus mode controls to precompiles#3102UnArbosFour wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH scrutiny due to the account being under 90 days old with one public repository; repository write access, substantive merged PR history, matching authorship, and no known Gittensor association reduce practical concern. Branch: feat/liquidalphaconsensusmode-precompile → release-449. FindingsNo findings. ConclusionThe additive precompile methods preserve mapped-caller authentication and the existing subnet-owner, admin-window, and rate-limit checks, while validating enum inputs and charging the getter's database read. No malicious behavior or security vulnerability was found. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor association: UNKNOWN. Newer account with repository write access and several merged subtensor contributions; reviewed with elevated external-contributor scrutiny. The implementation consistently exposes the existing runtime setting through the Subnet precompile: stable enum encoding, mapped signed caller dispatch, runtime authorization, O(1) storage access with one charged read, synchronized Solidity/Python ABIs, selector locks, documentation, and focused tests. PR #3018 overlaps two files but is a much broader precompile overhaul. This PR is the better candidate. Recommend closing #3018 in favor of this independently scoped change. No FindingsNo findings. ConclusionThe additive ABI change correctly preserves runtime authorization and rate limiting while providing consistent typed EVM access. No blocking domain issues found. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Summary
Adds typed EVM access to
LiquidAlphaConsensusModethrough the existing Subnet precompile at0x0803.New functions:
Mode encoding:
0—Current1—Previous2—AutoImplementation
LiquidAlphaConsensusModedirectly with one charged database read.AdminUtils.sudo_set_liquid_alpha_consensus_modeusing the mapped EVM caller.This is an additive ABI change; existing addresses, selectors, and behavior remain unchanged.
Testing
cargo test -p subtensor-precompiles— 128 passedSKIP_WASM_BUILD=1 cargo clippy -p subtensor-precompiles --all-targets --all-features -- -D warningscargo fmt --all --checkAutobehavior