-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Disable fee estimation in blocksonly mode (by removing the fee estimates global) #18766
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
9cf5c47
to
33ca359
Compare
@promag : addressed your feedback. Would be interested about what do you think about disabling the fee estimation in |
Concept ACK / Sounds reasonable. |
Concept ACK. |
Concept ACK, but I don't know enough about the underlying mechanism to be sure if this is a reasonable way to accomplish it. |
Same opinion as above. |
Concept ACK, while the fee estimation should work for some limited time after the mempool has been turned off (see #16840 (comment)), I can see the point to fail early on startup instead of later at runtime. |
Concept ACK 33ca359 |
If the 'blocksonly' mode is turned on after running with transaction relay enabled for a while, the fee estimation will serve outdated data to both the internal wallet and to external applications that might be feerate-sensitive and make use of 'estimatesmartfee' (for example a Lightning Network node). Signed-off-by: Antoine Poinsot <darosior@protonmail.com> Github-Pull: bitcoin#18766 Rebased-From: 33ca359
33ca359
to
d6c1115
Compare
This was intended to be a "quick fix", but the approach seems to be too much of a workaround. I've reworked this to opt for a more involved approach based on #19556. This now:
This is rebased on top of #19556 (which i itself rebased on top of #19604). |
2ddaf65
to
300bf14
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.
Concept ACK cc21167 🚟
Show signature and timestamp
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Concept ACK cc21167415aa01db862035cd07b6b9b35fb53f35 🚟
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUilvAv/d0DZXa+aEjrm/fPzFOmqe/7bGZZTctNR8VQxeQ8DE+Ft7Q7zWo4bvHYl
YeB42SZeTofhU5+ICOGsmxytQ52FA0bPvOJXGH/8zQ6wIvrdTxAhjt5MP3YunOy9
mt8qOOMtLi/RybMV4VgEPDqYZRz27s6LuUxgbgK8YJ5q981pp15LhQ5e0Au4duU0
MQfqwZIqV7L7H5DEcLo/VeN4hVurII5vLg3PK1a56APtW2MKi4lPx5kS17TuAZY5
12kew9JuoaGVrAJKHHzXme0Q+yCwOgptZ1rVEhEYsB11aRG9kkThXvO+oo+oPtc6
SdcGtilVdnfE6x/VNEiD7VTxWgbQ5BUUAPoAoWIrOMDsWB15rcw/dtlAXoHF8JFR
pOJUCK4racs+TPjfwGtAVpjBmqiebzZFNIRPjizMDCKmxEnMCLNNX2l3jR3U3x8M
ObOSwoIIF8W384rupBCjF2+aVnmOsJ2ktx8AFdoNX1NdAs81f0NIfOyoW4hfOl4N
7l5DRdLQ
=6uOX
-----END PGP SIGNATURE-----
Timestamp of file with hash b08551e34b42f9bb8f8e283ece496e30ae7d418c171ecf636076b60c63a83df6 -
4aaad74
to
01e3998
Compare
utACK 01e3998 |
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.
left some style nits. Let me know if you want to fix them or get this merged instead.
review ACK 01e3998 🐪
Show signature and timestamp
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
review ACK 01e39989f23b26a23cea26e5ec4d8dfc2010bc97 🐪
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUhJMgwAwnGF/r7ezo/CimEvIuOfeD6LzJ7NDb6SHs5vwyofUN2w8UojfZ7MxuQV
9kGtWH4oHtzNU5732r2HYPfAGWZI6iJe8HAnZY5fjzC0KoN8PLY2DJ97lS9/rWnb
5Dco0RD4r+g0ZVFnN+mfMrQ47nmDHCiULNP0nbav40iXlWS8IQiZiNNJVKInW0q7
w5M3e3I1Np2PQ3lEMqMJ4An2Dt+WAtHLeA9OYB4b0yoXIc4JtYiiQ/mrogEqkAv/
tWal6S7ElJGmuL+/ceXNg6xXqvKpPT6U4yNxcKR9s/ceyhEngaOt7EmDWWRVVXt7
PkV29eLM4TYmPbasK6dIUei2q+xtDWjzKFgAuMe83+kWDyb8+oqNxZi140xHVG2P
AYlbfKD4JnoGB32tEfzgh/Z9dQj4xG+mWhLYL8I7oUDU/SkC3blBmpwPiSHxmvA8
NWabgQshHcDeKWiw3GpZs6BbMjI6xJnq9Dq8kOmYX5Hz6uT3mIJ76KN31WRHFUfC
6kbMbc1m
=5+en
-----END PGP SIGNATURE-----
Timestamp of file with hash 532e63b9bee4dd7e9da189eb2890bcc77d9c1f37ba300a2a322c9d027b0c9158 -
01e3998
to
34250a1
Compare
Addressed all @MarcoFalke 's remaining nits. |
Concept ACK |
9775dd7
to
8547afd
Compare
Co-Authored-by: MarcoFalke <falke.marco@gmail.com> Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This moves the CBlockPolicyEstimator to the NodeContext, which get rids of two globals and allows us to conditionally create the CBlockPolicyEstimator (and to remove a circular dep). Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
…ions Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This moves the fee_estimates file management to the CBlockPolicyEstimator Flush() method. Co-authored-by: John Newbery <john@johnnewbery.com> Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
8547afd
to
4e28753
Compare
re-ACK 4e28753 👋
Show signature and timestampSignature:
Timestamp of file with hash |
utACK 4e28753 |
Summary: Remove unused method and move variable initialization in init.cpp This is a partial backport of [[bitcoin/bitcoin#18766 | core#18766]] The pull request is mostly not applicable to Bitcoin ABC. The variable moved in init.cpp are just to keep close to the source material and make future backports easier to review. Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D11169
If the
blocksonly
mode is turned on after running with transactionrelay enabled for a while, the fee estimation will serve outdated data
to both the internal wallet and to external applications that might be
feerate-sensitive and make use of
estimatesmartfee
(for example aLightning Network node).
This has already caused issues (for example #16840 (C-lightning), or lightningnetwork/lnd#2562 (LND)) and it seems prudent to fail rather than to give inaccurate values.
This fixes #16840, and closes #16890 which tried to fix the symptoms (RPC) but not the cause as mentioned by sdaftuar :