AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 21 Bitcoin

rpc: add `vsize_adjusted` and `vsize_bip141` field to mempool-related RPCs

Public commit record

What the developer wrote

Authored by Musa Haruna

83/100 · Strong
rpc: add `vsize_adjusted` and `vsize_bip141` field to mempool-related RPCs

This commit adds a new `vsize_adjusted` and `vsize_bip141` field to mempool acceptance and submission RPCs,
including `testmempoolaccept` and `submitpackage`,
to report the sigop-adjusted virtual transaction size and virtual transaction size as defined in BIP 141 respectively.
While `vsize` is now marked as deprecated.

RPC help texts are updated to reflect this addition.
Tests in `mempool_accept.py, mempool_accept, p2p_segwit, rpc_packages, mempool_sigoplimit` are extended
to verify the presence and correctness of the new fields.

Co-authored-by: Gloria Zhao <gloriajzhao@gmail.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This Bitcoin Core change fixes a labeling problem in several RPC (remote procedure call) responses. The old 'vsize' field was actually reporting a sigop-adjusted size, not the plain BIP 141 virtual size its documentation claimed. The patch keeps the old 'vsize' value for backward compatibility but marks it deprecated, and adds two new clearly-named fields: 'vsize_bip141' for the true BIP 141 virtual size and 'vsize_adjusted' for the sigop-adjusted size. It is an API clarity/documentation correction, not a consensus or mempool rule change.

Recommended action

No urgent action. Operators and developers relying on 'vsize' in these RPCs should plan to migrate to 'vsize_bip141' or 'vsize_adjusted' before 'vsize' is removed in a future release. Review any fee-estimation or transaction-analysis tooling that assumed 'vsize' meant pure BIP 141 vsize.

Security signals we found

01

Deprecated RPC field with corrected documentation

02

New explicit fields to disambiguate sigop-adjusted vs BIP 141 vsize

03

No change to mempool acceptance rules or fee calculation logic

04

Backward-compatible value retention for existing 'vsize' consumers

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.