-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
size calculation is wrong for large transactions #210
Comments
Hi @jackstar12 Can you confirm the following please?:
On initial tx creation, the size estimation typically overestimates the tx size compared to the final size by 1-2 vbytes per expected signature per input, (depending on the signer). This is because some signatures will end up 1-2 vbytes smaller as a quirk of the DER encoding for ECDSA sigs. The expected result of this is that the actual fee rate will be slightly higher than the desired fee rate in some cases. This is reflected in the If |
0.73.2
GA_create_transaction
Default software wallet, singlesig
Havent been able to reproduce it locally yet. The issue has only occured on mainnet so far |
Hi @jackstar12 We have reproduced this and are working on a fix now. |
Hi @jackstar12 this issue is fixed in #211 which will be released shortly as v0.73.3. Thanks for reporting! |
Hi @jackstar12 As discussed offline, the fixes applied for weight calculation are not the cause of the issue you reported here (as they don't apply to p2wpkh inputs which your tx example contains).. The underlying issue is that the min relay fee being returned from esplora is < 0.1 sat/vbyte. We are tracking this issue internally and should have a resolution soon (we are determining whether the problem lies in electrs and/or can/should be worked around on the gdk side). |
The internal size calculation seems to be off for large transactions.
https://liquid.network/tx/06be290faffd9e56b12bea7729d979d21e60351cccb4acc76a099614a607fcc1
This transaction was created with a fee rate of 102 sat/kvbyte, but resulted in an actual rate of 100 sat/kvbyte.
I manually checked that https://github.com/Blockstream/gdk/blob/master/src/ga_tx.cpp#L1171 is right, since:
(61760+3)/4 = 15440,75
So the problem should be somewhere inside https://github.com/Blockstream/gdk/blob/master/src/ga_tx.cpp#L1099
The text was updated successfully, but these errors were encountered: