Repository Analysis

btcsuite/btcd

An alternative full node bitcoin implementation written in Go (golang)

3.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of btcsuite/btcd, a Go project with 6,693 GitHub stars. SynthScan v2.0 examined 208,212 lines of code across 632 source files, recording 714 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.8
Adjusted Score
3.8
Raw Score
100%
Time Factor
2026-07-24
Last Push
6.7K
Stars
Go
Language
208.2K
Lines of Code
632
Files
714
Pattern Hits
2026-08-02
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 12LOW 702

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 714 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block615 hits · 606 pts
SeverityFileLineSnippetContext
LOWlog.go41// Loggers per subsystem. A single backend logger is created and all subsystemCOMMENT
LOWserver.go561}COMMENT
LOWserver.go721COMMENT
LOWserver.go801 // resources with unusually large inventory queries.COMMENT
LOWserver.go1321COMMENT
LOWrpcserver.go61 // uint256Size is the number of bytes needed to represent an unsignedCOMMENT
LOWrpcserver.go1561 channels[lastGenerated] = cCOMMENT
LOWrpcserver.go1641COMMENT
LOWrpcserver.go4141// this only applies to standard clients. Websocket clients have their ownCOMMENT
LOWrpcserver.go4421 }COMMENT
LOWrpcserver.go4701 // IsTxRelayDisabled returns whether or not the peer has disabledCOMMENT
LOWrpcserver.go4721 // permanent flag indicates whether or not to make the peer persistentCOMMENT
LOWrpcserver.go4761 // BroadcastMessage sends the provided message to all currentlyCOMMENT
LOWrpcserver.go4781// The interface contract requires that all of these methods are safe forCOMMENT
LOWrpcserver.go4801 // current tip is reached, up to a max of wire.MaxBlockHeadersPerMsgCOMMENT
LOWrpcwebsocket.go121// websockets. It allows websocket clients to register for notifications theyCOMMENT
LOWrpcwebsocket.go1181COMMENT
LOWrpcwebsocket.go1221 // and therefore is allowed to communicated over the websocket.COMMENT
LOWrpcwebsocket.go1421 // done, the read of the next request should not be blocked byCOMMENT
LOWrpcwebsocket.go1741 returnCOMMENT
LOWrpcwebsocket.go2601 Message: "Database error: " + err.Error(),COMMENT
LOWupnp.go1package mainCOMMENT
LOWupnp.go21// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTCOMMENT
LOWrpcadapters.go41// interface implementation.COMMENT
LOWrpcadapters.go121// applies to both inbound and outbound peers. Attempting to remove an id thatCOMMENT
LOWrpcadapters.go201COMMENT
LOWrpcadapters.go241COMMENT
LOWrpcadapters.go281// the provided locators until the provided stop hash or the current tip isCOMMENT
LOWbtcjson/register.go21const (COMMENT
LOWbtcjson/register.go121 return falseCOMMENT
LOWbtcjson/register.go141// - The order of the positional parameters in the marshalled JSON will be inCOMMENT
LOWbtcjson/jsonrpcerr.go141COMMENT
LOWbtcjson/chainsvrresults.go921COMMENT
LOWbtcjson/chainsvrresults.go941 // false).COMMENT
LOWbtcjson/walletsvrresults.go41 HDMasterFingerprint *string `json:"hdmasterfingerprint,omitempty"`COMMENT
LOWbtcjson/walletsvrcmds.go921// ImportMultiRequest defines the request struct to be passed to theCOMMENT
LOWbtcjson/walletsvrcmds.go961 // (as an int) or the range (as []int{begin, end}) to import.COMMENT
LOWbtcjson/cmdparse.go501// to be passed unaltered. In particular, the following conversions areCOMMENT
LOWbtcjson/export_test.go1// Copyright (c) 2014 The btcsuite developersCOMMENT
LOWbtcjson/chainsvrwsntfns.go1// Copyright (c) 2014-2017 The btcsuite developersCOMMENT
LOWbtcjson/chainsvrwsntfns.go21 //COMMENT
LOWbtcjson/chainsvrwsntfns.go41COMMENT
LOWbtcjson/chainsvrwsntfns.go61 // Deprecated: Not used with rescanblocks command.COMMENT
LOWbtcjson/walletsvrwsntfns.go1// Copyright (c) 2014 The btcsuite developersCOMMENT
LOWbtcjson/help.go461// result types given a map to provide the appropriate keys for the methodCOMMENT
LOWbtcjson/help.go481// "<method>-<lowerfieldname>" Description for each command argumentCOMMENT
LOWbtcjson/btcdextcmds.go1// Copyright (c) 2014-2016 The btcsuite developersCOMMENT
LOWbtcjson/btcdextcmds.go121//COMMENT
LOWbtcjson/submitpackage.go1package btcjsonCOMMENT
LOWbtcjson/submitpackage.go21// - Limits: Subject to node limits on package size (e.g., max 25 txs) andCOMMENT
LOWbtcjson/submitpackage.go41// This RPC is experimental. Refer to Bitcoin Core's `doc/policy/packages.md`COMMENT
LOWbtcjson/submitpackage.go81type JsonSubmitPackageTxResult struct {COMMENT
LOWbtcjson/submitpackage.go141COMMENT
LOWcmd/btcctl/config.go181// line options.COMMENT
LOWdatabase/error.go21COMMENT
LOWdatabase/error.go61 // ErrTxNotWritable indicates an operation that requires write access toCOMMENT
LOWdatabase/error.go81 // ErrKeyRequired indicates at attempt to insert a zero-length key.COMMENT
LOWdatabase/error.go101COMMENT
LOWdatabase/error.go161 if s := errorCodeStrings[e]; s != "" {COMMENT
LOWdatabase/example_test.go41COMMENT
555 more matches not shown…
Structural Annotation Overuse70 hits · 118 pts
SeverityFileLineSnippetContext
LOWbtcjson/register.go153// NOTE: This function only needs to be able to examine the structure of theCOMMENT
LOWbtcjson/chainsvrresults.go521 // Step 1: Create type aliases of the original struct.COMMENT
LOWbtcjson/chainsvrresults.go524 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/chainsvrresults.go535 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/chainsvrresults.go540 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWbtcjson/walletsvrresults.go72 // Step 1: Create type aliases of the original struct, including theCOMMENT
LOWbtcjson/walletsvrresults.go77 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/walletsvrresults.go90 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/walletsvrresults.go95 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWbtcjson/jsonrpc.go107 // Step 1: Create a type alias of the original struct.COMMENT
LOWbtcjson/jsonrpc.go110 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/jsonrpc.go120 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/jsonrpc.go126 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWdatabase/ffldb/db.go1053// NOTE: This function must only be called on a writable transaction. Since itCOMMENT
LOWdatabase/ffldb/db.go1090// NOTE: This function must only be called on a writable transaction. Since itCOMMENT
LOWdatabase/ffldb/db.go1108// NOTE: This function must only be called on a writable transaction. Since itCOMMENT
LOWdatabase/ffldb/blockio.go399// NOTE: This function MUST be called with the write cursor current file lockCOMMENT
LOWchainhash/hash.go190// NOTE: This function accepts short and odd-length hex strings and pads them.COMMENT
LOWchainhash/hash.go216// NOTE: This function accepts short and odd-length hex strings and pads them.COMMENT
LOWwire/msgtx.go1147// NOTE: This function is exported in order to allow txscript to compute theCOMMENT
LOWwire/msgtx.go1162// NOTE: This function is exported in order to allow txscript to compute theCOMMENT
LOWconnmgr/connmanager.go561// NOTE: This method can also be used to cancel a lingering connection attemptCOMMENT
LOWrpcclient/wallet.go558// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go591// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go645// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go675// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go708// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go764// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go797// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go832// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go2327// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go2372// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWrpcclient/wallet.go2423// NOTE: This function requires to the wallet to be unlocked. See theCOMMENT
LOWpsbt/updater.go83// NOTE: This function does *not* validate the ECDSA signature itself.COMMENT
LOWpsbt/taproot.go102// NOTE: This function does not account for the size of the BIP32 child indexes,COMMENT
LOWintegration/rpctest/rpc_harness.go136// NOTE: This function is safe for concurrent access.COMMENT
LOWintegration/rpctest/rpc_harness.go253// NOTE: This method and TearDown should always be called from the sameCOMMENT
LOWintegration/rpctest/rpc_harness.go340// NOTE: This method and SetUp should always be called from the same goroutineCOMMENT
LOWpeer/p2pdowngrader_test.go169 // Step 1: Mark A, B, C.COMMENT
LOWpeer/p2pdowngrader_test.go175 // Step 2: Mark A again. This should move A to the frontCOMMENT
LOWpeer/p2pdowngrader_test.go179 // Step 3: Mark D. This should evict B (which is now theCOMMENT
LOWtxscript/sighash.go75// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/sighash.go625// NOTE: This function is able to compute the sighash of scripts that contain aCOMMENT
LOWtxscript/standard.go192// NOTE: This function is only valid for version 0 opcodes. Since the functionCOMMENT
LOWtxscript/standard.go232// NOTE: This function is only valid for version 0 scripts. The returnedCOMMENT
LOWtxscript/standard.go308// NOTE: This function is only valid for version 0 scripts. It will alwaysCOMMENT
LOWtxscript/standard.go320// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/standard.go339// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/standard.go528// NOTE: This function is only valid for version 0 scripts. It will alwaysCOMMENT
LOWtxscript/standard.go632// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/standard.go784// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/standard.go866// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/sigcache.go59// NOTE: This function is safe for concurrent access. Readers won't be blockedCOMMENT
LOWtxscript/sigcache.go74// NOTE: This function is safe for concurrent access. Writers will blockCOMMENT
LOWtxscript/sign.go328// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/sign.go450// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/sign.go554// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/script.go46// NOTE: This function is only valid for version 0 opcodes. Since the functionCOMMENT
LOWtxscript/script.go154// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
LOWtxscript/script.go184// NOTE: This function is only valid for version 0 scripts. Since the functionCOMMENT
10 more matches not shown…
Verbosity Indicators15 hits · 34 pts
SeverityFileLineSnippetContext
LOWbtcjson/chainsvrresults.go521 // Step 1: Create type aliases of the original struct.COMMENT
LOWbtcjson/chainsvrresults.go524 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/chainsvrresults.go535 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/chainsvrresults.go540 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWbtcjson/walletsvrresults.go72 // Step 1: Create type aliases of the original struct, including theCOMMENT
LOWbtcjson/walletsvrresults.go77 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/walletsvrresults.go90 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/walletsvrresults.go95 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWbtcjson/jsonrpc.go107 // Step 1: Create a type alias of the original struct.COMMENT
LOWbtcjson/jsonrpc.go110 // Step 2: Create an anonymous struct with raw replacements for the specialCOMMENT
LOWbtcjson/jsonrpc.go120 // Step 3: Unmarshal the data into the anonymous struct.COMMENT
LOWbtcjson/jsonrpc.go126 // Step 4: Convert the raw fields to the desired typesCOMMENT
LOWpeer/p2pdowngrader_test.go169 // Step 1: Mark A, B, C.COMMENT
LOWpeer/p2pdowngrader_test.go175 // Step 2: Mark A again. This should move A to the frontCOMMENT
LOWpeer/p2pdowngrader_test.go179 // Step 3: Mark D. This should evict B (which is now theCOMMENT
Decorative Section Separators4 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMwire/msgtx.go129// ┌─────────┬────────────────────┬─────────────┬─────┐COMMENT
MEDIUMwire/msgtx.go132// └─────────┴────────────────────┴─────────────┴─────┘COMMENT
MEDIUMwire/msgtx.go136// ┌── FLAG ─────────────┬────────┐COMMENT
MEDIUMwire/msgtx.go139// └─────────────────────┴────────┘COMMENT
AI Slop Vocabulary6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMwire/msgtx.go718// the transaction encoding format within r MUST NOT utilize the newCOMMENT
MEDIUMtxscript/engine_debug_test.go27 // We use a simple script that will utilize both the stack and altCOMMENT
MEDIUMtxscript/sighash.go470 // We'll utilize this buffer throughout to incrementally calculateCOMMENT
MEDIUMblockchain/chain.go796 // we'll fetch it as is so the indexers can utilize if needed.COMMENT
MEDIUMblockchain/compress.go435// Essentially the compression is achieved by splitting the value into anCOMMENT
MEDIUMblockchain/indexers/addrindex.go569 // P2WSH outputs utilize a 32-byte data push created by hashingCOMMENT
Slop Phrases2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMdatabase/doc.go78As discussed above, all of the functions which are used to manipulate key/valueCODE
MEDIUMtxscript/sigcache.go88 // starting point of Go's map iteration. It's worth noting thatCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtxscript/template.go206// Example usage:COMMENT
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py16CODE