bitcoin-php icon indicating copy to clipboard operation
bitcoin-php copied to clipboard

Some sort of fee & size estimation

Open afk11 opened this issue 6 years ago • 0 comments

One thing I frequently miss is the ability to estimate the size of a transaction before signing it, so I don't have to resign with the correct fee/change set. Size estimation normally takes the form of determining a scripts type, and using some static constants for their signature stacks (and account for P2SH and/or P2WSH)

Since the library has started supporting scripts outside the normal standard types, I think it's becoming more pressing (not that it wasn't already frustrating to eyeball fee's in once off scripts..) to have size estimation for UTXOs

Generally what I'd like to see happen is the following:

  • further development of the solver logic to determine stack values for a signScript so size estimation works with as many scripts as we can sign
  • provide a validation API for a set of RBF transactions and the candidate replacement transaction (and utxos/outputs with size estimation)
  • provide an API for determining the change for a CPFP bumping of an unconfirmed transactions fee (given inputs, and a change address, + other outputs) to enable bumping a set of transactions from one fee/Kb to a higher one

afk11 avatar Nov 27 '17 22:11 afk11