Bitcoin Forum
May 28, 2024, 09:41:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What kind of address has prefix of tb1q?  (Read 244 times)
MChain (OP)
Jr. Member
*
Offline Offline

Activity: 54
Merit: 1


View Profile
May 08, 2018, 02:41:49 PM
 #1

Hello!
I've noticed there are addresses that have prefix of tb1q
Anything special about these addresses?

When I tried to send a little bit of testnet bitcoins to such an address bitcoind did that just fine. But in the pricess it sent a huge amount of bitcoin (relatively to the main amount I was sending) to change address.
Here's that transaction
https://testnet.blockchain.info/tx/3865f0eb3f59dfbef5506e0269430c773df0fa288bc89fb4fcc99ae1a2d8835e
I was sending 0.00008 BTC
But bitcoind sent 0.00909337 BTC as change in the process. And you can see how many unspent inputs it had to spend to do that. Why would it do that?

/
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
May 08, 2018, 02:45:41 PM
 #2

Hello!
I've noticed there are addresses that have prefix of tb1q
Anything special about these addresses?

When I tried to send a little bit of testnet bitcoins to such an address bitcoind did that just fine. But in the pricess it sent a huge amount of bitcoin (relatively to the main amount I was sending) to change address.
Here's that transaction
https://testnet.blockchain.info/tx/3865f0eb3f59dfbef5506e0269430c773df0fa288bc89fb4fcc99ae1a2d8835e
I was sending 0.00008 BTC
But bitcoind sent 0.00909337 BTC as change in the process. And you can see how many unspent inputs it had to spend to do that. Why would it do that?

Correct me if i'm wrong, but aren't tb1q adresses used for the lightning network on the testnet?

I haven't looked into LN that much, but i see this prefix alot in github issues about LN. Ex: https://github.com/lightningnetwork/lnd/issues/812


Quote
Testnet coin uses the prefix ”tb1q”, but due to a bug in the code, the
encoding process only appended ”tb1.” Since the addresses were incorrectly formatted,
all the transactions sent to these addresses were rejected by Testnet, and
the associated money disappeared. This vulnerability would not be easily identi-
fied by inexperienced users. While the prefix has since been fixed, the root of the
problem could be even better remedied if Lightning implemented a verification
system for address formats before broadcasting transactions to the Testnet
https://courses.csail.mit.edu/6.857/2017/project/7.pdf

Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
May 08, 2018, 03:31:02 PM
Merited by AdolfinWolf (2)
 #3

Hello!
I've noticed there are addresses that have prefix of tb1q
Yes, they are Bech32 encoded addresses for the testnet, in contrast to the legacy base58 addresses.
Quote
Anything special about these addresses?
They are usually used for native segwit addresses.
Quote
When I tried to send a little bit of testnet bitcoins to such an address bitcoind did that just fine. But in the pricess it sent a huge amount of bitcoin (relatively to the main amount I was sending) to change address.
Here's that transaction
[url]https://testnet.blockchain.info/tx/3865f0eb3f59dfbef5506e0269430c773df0fa288bc89fb4fcc99ae1a2d8835e[/url]
I was sending 0.00008 BTC
But bitcoind sent 0.00909337 BTC as change in the process. And you can see how many unspent inputs it had to spend to do that. Why would it do that?
Because your testnet addresses had a lot of 0.000009BTC  UTXOs (inputs), so to send 0.00008 BTC it needed ~9 inputs, then it consolidated the remaining UTXOs as change.
btc_enigma
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
May 09, 2018, 10:08:16 AM
 #4

Yes, these are tesnet bech32 addresses.. corresponding prefix on mainnet would be bc1

MChain (OP)
Jr. Member
*
Offline Offline

Activity: 54
Merit: 1


View Profile
May 09, 2018, 07:54:06 PM
 #5

Hello!
I've noticed there are addresses that have prefix of tb1q
Yes, they are Bech32 encoded addresses for the testnet, in contrast to the legacy base58 addresses.
Quote
Anything special about these addresses?
They are usually used for native segwit addresses.
Quote
When I tried to send a little bit of testnet bitcoins to such an address bitcoind did that just fine. But in the pricess it sent a huge amount of bitcoin (relatively to the main amount I was sending) to change address.
Here's that transaction
[url]https://testnet.blockchain.info/tx/3865f0eb3f59dfbef5506e0269430c773df0fa288bc89fb4fcc99ae1a2d8835e[/url]
I was sending 0.00008 BTC
But bitcoind sent 0.00909337 BTC as change in the process. And you can see how many unspent inputs it had to spend to do that. Why would it do that?
Because your testnet addresses had a lot of 0.000009BTC  UTXOs (inputs), so to send 0.00008 BTC it needed ~9 inputs, then it consolidated the remaining UTXOs as change.

Thanks for the reply!
Yes I did generate lots of 0.000009 outputs to test how small an output amount can be.
But it still appears quite odd to me that bitcoind has spent 10 inputs to pay the transaction amount and additionally 840 freaking inputs to spend as change! It makes no sense. Because of such behaviour I am now unable to send transactions due to all transactions being too large. I guess the only way is to manually construct raw transactions for a situation where I have large amount of dust in my wallet.

/
TheQuin
Hero Member
*****
Offline Offline

Activity: 2576
Merit: 882


Freebitco.in Support https://bit.ly/2I9BVS2


View Profile WWW
May 15, 2018, 01:48:23 PM
 #6

I guess the only way is to manually construct raw transactions for a situation where I have large amount of dust in my wallet.

The best thing to do is avoid having a large number of dust UTXOs by regularly sweeping them into larger a UXTO.

freebitcoin.TO WIN A  LAMBORGHINI!..

.
                                ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
                    ▄▄▄▄▄██████████████████████████████████▄▄▄▄
                    ▀██████████████████████████████████████████████▄▄▄
                    ▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
                    ▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
                      ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
                           ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
                   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 16, 2018, 03:10:52 AM
 #7

Thanks for the reply!
Yes I did generate lots of 0.000009 outputs to test how small an output amount can be.
But it still appears quite odd to me that bitcoind has spent 10 inputs to pay the transaction amount and additionally 840 freaking inputs to spend as change! It makes no sense. Because of such behaviour I am now unable to send transactions due to all transactions being too large. I guess the only way is to manually construct raw transactions for a situation where I have large amount of dust in my wallet.
Which command did you use to send the transaction? And did you specify a particular fee or did you let bitcoind handle the fee automatically?

It seems odd that it would just spend the entire contents of the wallet... And it doesn't appear that it's a case of needing to include all the inputs to cover the fee.

Bitcoin-Qt certainly doesn't include all inputs automatically... Although you can by switching on the coin control features and manually selecting inputs.

It's possible the specific create or send command you're using defaults to spending ALL available inputs.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!