cyphernode icon indicating copy to clipboard operation
cyphernode copied to clipboard

Fee Rates

Open Talej opened this issue 2 years ago • 9 comments

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

Talej avatar Nov 09 '23 07:11 Talej

Hm should the domains to query be loaded from a config rather than having bb and mempool.space hard coded?

Talej avatar Nov 09 '23 07:11 Talej

Probably from configs is ideal

BullishNode avatar Nov 10 '23 12:11 BullishNode

Also the feerate should be added to wasabi spend

BullishNode avatar Nov 10 '23 12:11 BullishNode

Probably from configs is ideal

New commit added making the priorities configurable

Talej avatar Nov 11 '23 04:11 Talej

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!!

Kexkey avatar Nov 30 '23 19:11 Kexkey

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!!

Should have covered all this off in the 2 commits above

Talej avatar Dec 01 '23 03:12 Talej

Can you make batchspend() (in batching.sh) use the new getfeerate function?

Kexkey avatar Dec 06 '23 19:12 Kexkey

Can you make batchspend() (in batching.sh) use the new getfeerate function?

Added!

Talej avatar Dec 06 '23 22:12 Talej

I rebased on dev

Kexkey avatar Feb 22 '24 18:02 Kexkey