Remove CreateSignedTransaction deadcode#2479
Conversation
d1395a7 to
b9c2830
Compare
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: l0r1s has repo write permission, an established account with substantial prior contributions, no committer mismatch, and no Gittensor allowlist hit found; branch remove-create-signed-tx-deadcode targets devnet-ready. Static-only Skeptic review of the prefetched PR context and patch found a narrow removal/conversion around FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found in this diff. The PR appears to remove dead signed-transaction scaffolding without weakening drand unsigned transaction validation. 🔍 AI Review — Auditor (domain review)VERDICT: 👎 Gittensor: UNKNOWN by allowlists; author has write permission and substantial recent subtensor history, so reviewed as an established repo contributor without incentive adjustment. Static review found one blocking compile-coverage miss. I attempted a targeted Spec-version auto-fix was not applied: the devnet runtime-version query could not resolve Findings
ConclusionThe dead-code removal is directionally correct, but the new |
| pub trait Config: | ||
| CreateSignedTransaction<Call<Self>> + CreateInherent<Call<Self>> + frame_system::Config | ||
| { | ||
| pub trait Config: CreateBare<Call<Self>> + SigningTypes + frame_system::Config { |
There was a problem hiding this comment.
[HIGH] Update all drand mock runtimes to implement CreateBare
pallet_drand::Config now requires CreateBare<Call<Self>>, but this PR only converts part of the repo. Existing pallet_drand::Config implementors in pallets/subtensor/src/tests/mock_high_ed.rs, precompiles/src/mock.rs, and eco-tests/src/mock.rs still implement CreateInherent/CreateSignedTransaction and do not implement CreateBare, so crates that compile those mocks will no longer satisfy this bound. Convert those remaining mocks the same way as the files in this PR: implement frame_system::offchain::CreateBare, use UncheckedExtrinsic::new_bare(...), and remove the now-unused CreateSignedTransaction implementations.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
Summary
CreateSignedTransactionimpl and trait bounds — drand only usessend_unsigned_transaction(unsigned extrinsics with a signed payload), socreate_signed_transactionwas never calledCreateInherent/new_inherentwithCreateBare/new_bareacross all mock files and runtimeDetails
pallet_drand's offchain worker submits pulses viasigner.send_unsigned_transaction(), which creates bare extrinsics throughCreateBare::create_bare(). TheCreateSignedTransactiontrait and its implementations (runtime + 6 test mocks) were satisfying a trait bound but never invoked at runtime. This PR removes that dead code (~160 lines) and relaxespallet_drand::Configto only requireCreateBare<Call<Self>> + SigningTypes.