-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Segwit fee estimation #4710
Segwit fee estimation #4710
Conversation
btw, the intention of this PR is not to refactor/improve the way fee calculation is done in bisq. It just pretends to take advantage of segwit fee reduction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
e823db2
to
46f0a9e
Compare
Is it planned to move to a bitcoinj native estimation model in a future PR? |
I have no plans to add any further code regarding fee estimation. What do you mean by "bitcoinj native estimation model"? Bisq uses bitcoinj fee estimation code and builds on top of it. Maybe you mean to use bicoinj 0.15's SendRequest.recipientsPayFees feature?. I think it would be great to rewrite bisq's fee estimation code, but I think it is out of scope for the segwit integration project. |
I was referring to the fee estimation you implemented for BitcoinJ. I don't know any details about it, but I thought it was planned to use that in future. |
46f0a9e
to
7740e3e
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Users reduce btc miner fees for segwit txs.
Pre-segwit miners used to evaluate tx fee and tx size. Txs were selected by their fee/byte.
Segwit brought the concept of "virtual size".
virtual size of a tx = tx serialized without witness data size + witness size (i.e. pub keys and signatures) / 4.
The virtual size of a legacy tx is the same as its size.
Segwit txs have similar sizes compared to legacy txs, but their virtual size is smaller.
New terms are now used such as vsize, vbyte, fee/vbyte, etc.
Miners now compare txs by its fee/vbyte (This is not entirely true, since they use tx weight, but we can do our math using fee/vbyte which is roughly equivalent)
See https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#additional-definitions for more info.
This PR does not include renaming size to vsize, feePerByte to feePerVbyte, etc.
I expect this PR won't be merged to master for quite some time.
The renames will introduce hundreds of changes all over the code, leading to merging hell.
I plan to do the renames either when merging date is closer or as an independent PR.
I suggest to use this link oscarguindzberg/bisq@segwit...oscarguindzberg:fee-estimation to understand the content of this PR until #4612 is merged. Otherwise you will find here the content for both PRs making understanding this PR more difficult