-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: tss funds migration #1143
Conversation
zetaclient/btc_signer.go
Outdated
estimateFee := float64(gasPrice.Uint64()) * outTxBytesMax / 1e8 | ||
if cointype == common.CoinType_Cmd { |
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.
I think for real Tss migration (TSS had 3 hundreds of UTXOs in Athens3), if we pays only outTxBytesMin
of fee, it may take many blocks (10min per block) for the outTx (many many inputs) to be accepted in a block.
For TSS migration, the thing is to make sure the old tss address has enough funds >= 80_000 sats (4000 * gasPrice (e.g., 20))
to move its own funds away.
Also, I believe the hard coded estimateFee = 4000
can be improved in future too, but that only helps in cases when TSS has only $10 (for example) of BTC in reserve and we want to move $5 to new TSS and paying another $5 as gas fee.
To conclude, we can just remove the estimateFee
adjustment.
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.
Not sure I understand completely, you mean to remove the estimate fee component completely?
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.
I think comment out line 74 and leave the calculation estimateFee := float64(gasPrice.Uint64()) * outTxBytesMax / 1e8
as is would be enough.
!!!WARNING!!! Be very careful about using Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203 Pay extra attention to the way |
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.
looks good to me
@kingpinXD looks like there is a Lint issue blocking the merge |
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Closes:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.
Checklist: