Title: Error message in Bitcoin core Post by: tradri on January 23, 2021, 11:59:51 AM 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? Title: Re: Error message in Bitcoin core Post by: ranochigo on January 23, 2021, 12:06:36 PM 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.
Title: Re: Error message in Bitcoin core Post by: tradri on January 23, 2021, 12:07:48 PM 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? Title: Re: Error message in Bitcoin core Post by: ranochigo on January 23, 2021, 12:59:01 PM 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. Title: Re: Error message in Bitcoin core Post by: tradri on January 23, 2021, 01:31:16 PM 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. |