Bitcoin Forum
December 17, 2017, 01:04:51 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
  Home Help Search Donate Login Register  
  Show Posts
Pages: [1] 2 3 »
1  Bitcoin / Development & Technical Discussion / Re: Learning blockchain technology on: November 17, 2017, 01:27:41 PM
Hi
Are there some useful links to learn blockchain technology? or institutions may be...online, onsite both....

Much thanks


My blog could be useful to bitcoin blockchain learning.

http://embedded-design-vic.blogspot.com/

2  Bitcoin / Development & Technical Discussion / Re: main() in bitcoin-tx.cpp on: November 13, 2017, 05:19:18 AM
So in "bitcoin-tx -create in=0fb9df5614be8b33be0434ce4062750d83f1b7ce05cc1296604f82eb9abf802b:0 ...."
The 0fb9df5614be8b33be0434ce4062750d83f1b7ce05cc1296604f82eb9abf802b is the txid.

Thank you.

We can use the command "bitcoin-tx -create --help"  to see the explanation of the options in the command.
3  Bitcoin / Development & Technical Discussion / Re: main() in bitcoin-tx.cpp on: November 12, 2017, 01:40:31 PM
What about the in format ? what is 0fb9df56..... ? It is previous tx or scriptSig?
Read https://bitcoin.org/en/developer-reference#raw-transaction-format

I read the link about raw transaction format. It says raw transaction has version, tx_in count, Tx_in, TX_out count, Tx_out and lock time.

I can't relate this format to the hex value in the input part.
4  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 12, 2017, 02:26:23 AM
You are welcome. I shall continue to write when i have time.

It is updated. Welcome to check it
https://embedded-design-vic.blogspot.com/
5  Bitcoin / Development & Technical Discussion / Re: Pay to Script Hash on: November 12, 2017, 02:24:38 AM
where are the bitcoin core files that handle P2SH transaction ?

i figure it out.
6  Bitcoin / Development & Technical Discussion / Re: main() in bitcoin-tx.cpp on: November 12, 2017, 02:22:41 AM
Thank you. Now I use the bitcoin-tx binary.

bitcoin-tx -create in=0fb9df5614be8b33be0434ce4062750d83f1b7ce05cc1296604f82eb9abf802b:0 outscript=0.00159999:"DUP HASH160 0x14 0x6793a38f79b8cd51dbb6face6dc75a4af5c1bf29 EQUALVERIFY CHECKSIG"

and got the return value
02000000012b80bf9aeb824f609612cc05ceb7f1830d756240ce3404be338bbe1456dfb90f00000 00000ffffffff01ff700200000000001976a9146793a38f
79b8cd51dbb6face6dc75a4af5c1bf2988ac00000000

i understand the outscript format. 0.00159999 is the value to be spent. What about the in format ? what is 0fb9df56..... ? It is previous tx or scriptSig?
7  Bitcoin / Development & Technical Discussion / Re: Pay to Script Hash on: November 11, 2017, 03:14:24 PM
where are the bitcoin core files that handle P2SH transaction ?
8  Bitcoin / Development & Technical Discussion / Re: Pay to Script Hash on: November 11, 2017, 01:25:43 PM
Looks like the formatting is a bit shuffled, can't get it clearly.
 
I try to draw the table row and column line, but i don't know how to draw the line using the post reply formatter.

Quote
(from Andreas' book "Mastering Bitcoin"):
The two scripts are combined in two stages. First, the redeem script is checked against the locking script to make sure the hash matches.
I found his book online, the scripting chapter is at
https://github.com/bitcoinbook/bitcoinbook/blob/second_edition/ch07.asciidoc

9  Bitcoin / Development & Technical Discussion / Pay to Script Hash on: November 11, 2017, 08:06:27 AM
For P2SH, i understand it lets the sender funds a transaction using 20 byte hash. The script supplied to redeem must hash to the scriptHash.

scriptPubKey: OP_HASH160 <scriptHash> OP_EQUAL
scriptSig: 0 <sig1> ... <script> OP_m <pubKey1> ... OP_n OP_CHECKMULTISIG

For this example, the processing is:

The checking process:
Stack   Script   Description
Empty.0 <sig1> <sig2> OP_2 <pubKey1> <pubKey2> <pubKey3> OP_3 OP_CHECKMULTISIG OP_HASH160 <scriptHash> OP_EQUAL   locking script combined with redeem script
0 <sig1> <sig2> OP_2 <pubKey1> <pubKey2> <pubKey3> OP_3   OP_CHECKMULTISIG OP_HASH160 <scriptHash> OP_EQUAL   Constants are added to the stack.
trueOP_HASH160 <scriptHash> OP_EQUAL   Signatures validated in the order of the keys in the script.

what happens after OP_CHECKMULTISIG, what value does OP_HASH160 hash to?



10  Bitcoin / Development & Technical Discussion / Re: Pay to public key hash on: November 11, 2017, 07:24:12 AM

The scriptSig part is what the receiver uses to spend the money that they got from pay-to-public-key-hash. Because they're spending the money, at that point they'd be the new sender. The <pubKey> for this new transaction hashes to the receiver's <pubKeyHash> from the old transaction when they first got the money.


Thank you very much. finally understand it.
11  Bitcoin / Development & Technical Discussion / Re: Pay to public key hash on: November 11, 2017, 02:26:34 AM
next to bitcoin.org and the developpers section and  Andreas' book "Mastering Bitcoin", this helped me alot to understand the underlying details:
http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html



I read the link. I am still not clear. In
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

The scriptSig contains the <sig> sender signature and <pubKey> sender public key, the scriptPubKey contains <pubKeyHash> which is the hash of receiver public key.

Then, how can the hash of sender <pubKey> matches with the receiver <pubKeyHash>  ?
12  Bitcoin / Development & Technical Discussion / Re: how can i create fake transactions on: November 10, 2017, 03:38:06 PM
so i want to create a fake transaction 1 that will go trough but will not get confiremd because its not real how can i do that?

you can use raw transaction command line to create an invalid transaction, it will be rejected by miner. I suppose.
13  Bitcoin / Development & Technical Discussion / Pay to public key hash on: November 10, 2017, 03:35:59 PM
In P2PKH, the public key

scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

is the public key of the sender? the hash is from the sender public key? the signature is of the sender?
14  Bitcoin / Development & Technical Discussion / Re: main() in bitcoin-tx.cpp on: November 10, 2017, 02:52:11 PM
There is a separate binary called bitcoin-tx which lets you do some transaction specific things without needing to run the full Bitcoin Core. It needs a main function for that binary to work.

It looks like bitcoin-tx.cpp is never built into the bincoind binary of Bitcoin core, isn't  it?
15  Bitcoin / Development & Technical Discussion / Re: main() in bitcoin-tx.cpp on: November 09, 2017, 12:50:30 AM
thank you. should have seen that
16  Bitcoin / Development & Technical Discussion / main() in bitcoin-tx.cpp on: November 08, 2017, 01:58:01 PM
I notice that is a main() function in bitcoin-tx.cpp. This main() is not the main function of bitcoin core. Because the main function is in bitcoind.cpp

So why there is a main() in bitcoin-tx.cpp ?
17  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 07, 2017, 12:34:12 AM
Thanks for putting your time and efforts on this Bitcoin core. I've bookmarked and read it, when I have free time Smiley

You are welcome. I shall continue to write when i have time.
18  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 06, 2017, 02:26:23 PM

In general, anyone trying to walk through the code should understand the concept of "signals and slots". Specifically with Boost and QT's implementation of signals and slots:


Please see http://embedded-design-vic.blogspot.my/  for latest article about signals in Bitcoin core.
19  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 06, 2017, 01:39:50 AM

In general, anyone trying to walk through the code should understand the concept of "signals and slots". Specifically with Boost and QT's implementation of signals and slots:

http://doc.qt.io/qt-4.8/signalsandslots.html
http://www.boost.org/doc/libs/1_47_0/doc/html/signals2/tutorial.html

So far, in code analysis, I have not come across signals and slots yet. I will search for it in the code. Thank you.
20  Bitcoin / Bitcoin Discussion / Re: Simple bitcoin core tutorial on: November 05, 2017, 11:31:05 AM
thank you for your encouragement.
Pages: [1] 2 3 »
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!