Bitcoin Forum
July 23, 2019, 08:48:43 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Optimal tx fees suggestor  (Read 1440 times)
btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 05, 2016, 04:11:56 AM
Last edit: February 05, 2016, 04:59:04 PM by btc_enigma
 #1

Hi,

Due to varying loads on bitcoin network, lot of people are facing problems with setting the correct tx fees on transactions. I have comeup with a script that suggests tx fees depending on current network conditions, given wallet addresses / xpub as input.

You can try it here https://github.com/shivaenigma/btxfees

Make sure to install latest version of moneywagon as dependency https://github.com/priestc/moneywagon

Feel free to contribute / let me know suggestions

- Cheers

1563914923
Hero Member
*
Offline Offline

Posts: 1563914923

View Profile Personal Message (Offline)

Ignore
1563914923
Reply with quote  #2

1563914923
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1563914923
Hero Member
*
Offline Offline

Posts: 1563914923

View Profile Personal Message (Offline)

Ignore
1563914923
Reply with quote  #2

1563914923
Report to moderator
1563914923
Hero Member
*
Offline Offline

Posts: 1563914923

View Profile Personal Message (Offline)

Ignore
1563914923
Reply with quote  #2

1563914923
Report to moderator
wayniac30
Sr. Member
****
Offline Offline

Activity: 368
Merit: 250


View Profile
February 05, 2016, 11:04:44 AM
 #2

I was actualy thinking of building a website that does exactly that... wanna work together on it?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1484
Merit: 1315


No I dont escrow anymore.


View Profile WWW
February 05, 2016, 12:22:42 PM
 #3

Sooo cointape[1], but I have to give you my address for some reason? Why exactly do you need the address and what would be the difference (if any) to cointape?

[1] http://www.cointape.com/
btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 05, 2016, 04:32:30 PM
 #4

This script isn't meant to replace cointape. Acutally you can use it together with cointape.

1. Cointape / other service will just tell fee in satoshi/byte
2. Your wallet addresses are needed to form a tx and calculate the size of tx.

The script is opensource and use different API providers to maintain privacy of your address. See privacy section in https://github.com/shivaenigma/btxfess

btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 05, 2016, 04:35:19 PM
 #5

I was actualy thinking of building a website that does exactly that... wanna work together on it?

Nice . Can you tell more details on what the website will do

CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1003


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 05, 2016, 04:36:11 PM
 #6

I would assume the need for an address is to find the UTXOs as you can't calculate the fees without them.

(it should allow for multiple UTXOs though and they are not necessarily going to be linked to a single address)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 05, 2016, 04:48:14 PM
 #7

I would assume the need for an address is to find the UTXOs as you can't calculate the fees without them.

(it should allow for multiple UTXOs though and they are not necessarily going to be linked to a single address)


Yes, address is needed to select UTXO to spend. You can specify multiple address / xpubs in input.
It will select inputs from those addresses to maximize tx priority https://github.com/priestc/moneywagon/commit/e336c8769adedbd314857aa92b0cdc9b3ae25828

Regards

Redrose
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile
February 05, 2016, 04:49:46 PM
 #8

Even if I don't see any utility to this actually since I always set the same tx fees, I might try it later and fall in love with it Cheesy.


                 ▄▄▄██████████████████▄▄▄
            ▄▄██▀▀▀▀▀███████████████████████▄▄
        ▄▄███▀   ▄▄▄   ▀████████████████████████▄▄
     ▄██████  ▄███████▄  ▀██████████████████▀▀▀█████▄
   ▄███████    ███▀▀ ██    ███████████  ███▀  ▄███████▄
  █████████▄  ▄█▀  ▄███    ██████████  ▄██  ▄███████████
 ██████████████▀  ████▀   ▄██▀▀▀████  ▄████▀  ███████████
██████████████▀  ▄███▀   ▄█▀  ▄▄ ██▀ ▄█  ██  █████████████
██████████████   ▀     ▄██▀  ▄█  █▀  █   █▀▄  ▀███████████
█████████████▀  ▄███▄  ▀██   ██ ▄▄▄  █▀ ▄▄▀█▄  ▀▄█████████
█████████████   █████   ▀██▄ ▀▄████▄  ▄███▄▀  ▄███████████
 █████   ▀██▀  ▄█████    █▀▀█████████████████▀███████████
  ████   ▄█▀   █████    ██ ▀▄█▀▄▄▀█ ▀▄▀█▀▄▀ █▀█ ▀▄██████
   ▀███▄▄   ▄█▄ ▀▀     ███ █ █ ▄▄▄█  █ █ █  █ █ ██████▀
     ▀██████████▄▄▄▄▄█████▄█▄██▄▄██ █▄███▄█▄█▄█▄████▀
        ▀▀██████████████████████████████████████▀▀
            ▀▀██████████████████████████████▀▀
                 ▀▀▀██████████████████▀▀▀
      ..Supported by..
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
|
|
|
|

   ▀██▄       ▀████▄
▄    ▀██          ▀██▄
██▄ ▄███         ▄█████▄▄
 ▀███████▄     ▄██▀ ▀▀████
      ▀████▄ ▄██▀     ▀█▀
        ▀████▄
        ▄█▀████▄
      ▄███▄▀▀████▄
    ▄████▀    ▀████▄
  ▄████▀        ▀██▀█▄
  ▀██▀            ▀██▀
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1484
Merit: 1315


No I dont escrow anymore.


View Profile WWW
February 05, 2016, 06:04:51 PM
 #9

I would assume the need for an address is to find the UTXOs as you can't calculate the fees without them.

(it should allow for multiple UTXOs though and they are not necessarily going to be linked to a single address)


Yes, address is needed to select UTXO to spend. You can specify multiple address / xpubs in input.
It will select inputs from those addresses to maximize tx priority https://github.com/priestc/moneywagon/commit/e336c8769adedbd314857aa92b0cdc9b3ae25828

Regards

I suspected as much, but as CIYAM said you would need all possible addresses as well as (at the very least) the number of outputs (+1 for change) and the amount I want to send. Im not sure this is something I would be willing to disclose just to get a fee estimate.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1003


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 05, 2016, 06:06:52 PM
 #10

Im not sure this is something I would be willing to disclose just to get a fee estimate.

Doesn't the latest version of Bitcoin let you work this out itself?

(if not then maybe that should be a suggested addition for it)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1484
Merit: 1315


No I dont escrow anymore.


View Profile WWW
February 05, 2016, 06:20:14 PM
 #11

Im not sure this is something I would be willing to disclose just to get a fee estimate.

Doesn't the latest version of Bitcoin let you work this out itself?

(if not then maybe that should be a suggested addition for it)

Yes it does. Via bitcoin-cli as well as via the UI. Its not common though. Electrum has something similar which AFAIK is based on the core estimate by the server you connect to. I understand the need for something like this, but they require a lot of information. I dont know if its reasonable to assume that people would willingly disclose their master public key for a fee estimate.

Code:
Time: 19:18:06,48
#blk fee/kb
1 0.00052265
2 0.00024685
3 0.00016556
4 0.00015083
5 0.00015083
6 0.00013736
7 0.00010566
8 0.00010566
9 0.00010566
10 0.00010566
11 0.00006424
12 0.00006424
13 0.00006424
14 0.00006424
15 0.00006424
16 0.00006424
17 0.00006424
18 0.00006424
19 0.00006424
20 0.00006424
21 0.00006424
22 0.00006424
23 0.00006424
24 0.00006424
25 0.00006424
btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 06, 2016, 05:07:37 AM
 #12

Quote
Yes it does. Via bitcoin-cli as well as via the UI. Its not common though. Electrum has something similar which AFAIK is based on the core estimate by the server you connect to. I understand the need for something like this, but they require a lot of information. I dont know if its reasonable to assume that people would willingly disclose their master public key for a fee estimate.

Let me clarify, you don't need to disclose anything . This is not an external service, its a opensource script that you need to run on your system. The master public key is also never submitted to external API server. The script does a BIP32 walkthrough and verifies address txout using API calls to random API providers to maintain privacy.

Summary:
Usage is very simple . Before spending money from your wallet , run this script with your master public key to get optimal fee. Set that fee in your wallet , or use the fee wallet is suggesting.

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1484
Merit: 1315


No I dont escrow anymore.


View Profile WWW
February 06, 2016, 08:47:48 AM
 #13

Quote
Yes it does. Via bitcoin-cli as well as via the UI. Its not common though. Electrum has something similar which AFAIK is based on the core estimate by the server you connect to. I understand the need for something like this, but they require a lot of information. I dont know if its reasonable to assume that people would willingly disclose their master public key for a fee estimate.

Let me clarify, you don't need to disclose anything . This is not an external service, its a opensource script that you need to run on your system. The master public key is also never submitted to external API server. The script does a BIP32 walkthrough and verifies address txout using API calls to random API providers to maintain privacy.

Summary:
Usage is very simple . Before spending money from your wallet , run this script with your master public key to get optimal fee. Set that fee in your wallet , or use the fee wallet is suggesting.

Im not here to shit on your work. If it looks like that, Im sorry. Im just trying to say that there will be next to no demand for this. I intially thought it was your back end script and not something to be run locally though.

You either make it easily accessible and have the potential privacy issue or you only attract people that will run the python scripts with the needed dependencies. This does not make this a bad tool and it certainly will have its uses. IMHO you should add a number of recipients though, right now you assume a single (+ change) output. It also seems like you use all inputs[1] for all given addresses[2], which would make your estimate an upper bound at best.

[1] https://github.com/priestc/moneywagon/blob/master/moneywagon/tx.py#L75
[2] https://github.com/shivaenigma/btxfees/blob/master/main.py#L54
bitcoinear
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
February 06, 2016, 03:00:35 PM
 #14

Why don't you just use the source code and building up your planned site? As far as I see the code is open source, so you can use it for your project.

I was actualy thinking of building a website that does exactly that... wanna work together on it?
btc_enigma
Hero Member
*****
Offline Offline

Activity: 648
Merit: 502


View Profile
February 06, 2016, 03:14:18 PM
 #15

Quote
Yes it does. Via bitcoin-cli as well as via the UI. Its not common though. Electrum has something similar which AFAIK is based on the core estimate by the server you connect to. I understand the need for something like this, but they require a lot of information. I dont know if its reasonable to assume that people would willingly disclose their master public key for a fee estimate.

Let me clarify, you don't need to disclose anything . This is not an external service, its a opensource script that you need to run on your system. The master public key is also never submitted to external API server. The script does a BIP32 walkthrough and verifies address txout using API calls to random API providers to maintain privacy.

Summary:
Usage is very simple . Before spending money from your wallet , run this script with your master public key to get optimal fee. Set that fee in your wallet , or use the fee wallet is suggesting.

Im not here to shit on your work. If it looks like that, Im sorry. Im just trying to say that there will be next to no demand for this. I intially thought it was your back end script and not something to be run locally though.
no problem

Quote
You either make it easily accessible and have the potential privacy issue or you only attract people that will run the python scripts with the needed dependencies. This does not make this a bad tool and it certainly will have its uses. IMHO you should add a number of recipients though, right now you assume a single (+ change) output. It also seems like you use all inputs[1] for all given addresses[2], which would make your estimate an upper bound at best.

[1] https://github.com/priestc/moneywagon/blob/master/moneywagon/tx.py#L75
[2] https://github.com/shivaenigma/btxfees/blob/master/main.py#L54

- Yes the audience are technical people who want to run python scripts.
- IMHO you should add a number of recipients though, right now you assume a single (+ change) output : Yes, good suggestion , I can add a parameter to specify number of recipients
- It doesn't use all inputs , it selects input based on tx priority . I already mentioned that in my previous post https://bitcointalk.org/index.php?topic=1353503.msg13785664#msg13785664. The algorithm is similar to what electrum does, I am open to adding more algorithm which can mirror other wallets

I understand there may be less demand for this kind of script as already some wallets have dynamic tx fee suggestion.  Just wanted to contribute and put it out there.The plan is to add multiple tx fee suggestion by using cointape API. Wallet would normally just recommend only one fess. An technical user can use this script to his advantage. Anymore suggestions are welcome.

Thanks


shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1484
Merit: 1315


No I dont escrow anymore.


View Profile WWW
February 06, 2016, 06:41:39 PM
 #16

-snip-
- Yes the audience are technical people who want to run python scripts.
- IMHO you should add a number of recipients though, right now you assume a single (+ change) output : Yes, good suggestion , I can add a parameter to specify number of recipients
- It doesn't use all inputs , it selects input based on tx priority . I already mentioned that in my previous post https://bitcointalk.org/index.php?topic=1353503.msg13785664#msg13785664. The algorithm is similar to what electrum does, I am open to adding more algorithm which can mirror other wallets

Alright, I probably misread the source, python is not my strongest language.

I understand there may be less demand for this kind of script as already some wallets have dynamic tx fee suggestion.  Just wanted to contribute and put it out there.The plan is to add multiple tx fee suggestion by using cointape API. Wallet would normally just recommend only one fess. An technical user can use this script to his advantage. Anymore suggestions are welcome.

Thanks

I like that idea a lot, mainly because different wallets have different ways to select inputs. If your script could predict them reliable that would be very interesting. There might be significant differences in the resulting fee.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!