contrib: adapt max reject string size in tracing demo
What changed, and why it matters
This is a trivial comment and constant update in a tracing demonstration script. It changes a documented maximum string length from 118 to 114 characters because a previous commit shortened the longest possible rejection reason. There is no security issue.
No security action needed. This is a documentation/constant synchronization change in a non-production tracing demo.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit updates a single #define in contrib/tracing/mempool_monitor.py, a demo/tracing utility, reducing MAX_REJECT_REASON_LENGTH from 118 to 114. The change is purely a follow-up to a prior wording change in rejection reasons (‘mandatory’ to ‘block’) and keeps the tracing demo’s buffer size in sync with the actual longest string. It is not a vulnerability fix and does not alter consensus, networking, or mempool logic.
Changed components
contrib/tracing/mempool_monitor.pyInspect captured patch +2 / −2
diff --git a/contrib/tracing/mempool_monitor.py b/contrib/tracing/mempool_monitor.py
index ddba9d04..c5f672fb 100755
--- a/contrib/tracing/mempool_monitor.py
+++ b/contrib/tracing/mempool_monitor.py
@@ -17,9 +17,9 @@ from bcc import BPF, USDT
PROGRAM = """
# include <uapi/linux/ptrace.h>
-// The longest rejection reason is 118 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
+// The longest rejection reason is 114 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
// strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))
-#define MAX_REJECT_REASON_LENGTH 118
+#define MAX_REJECT_REASON_LENGTH 114
// The longest string returned by RemovalReasonToString() is 'sizelimit'
#define MAX_REMOVAL_REASON_LENGTH 9
#define HASH_LENGTH 32
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.