Author

Topic: understanding transactions (Read 2481 times)

newbie
Activity: 2
Merit: 0
November 14, 2014, 03:37:09 PM
#28
HELP

my auto withdraw of Hirocoin (HIRO) still pending more than 3 days.

1582.00775202   HD2HUMnqeGPaKnjXpyEM9H4YX7nNnp78X7 (igorp73)
TxID: Status: Pending


 coinmine.pw user name= skywalker_70
thanks
full member
Activity: 129
Merit: 100
August 08, 2014, 02:50:49 AM
#27
Quote
I already asked it somewhere, but without a reply. Why not many testnets? Then all these people with ASIC's would split on them, and I would be able to choose a testnet with the lowest difficulty. Why not?

The answer is: use testnet-in-a-box
(I tried to use it at my very early steps to bitcoin without success)

Yes, I know about it, but I'm technically disabled:) (If this is correct in english:))

From what I know it just doesn't work well in Windows, and I have it in my job.
legendary
Activity: 1260
Merit: 1019
August 08, 2014, 02:46:38 AM
#26
Quote
I already asked it somewhere, but without a reply. Why not many testnets? Then all these people with ASIC's would split on them, and I would be able to choose a testnet with the lowest difficulty. Why not?

The answer is: use testnet-in-a-box
(I tried to use it at my very early steps to bitcoin without success)
full member
Activity: 129
Merit: 100
August 08, 2014, 02:44:07 AM
#25
Quote
PS. syncing testnet is so slow... voting for restarting testnet3 to testnet4

IMHO syncing is the smallest problem, difficulty is the problem. On my machine it would take ~45 days to solve a block. Which I would like to do someday:) People are using ASICs on testnet probably.

I already asked it somewhere, but without a reply. Why not many testnets? Then all these people with ASIC's would split on them, and I would be able to choose a testnet with the lowest difficulty. Why not?
legendary
Activity: 1260
Merit: 1019
August 08, 2014, 02:39:58 AM
#24
Quote
Send them to the faucets.

sent 66.0 testcoins to msj42CCGruhRsFrGATiUuh25dtxYtnpbTx ( http://tpfaucet.appspot.com/ )
sent 66.0 testcoins to mrPGg2i9fccYZKnL2np1WhYSy7HpCEgFMQ ( http://faucet.xeno-genesis.com/ )
sent 66.0 testcoins to mo2f3N8WRVQ2kG6Y3j4UFHMzN9eS8BpK3E ( http://testnet.bitcoin.peercoinfaucet.com/ )

in transaction http://test.webbtc.com/tx/bc8150e5b50685747337c0f9f697aa2a0c3c1b6056e0b2bc06c933571d1cf0ff

PS. syncing testnet is so slow... voting for restarting testnet3 to testnet4
newbie
Activity: 15
Merit: 0
August 08, 2014, 02:32:53 AM
#23
this all for set on website . for any transaction will be made?
legendary
Activity: 1358
Merit: 1001
https://gliph.me/hUF
August 07, 2014, 10:24:15 PM
#22
[...] Who wants them? [...]

Send them to the faucets.
full member
Activity: 129
Merit: 100
August 07, 2014, 12:57:45 AM
#21
wow  Grin should i put my address into the signature for donations?

You definitely should:) I bookmarked this thread and as soon as I'll get some btc I'll surely send you something.

Thank you again for everything!

legendary
Activity: 1260
Merit: 1019
August 06, 2014, 02:54:38 PM
#20
Quote
is what u want to do?

This is not a problem on testnet. Let him to make this mistake before teaching him.

By the way. I have a lot of testnet coins. Who wants them? PM me your testnet address
newbie
Activity: 43
Merit: 0
August 06, 2014, 02:49:36 PM
#19

After listunspent I have this transaction among others:

{
"txid" : "d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8",
"vout" : 1,
"address" : "msmhYhrXtYAxerUCNfDAXu97xwaZ3JqxH6",
"scriptPubKey" : "76a914866b70364391e0ba5514cc30cb45f12291bc6cf788ac",
"amount" : 0.33900000,
"confirmations" : 65
},

I want to send 0.02 BTC, So I do:
createrawtransaction [{\"txid\":\"d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8\",\"vout\":1}] {\"mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck\":0.02}

(mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck is another address of mine)

Is that OK?

0.339 - 0.2 = 0.319

u paying 0.319 BTC transaction fee

is what u want to do?

if no then createrawtransaction need 2nd output to address from u wallet.
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 01:55:52 PM
#18
wow  Grin should i put my address into the signature for donations?
newbie
Activity: 15
Merit: 0
August 06, 2014, 12:58:45 PM
#17
I want to say "thanks" to both the OP and Amaclin for this post. It is great when someone posts really concise, step by step and intelligent questions and then another replies with equally concise, step by step and intelligent answers. I, myself, am just starting to delve into understanding transactions so I have bookmarked this baby.

Thank you both!

he is real hero . thats full and easy step from him
what a amazing man wiiith brightshine .
full member
Activity: 178
Merit: 100
August 06, 2014, 11:14:51 AM
#16
I want to say "thanks" to both the OP and Amaclin for this post. It is great when someone posts really concise, step by step and intelligent questions and then another replies with equally concise, step by step and intelligent answers. I, myself, am just starting to delve into understanding transactions so I have bookmarked this baby.

Thank you both!
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 10:57:11 AM
#15
Quote
OK, I need to go home now. *Big* thank you for your help amaclin! Tomorrow I'll have to wrap my head around it all over again:)

By the way: do not forget about "change" output and fees working with mainnet.
hero member
Activity: 642
Merit: 500
Evolution is the only way to survive
August 06, 2014, 10:37:54 AM
#14
./bitcoind getrawtransaction d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8  and then decoderawtransaction first, make sure you have set the right vout
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 10:03:47 AM
#13
Quote
But then why bitcoin-qt said code: -25 (in red) ?

Something was wrong while sending. I have sources for bitcoin 0.8.x version. There is no -25 error code there.
Are you using v0.9? Have a look into bitcoinrpc.h file
full member
Activity: 129
Merit: 100
August 06, 2014, 09:56:57 AM
#12
Ha, yes, I've just received it, thanks.

But then why bitcoin-qt said code: -25 (in red) ?

Edit:

OK, I need to go home now. *Big* thank you for your help amaclin! Tomorrow I'll have to wrap my head around it all over again:)
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 09:55:22 AM
#11
Quote
result (error):
(code -25)

I've pushed your transaction via http://test.webbtc.com/relay_tx
So it is (it was) correct

Update: now it is confirmed http://test.webbtc.com/tx/7f850e2a177fb494492d3ad7707cceaa410106b3c6ce0385f876d24acad653ab
full member
Activity: 129
Merit: 100
August 06, 2014, 09:37:28 AM
#10
Thank you, you're a nice guy!

So now I'm trying to send it:

sendrawtransaction 0100000001a8d0102b1fa655a282996d839a199478276625baa454b4743bbd5d7f10dbe5d801000 0006a473044022031e60b2d340e350d871809492f3d0b4d7dda2eae11c4e729be648a9c87b2fc18 02207bd0fbd9614dc08f14b9092559de106417373a8a1d9353767874a95aa302973b012102d9c1d 8bc2862f6946ea055743551abb385492069da38bdc0ec8e3e875ec87875ffffffff0180841e0000 0000001976a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae88ac00000000

result (error):
(code -25)

Debug log doesn't say anything. Actually, it looks like it stopped logging things an hour ago...
And google doesn't help either.

Update, was that an error? Because I've just received those 0.02 btc, transaction hash is OK:
7f850e2a177fb494492d3ad7707cceaa410106b3c6ce0385f876d24acad653ab

So, why was it in red, and this minus sign before...
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 09:29:28 AM
#9
Quote
"script":"473...c87875" //question 0: this is again scriptSig, this time signed, right? But why can't be it "decoded" just like scriptPubKey below?
There is nothing interesting in scriptSig - there are two operations. Signature and publicKey

Quote
  "hash":"7f850e2a177fb494492d3ad7707cceaa410106b3c6ce0385f876d24acad653ab",//question 1: I thought this is transaction ID, then why did it change after signing it?
There is no "ID" field in transaction itself. Transaction ID is a hash of its contents. Contents was changed. So the hash will be different

Quote
"script_string":"OP_DUP OP_HASH160 b7f7543883c4fd010aeb1ef63b5e888487dd08ae OP_EQUALVERIFY OP_CHECKSIG",//question 3: this is the same as in above, but I forgot to ask, this is the scriptPubKey, right?
Yes
full member
Activity: 129
Merit: 100
August 06, 2014, 08:56:50 AM
#8
Thanks!

So I'm signing the transaction:

signrawtransaction 0100000001a8d0102b1fa655a282996d839a199478276625baa454b4743bbd5d7f10dbe5d801000 00000ffffffff0180841e00000000001976a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae 88ac00000000

result is OK, and after decoding I have:

{
   "lock_time":0,
   "inputs":[
      {
         "prev_out":{
            "index":1,
            "hash":"d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8"
         },
         "script":"473044022031e60b2d340e350d871809492f3d0b4d7dda2eae11c4e729be648a9c87b2fc1802207 bd0fbd9614dc08f14b9092559de106417373a8a1d9353767874a95aa302973b012102d9c1d8bc28 62f6946ea055743551abb385492069da38bdc0ec8e3e875ec87875" //question 0: this is again scriptSig, this time signed, right? But why can't be it "decoded" just like scriptPubKey below?
      }
   ],
   "vout_sz":1,
   "hash":"7f850e2a177fb494492d3ad7707cceaa410106b3c6ce0385f876d24acad653ab",//question 1: I thought this is transaction ID, then why did it change after signing it?
   "vin_sz":1,
   "out":[
      {
         "address":"1Hmiwpos8p7dijjmKmuMcEJBJeuaQzY3Mv",
         "script_string":"OP_DUP OP_HASH160 b7f7543883c4fd010aeb1ef63b5e888487dd08ae OP_EQUALVERIFY OP_CHECKSIG",//question 3: this is the same as in above, but I forgot to ask, this is the scriptPubKey, right?
         "value":2000000,
         "script":"76a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae88ac"
      }
   ],
   "size":191,
   "version":1
}
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 08:26:09 AM
#7
Quote
Quote
Blockchain.info site decodes this transaction as for mainnet.
Ouch Embarrassed But can I assume that everything except for this receiving address is OK?
Yes
full member
Activity: 129
Merit: 100
August 06, 2014, 08:21:56 AM
#6
Quote
Well, I have no idea. I'm working entirely in testnet mode. I did run mainnet before but it's closed now. Do you have an idea?
Of course. You have said above:
Quote
After decoding it at https://blockchain.info/decode-tx I have (questions inside):
Blockchain.info site decodes this transaction as for mainnet.

Quote
I found out that this "hash160" is a ripemd160(sha256(address)) is this correct?
No.
Your public key is long array of bytes (64 bytes to be correct)
It is too long to be used as an address and it does not have checksums for error handling
So, there is a hash function which converts public key to 20 bytes (there are 2 ways to do it)
b7f7543883c4fd010aeb1ef63b5e888487dd08ae - is the result of this written in hex digits
This line is also bad for using as your address - it is still too long and also does not have error-cheching
So, there is base58check function which converts 20 bytes to bitcoin address

read this
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses
https://en.bitcoin.it/wiki/Base58Check_encoding



Thanks. I was going to ask you if I also have to fully understand addresses to understand transactions, then I saw last two lines of your answer:)

So thanks. I'll read it.

Quote
Blockchain.info site decodes this transaction as for mainnet.
Ouch Embarrassed But can I assume that everything except for this receiving address is OK?
newbie
Activity: 13
Merit: 0
August 06, 2014, 08:12:19 AM
#5
i dont know about thats maybe some error system on it .
 Huh Huh
legendary
Activity: 1260
Merit: 1019
August 06, 2014, 08:07:15 AM
#4
Quote
Well, I have no idea. I'm working entirely in testnet mode. I did run mainnet before but it's closed now. Do you have an idea?
Of course. You have said above:
Quote
After decoding it at https://blockchain.info/decode-tx I have (questions inside):
Blockchain.info site decodes this transaction as for mainnet.

Quote
I found out that this "hash160" is a ripemd160(sha256(address)) is this correct?
No.
Your public key is long array of bytes (64 bytes to be correct)
It is too long to be used as an address and it does not have checksums for error handling
So, there is a hash function which converts public key to 20 bytes (there are 2 ways to do it)
b7f7543883c4fd010aeb1ef63b5e888487dd08ae - is the result of this written in hex digits
This line is also bad for using as your address - it is still too long and also does not have error-cheching
So, there is base58check function which converts 20 bytes to bitcoin address

read this
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses
https://en.bitcoin.it/wiki/Base58Check_encoding

full member
Activity: 129
Merit: 100
August 06, 2014, 07:36:15 AM
#3
Thank you!

Quote
Quote
 "address":"1Hmiwpos8p7dijjmKmuMcEJBJeuaQzY3Mv",//question 3: is this a receiving address created by the wallet? Or something else?
Yes. But why does it starts with "1" Huh Seems to me thay you have decoded your transaction for mainnet, not for testnet! Be careful!

Well, I have no idea. I'm working entirely in testnet mode. I did run mainnet before but it's closed now. Do you have an idea?

Quote
Quote
"script_string":"OP_DUP OP_HASH160 b7f7543883c4fd010aeb1ef63b5e888487dd08ae OP_EQUALVERIFY OP_CHECKSIG",//question 4: where did this b7f7543883... came from?
         "value":2000000,
         "script":"76a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae88ac"
This is another representation of your destination address

I found out that this "hash160" is a ripemd160(sha256(address)) is this correct? Because when I do this I get a completely different result... even considering this endianness craziness it doesn't match.


legendary
Activity: 1260
Merit: 1019
August 06, 2014, 07:20:39 AM
#2
Quote
(mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck is another address of mine)
Is that OK?
Yes

Quote
"script":"" //question 0: This is scriptSig right? It's empty because I haven't signed the transfer yes?
Yes

Quote
"vout_sz":1,//question 1: What is it?
This is the number of outputs (vector-output-size?). You can send to several "addresses" your funds. This transaction sends to one address.

Quote
  "vin_sz":1,//question 2: What is it?
This is the number of inputs. You can spend several inputs in one transaction. Your particular transaction spends only one

Quote
  "address":"1Hmiwpos8p7dijjmKmuMcEJBJeuaQzY3Mv",//question 3: is this a receiving address created by the wallet? Or something else?
Yes. But why does it starts with "1" Huh Seems to me thay you have decoded your transaction for mainnet, not for testnet! Be careful!

Quote
"script_string":"OP_DUP OP_HASH160 b7f7543883c4fd010aeb1ef63b5e888487dd08ae OP_EQUALVERIFY OP_CHECKSIG",//question 4: where did this b7f7543883... came from?
         "value":2000000,
         "script":"76a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae88ac"
This is another representation of your destination address
http://test.webbtc.com/address/mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck
full member
Activity: 129
Merit: 100
August 06, 2014, 07:04:05 AM
#1
Hi,

I'm trying to understand transactions, so I'm playing with raw transactions in bitcoin-qt on testnet.

I'm not sure about a few things, even after reading https://en.bitcoin.it/wiki/Transactions (I supposed I missed something)

After listunspent I have this transaction among others:

{
"txid" : "d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8",
"vout" : 1,
"address" : "msmhYhrXtYAxerUCNfDAXu97xwaZ3JqxH6",
"scriptPubKey" : "76a914866b70364391e0ba5514cc30cb45f12291bc6cf788ac",
"amount" : 0.33900000,
"confirmations" : 65
},

I want to send 0.02 BTC, So I do:
createrawtransaction [{\"txid\":\"d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8\",\"vout\":1}] {\"mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck\":0.02}

(mxHgEstqwqYtVrDP3LsjS9WWAeWHQyatck is another address of mine)

Is that OK?

Result is:

0100000001a8d0102b1fa655a282996d839a199478276625baa454b4743bbd5d7f10dbe5d801000 00000ffffffff0180841e00000000001976a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae 88ac00000000


After decoding it at https://blockchain.info/decode-tx I have (questions inside):
{
   "lock_time":0,
   "inputs":[
      {
         "prev_out":{
            "index":1,
            "hash":"d8e5db107f5dbd3b74b454a4ba2566277894199a836d9982a255a61f2b10d0a8"
         },
         "script":"" //question 0: This is scriptSig right? It's empty because I haven't signed the transfer yes?
      }
   ],
   "vout_sz":1,//question 1: What is it?
   "hash":"d231eab0bcee0ab3e2e2c08aa9f2eefa4f2e0d42ce225540fd2287ade62e0cdb",
   "vin_sz":1,//question 2: What is it?
   "out":[
      {
         "address":"1Hmiwpos8p7dijjmKmuMcEJBJeuaQzY3Mv",//question 3: is this a receiving address created by the wallet? Or something else?
         "script_string":"OP_DUP OP_HASH160 b7f7543883c4fd010aeb1ef63b5e888487dd08ae OP_EQUALVERIFY OP_CHECKSIG",//question 4: where did this b7f7543883... come from?
         "value":2000000,
         "script":"76a914b7f7543883c4fd010aeb1ef63b5e888487dd08ae88ac"
      }
   ],
   "size":85,
   "version":1
}

I will soon sign the transfer, but can you answer the questions above first please?

btw. should I ask these kind of questions here or in Development & Technical Discussion maybe?
Jump to: