-
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
Switch to more accurate fee estimation endpoint #4235
Conversation
You beat me to it @cd2357; excellent :) Reviewing now, thanks. |
The API endpoint for fee estimations has been changed to one that delivers more accurate fee estimations. This is a temporary solution, until a more decentralized approach is found. Fixes projects/issues/27
e794691
to
e18f040
Compare
I am in the middle of this review, but cannot finish right now. From what I've seen so far, everything looks in order. There are a few small tweaks I'm making, but nothing fundamental. @bisq-network/pricenode-operators, could one or more of you build from this PR and take it for a spin on your side? Kudos, @cd2357 for the quick fix, and seriously great that you implemented the test ;) |
Thanks for implementing this. Can you make it configurable with an environment variable or command line option, and leave the default as mempool.space? This way pricenode operators can optionally set it to their own mempool backend if they have one |
- Polish whitespace and newlines; wrap comments at 90 chars - Use package-private vs protected visibility when exposing BitcoinFeeRateProvider constants for testing - Document that 'maxBlocks' is dead code, but do not remove it yet, as it would disrupt the process of getting this fix out quickly because it would require operators to change the way they start their pricenodes.
Let's do that in a second PR. I have another change that I'd like to see if @cd2357 wants to make as part of my review. Let's get this out as is and asap. My review is incoming in one minute. |
Actually, I think pricenode code allows for multiple data providers, can you also add https://mempool.emzy.de/ as a second provider and poll from both of them? |
Okay :) |
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.
ACK. @cd2357, please see the review commit that I just pushed.
Note that there is an opportunity here for one or more follow-on PRs as well.
The first is to eliminate the maxBlocks
field from BitcoinFeeRateProvider
. You'll see my comments to this effect. Rolling this out means changing the startup scripts and communicating effectively about the change to @bisq-network/pricenode-operators. It would be great if you want to do this, @cd2357.
The second is implementing the configurability that @wiz mentioned in the comments on this PR. We could discuss the best way to do that. It would also be good to deliberate a little further on the implications of querying multiple backends first, though. We've never been in a situation where we could expect to get very divergent results for fee rate estimations, because we've always all been calling the same (earn.com) endpoint. We shouldn't be too hasty on making that switch, which is part of the reason I want to ship this fix as is, nice and minimal.
Really great work here, @cd2357. Thanks!
@wiz, when we merge this, will you drive the @bisq-network/pricenode-operators upgrading?
Well if we merge this as-is and made all pricenode operators upgrade, we would make all of Bisq depend on my single node for mempool fees... can you add emzy's node in as a secondary source so they both get polled? I believe the code already supports this, right? |
FYI my bitcoinaverage subscription will run out 06/06 |
@cd2357, a couple notes on commit e18f040:
|
Thanks, glad I could help :)
If I understood that correctly, this PR should cover it: #4240. I assume there are startup or service scripts which are not committed, which the operators have on their systems. If so, that's one thing they'll have to manually adjust (already described that in the PR comment for their reference). As to communicating it them, I'm not sure who whey are so I can tag them, nor can I use the @bisq-network/pricenode-operators tag you used @cbeams (it doesn't resolve for me, it just stays as text). So I'd leave the comm part to someone else, perhaps @wiz ?
Already started with that, a PR is coming soon. |
The API endpoint for fee estimations has been changed to one that delivers more accurate fee estimations.
This is a temporary solution, until a more decentralized approach is found.
Fixes projects/issues/27