Bitcoin Forum
May 30, 2024, 01:12:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Error message in Bitcoin core  (Read 106 times)
tradri (OP)
Jr. Member
*
Offline Offline

Activity: 48
Merit: 1


View Profile
January 23, 2021, 11:59:51 AM
 #1

Hello, I am following this guide https://medium.com/blockchainedu/how-to-write-stuff-on-the-blockchain-bdae1704f24d and everything works fine up until the last step, where I get the error "dust (code -26)" instead of the transaction ID.

What am I doing wrong?
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
January 23, 2021, 12:06:36 PM
 #2

Is one of your outputs is below 546 or 294 satoshis. If that's the case, you have to omit that output or use less funds as your fees.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
tradri (OP)
Jr. Member
*
Offline Offline

Activity: 48
Merit: 1


View Profile
January 23, 2021, 12:07:48 PM
 #3

Is one of your outputs is below 546 or 294 satoshis. If that's the case, you have to omit that output or use less funds as your fees.

how do I determine the optimal change I should use when creating the transaction?
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
January 23, 2021, 12:59:01 PM
 #4

how do I determine the optimal change I should use when creating the transaction?
Calculate the fees that you require.
- Assuming Bech32 (bc1...) transaction
A typical bech32 transaction should be roughly 110 vbytes, assuming 1 input and 1 output. Add the size of your OP_return message as well, that'll be roughly 190vbytes, give or take. Your fees should not be below 190 satoshi, if you want a confirmation anytime soon you would probably be looking at ~ 2290vbytes , deduct the transaction fees from the inputs and you would be left with the change that you should have. If it's below 294 satoshis, you should probably just omit it completely.

That being said, please do not craft the raw transaction yourself if you're not familiar with what you're doing. If you want, using a utility like Coinb.in to craft it and validate using your Bitcoin Core client would probably be more suitable. If you're just looking to experiment with it, either use regtest or Testnet.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
tradri (OP)
Jr. Member
*
Offline Offline

Activity: 48
Merit: 1


View Profile
January 23, 2021, 01:31:16 PM
 #5

how do I determine the optimal change I should use when creating the transaction?
Calculate the fees that you require.
- Assuming Bech32 (bc1...) transaction
A typical bech32 transaction should be roughly 110 vbytes, assuming 1 input and 1 output. Add the size of your OP_return message as well, that'll be roughly 190vbytes, give or take. Your fees should not be below 190 satoshi, if you want a confirmation anytime soon you would probably be looking at ~ 2290vbytes , deduct the transaction fees from the inputs and you would be left with the change that you should have. If it's below 294 satoshis, you should probably just omit it completely.

That being said, please do not craft the raw transaction yourself if you're not familiar with what you're doing. If you want, using a utility like Coinb.in to craft it and validate using your Bitcoin Core client would probably be more suitable. If you're just looking to experiment with it, either use regtest or Testnet.

already figured it out, thanks.
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!