Improve Benchmarking#2798
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: VULNERABLE Baseline scrutiny: established @opentensor-associated contributor with substantial history; cached repository permission is read, no Gittensor association found; apply-benchmark-to-only-bad-benches -> main. No malicious intent was established. Static analysis found one unresolved, merge-blocking resource-accounting vulnerability. Findings
Prior-comment reconciliation
ConclusionThe hook can perform repeated cryptographic reveals while charging the benchmarked CPU cost only once, allowing actual block execution to exceed its declared weight. 📜 Previous run (superseded)
🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor UNKNOWN; author is an established @opentensor/subtensor contributor with substantial recent PR history, cached repo permission is read. PR body is substantive and matches the benchmark/tooling scope, so I would leave it unchanged. The prior Duplicate-work check found overlapping PRs only through broad shared runtime, benchmark, and generated-weight files; none appear to be alternate implementations of this benchmark-flow change. Validation performed: FindingsNo findings. Prior-comment reconciliation
ConclusionI did not find a remaining domain issue that should block merge. CI should still perform the normal live spec-version and Rust test checks that this sandbox could not complete. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
1 similar comment
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
5 similar comments
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
51345f0 to
a1f4ff1
Compare
eco-tests changed — indexer review requiredThis PR modifies files under Changed files
|
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
Description
This PR
Modifies the benchmark flow so that only extrinsics that have drifted passed the threshold or have incorrect read/writes are updated rather than replacing the entire file and creating conflicts everywhere.
Adds a lint to check for extrinsics with missing benchmarks. This can be hidden with
#[allow(unknown_lints, benchmarked_weight_not_plugged)]Adds 48 missing benchmarks
Fixes a bug where benchmarks could fail on noisy internal component drift even when the actual benchmark-level weight was still within the configured threshold.
Adds
block_step&reveal_timelocked_commitmentsto the benchmark flow so theon_initializeweight is generated instead of hardcoded. Theblock_stepbenchmark simulates the current worst case with 2 epochs in a block.Updates the drift check to include proof size and to compare the actual benchmark-level weight instead of failing on noisy internal component drift.