Estimating a PSBT’s virtual‐size before signing (accounting for post‐signature size increase)

I’m building a tool around Bitcoin Core’s PSBT API and need to estimate the final transaction virtual‐size (vsize) before I actually sign the PSBT. Once signed, each input’s witness data will be added, increasing the vsize—and thus the fee.

What I’m looking for A concise, correct recipe (or code snippet) to compute vsize of a PSBT before signing, including all varints and segwit overhead.

Any pitfalls or off‐by‐one mistakes people commonly make.

A reference to the relevant BIP or Bitcoin-Core source code that shows exactly how they calculate it internally.

Thanks in advance!



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/Ef5C23c
via IFTTT

Popular posts from this blog

Bitcoin Mining Could Be Strengthening The Ruble, Russian Central Bank Says

Crypto Exec Warns Tokenization Is Moving Faster Than Expected

Bitwise Clients Pour $69M Into Solana as Bulls Fight to Reclaim $200 Resistance Zone