Bitcoin Forum
May 08, 2024, 12:25:44 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BitcoinCore: How to use bumpfee command the right way?  (Read 167 times)
SacWheeler (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 16


View Profile
July 04, 2021, 07:00:35 PM
Merited by o_e_l_e_o (2), NotATether (2), ABCbits (1)
 #1

Hi

I created a transaction with the RBF option. Now I want to try the bumpfee command and set a specific fee.

./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:


Pleas help. How do I use the options of a bitcoin-cli command properly?
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715171144
Hero Member
*
Offline Offline

Posts: 1715171144

View Profile Personal Message (Offline)

Ignore
1715171144
Reply with quote  #2

1715171144
Report to moderator
khaled0111
Legendary
*
Offline Offline

Activity: 2520
Merit: 2853


Top Crypto Casino


View Profile WWW
July 04, 2021, 09:14:21 PM
Last edit: July 04, 2021, 09:40:54 PM by khaled0111
Merited by o_e_l_e_o (4), ABCbits (2), hugeblack (2), hosseinimr93 (1)
 #2

What version do you use? For versions older than 0.21 the fee_rate must be in btc per Kvb.

Converting 20 sat/vb gives us 0.0002 btc/Kvb. So if you're using an old version replace 20 by 0.0002 and see if it works.

Also make sure that:
    - the new fee is higher than the original fee plus relay fee.
    - the change output or inputs in your wallet are enough to cover the difference.
Otherwise the transaction will fail.

Since version 0.21 the fee rate is in sat/vb, for older versions it's in btc/Kvb

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
hugeblack
Legendary
*
Offline Offline

Activity: 2506
Merit: 3647


Buy/Sell crypto at BestChange


View Profile WWW
July 05, 2021, 02:01:00 AM
 #3

Hi

I created a transaction with the RBF option. Now I want to try the bumpfee command and set a specific fee.

./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:


Pleas help. How do I use the options of a bitcoin-cli command properly?

the right way is ---> bumpfee "txid" ( options )
The options you are allowed to use this instruction are shown in the link below.

https://chainquery.com/bitcoin-cli/bumpfee


The error is caused by the use of a statement that is not among those options.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
July 05, 2021, 02:58:54 AM
Merited by o_e_l_e_o (4), ABCbits (2), hugeblack (2), khaled0111 (1), hosseinimr93 (1), Husna QA (1)
 #4

./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:
The error indicates that the json object was constructed incorrectly.

If you want to add an optional "fee_rate", you just have to enclose it with either a single quotation marks or alternate the use of \" and ".
Examples:
Code:
bumpfee "TXID" '{"fee_rate":20}'
Code:
bumpfee "TXID" "{\"fee_rate\":20}"



https://chainquery.com/bitcoin-cli/bumpfee

The error is caused by the use of a statement that is not among those options.
Chainquery's bitcoin RPC is based from v0.18, which is quite outdated.
You can refer to: https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/bumpfee/ for the updated options.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6730


bitcoincleanup.com / bitmixlist.org


View Profile WWW
July 05, 2021, 07:12:03 AM
 #5

Code:
bumpfee "TXID" '{"fee_rate":20}'

This will not work on Windows CMD because the single quotes are not interpreted as combining all the characters together into one string. This is particularly a problem for JSON because commas are treated the same as spaces for parsing delimiters. You have to use the double-quote version, or use Powershell instead.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
July 05, 2021, 08:09:41 AM
 #6

This will not work on Windows CMD because the single quotes are not interpreted as combining all the characters together into one string. This is particularly a problem for JSON because commas are treated the same as spaces for parsing delimiters. You have to use the double-quote version, or use Powershell instead.
I suppose he's not using Windows CMD because his original command starts with "./" which wont work in it.
AFAIK the first example won't work in PowerShell either, just the other option but instead of "{\"fee_rate\":20}", should be: '{\"fee_rate\":20}' in PowerShell.

It's better if he mentioned his OS, right?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
SacWheeler (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 16


View Profile
July 05, 2021, 11:14:38 AM
 #7

Tanks for all the replies! It makes sense that the error is coming from an incorrectly constructed json object.
I am using MacOS 11.4 and BitcoinCore 0.21.1.
So how do I use the options for a command on my system correctly?

Code:
bumpfee "TXID" '{"fee_rate":20}'
OR
Code:
bumpfee "TXID" "{\"fee_rate\":20}"

Thanks for your help
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
July 05, 2021, 12:39:14 PM
 #8

Tanks for all the replies! It makes sense that the error is coming from an incorrectly constructed json object.
I am using MacOS 11.4 and BitcoinCore 0.21.1.
So how do I use the options for a command on my system correctly?
I'm not using Mac but the best way to find out which will work is to try them.
Use it the way you're using bitcoin-cli, just fix the last part (the json object) where you missed a few quotation marks.

Code:
./bitcoin-cli bumpfee "TXID" "{\"fee_rate\":20}"
Or the other one.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
SacWheeler (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 16


View Profile
July 05, 2021, 01:06:41 PM
 #9

I can confirm that both variations are working on my system

Code:
bitcoin-cli bumpfee "TXID" '{"fee_rate":20}'
AND
Code:
bitcoin-cli bumpfee "TXID" "{\"fee_rate\":20}"

Thanks for the support Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!