Liquid Alpha 2.1 Consensus Modes - #3070
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH scrutiny: 42-day-old account with zero public repos and six UnArbosFour-authored commits, mitigated by repository write permission and substantial merged contributions; no Gittensor association; agent/liquid-alpha-consensus-mode → release-v446. Static review found the consensus selection, per-mechanism persistence, UID lifecycle handling, authorization, rate limiting, proxy exposure, dissolution cleanup, and updated metadata proof consistent with the stated feature. The GHCR retry does not broaden credential scope, and no AI-review trust-boundary files changed. FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found. Runtime changes include the required spec-version bump to 446. 🔍 AI Review — Auditor (domain review)VERDICT: 👎 Gittensor association UNKNOWN; contributor has substantial recent repository activity and write permission. The consensus-mode implementation is well tested and generally matches the stated behavior. However, the generated weight for the new extrinsic is still missing. The PR description also omits the unrelated GHCR login retry change in No spec-version auto-fix is required for the Findings
Prior-comment reconciliation
ConclusionThe generated-weight issue remains blocking: this state-mutating extrinsic must use its own benchmarked weight before merge. 📜 Previous run (superseded)
|
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
|
||
| /// Sets which consensus values liquid alpha uses for a subnet. | ||
| #[pallet::call_index(104)] | ||
| #[pallet::weight(<T as pallet::Config>::WeightInfo::sudo_set_alpha_values())] |
There was a problem hiding this comment.
[HIGH] Use the benchmarked weight for the new extrinsic
This new extrinsic is charged as sudo_set_alpha_values, whose generated weight models different storage accesses (LiquidAlphaOn and AlphaValues). The added benchmark is not connected to WeightInfo, so the runtime has no generated weight accounting for LiquidAlphaConsensusMode and its rate-limit writes. Generate the benchmark weights, add sudo_set_liquid_alpha_consensus_mode() to both WeightInfo implementations, and reference it here.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
|
||
| /// Sets which consensus values liquid alpha uses for a subnet. | ||
| #[pallet::call_index(104)] | ||
| #[pallet::weight(<T as pallet::Config>::WeightInfo::sudo_set_alpha_values())] |
There was a problem hiding this comment.
[HIGH] Use the benchmarked weight for the new extrinsic
The benchmark function now exists, but generated WeightInfo still has no sudo_set_liquid_alpha_consensus_mode entry, and this call continues to reuse sudo_set_alpha_values. Generate and commit the admin-utils weights, then reference the new weight function here so the declared reads, writes, proof size, and execution time match this call.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
…ndation/subtensor into agent/liquid-alpha-consensus-mode
| } | ||
|
|
||
| /// Sets which consensus values liquid alpha uses for a subnet. | ||
| #[pallet::call_index(104)] |
There was a problem hiding this comment.
[HIGH] Use the benchmarked weight for the new extrinsic
The benchmark definition was added, but WeightInfo and both generated implementations still lack sudo_set_liquid_alpha_consensus_mode(). Reusing sudo_set_alpha_values() assigns a profile for different storage accesses and leaves this extrinsic without a generated weight. Run the benchmark action, propagate its output into weights.rs, and reference the new weight function here.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
|
||
| /// Sets which consensus values liquid alpha uses for a subnet. | ||
| #[pallet::call_index(104)] | ||
| #[pallet::weight(<T as pallet::Config>::WeightInfo::sudo_set_alpha_values())] |
There was a problem hiding this comment.
[HIGH] Use the benchmarked weight for the new extrinsic
The benchmark definition now exists, but WeightInfo and its generated implementations still lack sudo_set_liquid_alpha_consensus_mode(). Reusing sudo_set_alpha_values() assigns measurements for different storage access. Regenerate and commit the admin-utils weights, then reference the new method here.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
|
||
| /// Sets which consensus values liquid alpha uses for a subnet. | ||
| #[pallet::call_index(104)] | ||
| #[pallet::weight(<T as pallet::Config>::WeightInfo::sudo_set_alpha_values())] |
There was a problem hiding this comment.
[HIGH] Use the benchmarked weight for the new extrinsic
The benchmark now exists, but this extrinsic still charges sudo_set_alpha_values(). Its authorization, rate-limit recording, and storage accesses differ, so that weight does not account for the actual reads and writes. Generate the weights and add/use a dedicated sudo_set_liquid_alpha_consensus_mode() method before merge.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
Summary
Adds per-subnet control over which consensus values are used during liquid alpha bond calculations.
Current,Previous, andAutoconsensus modes.Auto, which uses previous consensus at maximum bond penalty and current consensus otherwise.Testing
Automode branch coverage.Generated weights are intentionally left for the benchmark action runner.