What changed, and why it matters
This commit simply adds the standard Rust `Debug` trait to six empty marker types used for tagging different kinds of Bitcoin scripts. It is a routine, non-functional code-quality change with no security relevance.
No security action required. Treat as a normal code-quality/ergonomics change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds #[derive(Debug, ...)] to six zero-variant enum tag types (RedeemScriptTag, ScriptSigTag, ScriptPubKeyTag, SignetBlockScriptTag, TapScriptTag, WitnessScriptTag) in primitives/src/script/tag.rs. These are phantom/marker types carrying no data and no behavior. Adding Debug only enables formatted output and has no effect on serialization, consensus logic, cryptography, memory safety, or API behavior.
Changed components
primitives/src/script/tag.rsInspect captured patch +6 / −6
diff --git a/primitives/src/script/tag.rs b/primitives/src/script/tag.rs
index 6f9862f8..31d96adb 100644
--- a/primitives/src/script/tag.rs
+++ b/primitives/src/script/tag.rs
@@ -9,31 +9,31 @@
pub trait Tag {}
/// A P2SH redeem script.
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum RedeemScriptTag {}
impl Tag for RedeemScriptTag {}
/// A script signature (scriptSig).
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum ScriptSigTag {}
impl Tag for ScriptSigTag {}
/// A script public key (scriptPubKey).
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum ScriptPubKeyTag {}
impl Tag for ScriptPubKeyTag {}
/// A signet block challenge script.
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum SignetBlockScriptTag {}
impl Tag for SignetBlockScriptTag {}
/// A Segwit v1 Taproot script.
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum TapScriptTag {}
impl Tag for TapScriptTag {}
/// A Segwit v0 witness script.
-#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum WitnessScriptTag {}
impl Tag for WitnessScriptTag {}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.