Skip to content
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

Fee estimation optimized #1004

Merged
merged 5 commits into from
Apr 15, 2021
Merged

Fee estimation optimized #1004

merged 5 commits into from
Apr 15, 2021

Conversation

levonpetrosyan93
Copy link
Contributor

No description provided.

a-bezrukov
a-bezrukov previously approved these changes Apr 5, 2021
// 956 is constant part, mainly Schnorr and Range proof, 2560 is for each sigma/aux data
// 83 assuming 1 jmint, 34 is the size of each normal vout, 10 is the size of empty transaction, 52 other constant parts
nBytes = 956 + 2560 * vOutputs.size() + 83 + CoinControlDialog::payAmounts.size() * 34 + 10 + 52;
nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this formula take new Qk Schnorr proof into account?
We really need to create a set of functions to deal with size estimates and use it instead of such hardcoded estimates. Sooner or later we will end up with estimate which is too low and transactions will be rejected at mempool level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I will update this, I have implemented such function, but it works slow and is making coincontrol work laggy, may be better to include this for now. after some refactorings and optimizations may be such function will be useful.

@lgtm-com
Copy link

lgtm-com bot commented Apr 15, 2021

This pull request introduces 3 alerts when merging 1e30c81 into 72d824c - view on LGTM.com

new alerts:

  • 3 for Unused static function

@levonpetrosyan93 levonpetrosyan93 merged commit 54cc566 into master Apr 15, 2021
@levonpetrosyan93 levonpetrosyan93 deleted the fee_estimation_optimized branch April 15, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants