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

Future of Bitcoin encryption and security in a QC era

Possible rollback due to lazy reveal in BRC20?

A way to recover scammed Bitcoin investment