Fee Rates
It first tries to fetch fee rate from bb mempool, then mempool.space and finally if they fail it falls back to using bitcoin core.
I have implemented it to use confTarget rather than priority as the priorities can be inferred from the confTarget value and it allows the functionality to be more backward compatible. E.g. we can easily modify any other method currently using confTarget to use this new approach going forward.
I do have a small modification in batching.sh that I haven't committed as I noticed that seems to deal with both fee rate and confTarget already so wasn't sure if the change should be added there.
As well as updating the spend endpoint I have added in a new getfeerate endpoint in case we need to fetch the rates anywhere else.
Example:
curl -d '{"confTarget":6}' proxy:8888/getfeerate
Hm should the domains to query be loaded from a config rather than having bb and mempool.space hard coded?
Probably from configs is ideal
Also the feerate should be added to wasabi spend
Probably from configs is ideal
New commit added making the priorities configurable
Nice PR!
Please move getfeeratefromurl, getpriorityfromconftarget and getfeerate functions from walletoperations.sh to bitcoin.sh.
In requesthandler.sh, rename getfeerate to bitcoin_getfeerate.
Also, we need to add action_bitcoin_getfeerate=watcher to cyphernodeconf_docker/templates/gatekeeper/api.properties for the request to reach the requesthandler.
It would be cool to have a small test-getfeerate.sh in proxy_docker/app/tests/.
Last thing is to add the new endpoint to doc/openapi/v0/cyphernode-api.yaml as well as doc/API.v0.md.
Thanks!!
Nice PR!
Please move
getfeeratefromurl,getpriorityfromconftargetandgetfeeratefunctions fromwalletoperations.shtobitcoin.sh.In
requesthandler.sh, renamegetfeeratetobitcoin_getfeerate.Also, we need to add
action_bitcoin_getfeerate=watchertocyphernodeconf_docker/templates/gatekeeper/api.propertiesfor the request to reach the requesthandler.It would be cool to have a small
test-getfeerate.shinproxy_docker/app/tests/.Last thing is to add the new endpoint to
doc/openapi/v0/cyphernode-api.yamlas well asdoc/API.v0.md.Thanks!!
Should have covered all this off in the 2 commits above
Can you make batchspend() (in batching.sh) use the new getfeerate function?
Can you make
batchspend()(in batching.sh) use the newgetfeeratefunction?
Added!
I rebased on dev