Questions tagged [mastering-bitcoin]

“Mastering Bitcoin” is a book by Andreas M. Antonopoulos giving an introduction to the fundamental concepts and technical details of Bitcoin. Mastering Bitcoin was published in 2014, and an updated 2nd Edition was published in 2017.

Filter by
Sorted by
Tagged with
3 votes
0 answers
1k views

Compiling bitcoin error : A compiler with support for C++17 language features is required

I am reading the "Mastering bitcoin: Programming the Open Blockchain" book by Andreas Antonopolous. In the chapter about compiling bitcoin, the instructions were to execute first ./autogen....
1 vote
1 answer
77 views

Question about nextblockhash in bitcoin block struct

In the book "Mastering Bitcoin" (3rd edition), on page 46, there is an element nextblockhash in the block struct after issuing a getblock command, anyone can explain it and how to use it. ...
0 votes
0 answers
63 views

Question about Second-Party Transaction Malleability described in book "mastering bitcoin"

In book "mastering bitcoin", 3rd edition, page 136, there is a statement as below. "Tx1 spends the second output of Tx0 to two new outputs, one to Alice for her share of the joint funds,...
5 votes
1 answer
475 views

Who is the creator of the secp256k1 standard?

There are different accounts as to who created the secp256k1 standard, for example: Mastering Bitcoin, p.61: Bitcoin uses a specific elliptic curve and set of mathematical constants, as defined in a ...
2 votes
1 answer
56 views

Reported value in block diverges from actual block’s value

In the book "Mastering Bitcoin", 3rd edition, on page 50, Example 3-6 shows Total value in block: 10322.07722534. This is block 775072, and blockchain.com shows this block’s Output Value ...
0 votes
1 answer
21 views

Question about bitcoin transaction minted time

Book "mastering bitcoin" 3rd edition, on page 26, there is one statement as following: "Approximately five minutes after the transaction was first transmitted by Alice’s wallet, a miner ...
2 votes
2 answers
4k views

What’s the difference between a validation by nodes and a verification by miners?

In Mastering Bitcoin, it says: The transaction is then broadcasted on the bitcoin network, where each network node (participant) validates and propagates the transaction until it reaches (...
6 votes
1 answer
458 views

How can a collision attack reveal the private key?

From "Mastering Bitcoin: Programming the Open Blockchain 3d edition, Ch4" : All addresses based on hash functions are theoretically vulnerable to an attacker independently finding the same ...
2 votes
1 answer
35 views

Question about MAST tree in book "mastering bitcoin"

On page 174, 3th edition, book "mastering bitcoin", what does the following statement means? thanks "we could also have four commitments for the same cost." Do the four commitments ...
43 votes
4 answers
34k views

What are pros and cons of txindex option?

I am reading "Mastering Bitcoin" written by Andreas and I found this explanation about "txindex option" Transaction Database Index and txindex Option By default, Bitcoin Core builds a database ...
3 votes
2 answers
101 views

How can a hacker steal the funds received in the future when there is only an xpub on the server?

In book titled "Mastering bitcoin" 3th edition, on page 114, there is a sentence as below. Gabriel’s website does not contain any private keys and therefore any hack of it can only steal the ...
6 votes
2 answers
414 views

What is the circular dependency in signing a chain of unconfirmed transactions?

In Mastering Bitcoin on chapter 6 the Circular Dependencies issue described as following: Many contract protocols for Bitcoin involve a series of transactions that are signed out of order. For ...
5 votes
2 answers
188 views

Will Bitcoin scaling affect the amount of hashing power required to keep the network secure?

In Mastering Bitcoin Andreas Antonopulous asserts that "Bitcoin can scale up, achieve broader adoption, and remain secure without any increase in hashing power from today’s level." Is this really ...
3 votes
2 answers
265 views

How is the clock reset in the Complex Script Example?

At the end of Mastering Bitcoin Chapter 7, in the "Complex Script Example", they ask this question in regards to the script: How do the partners "reset" the clock every 29 or 89 ...
0 votes
1 answer
545 views

python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10

Which version of python should I use? When running pip3 install python-bitcoinlib I get 'Requirement already satisfied'. I run on Ubuntu using WSL in Windows 10. I have this error: >>> from ...
2 votes
1 answer
130 views

Is it correct to say that "each transaction input is signed independently"?

On Chapter 6 - Transactions of Mastering Bitcoin it is said: Note that each transaction input is signed independently. This is critical, as neither the signatures nor the inputs have to belong to or ...
4 votes
1 answer
193 views

What are all the meanings of the nSequence field?

I know the original purpose of the nSequence field was to hold the transaction in the mempool with the transaction being replaced when the larger value comes and so on up to 0xFFFFFFFF when the ...
3 votes
1 answer
248 views

What is the length of the extended public key?

I'm reading the Master Bitcoin book and I'm a bit confused. The confusion is related to the length of the extended keys. The book says that extended keys are 512 or 513 bits long. It is clear to me ...
2 votes
1 answer
77 views

DoS attack and MAX_BLOCKS_IN_TRANSIT_PER_PEER

I was reading Mastering Bitcoin and I found, in the section Exchanging "Inventory", this: "The node keeps track of how many blocks are "in transit" per peer connection, ...
1 vote
1 answer
83 views

Question about Payment Channels

I was reading the book Mastering Bitcoin written by Andreas about state channels for fast payment processing. There was a part named "Asymmetric Revocable Commitments" that said: given an ...
0 votes
1 answer
165 views

What's the point for mining pools to set a higher target?

I'm reading the Mastering Bitcoin 10th chapter, and quote Similarly, a mining pool will set a (higher and easier) pool target that will ensure that an individual pool miner can find block header ...
1 vote
1 answer
125 views

Does derivation from public and private keys give the same result in normal key derivation?

I am reading about key derivation in chapter 5 of the book "Mastering Bitcoin" by Andreas, along with this detailed thread and BIP-32. Here are some of my understanding about these two ...
8 votes
5 answers
2k views

checksum = SHA256(SHA256(prefix+data)) - why double hashing?

From 'Mastering bitcoin' - checksum = SHA256(SHA256(prefix+data)) The 'data' is, for example, an address, which was calculated using SHA256 and then RIPEMD160. Why do we need double hashing when ...
1 vote
0 answers
65 views

Lightning Network node collusion

I' m learning about Bitcoin and LN enjoying Antonopoulos's excellent "Mastering Bitcoin" book I stumbled upon Figure#7 in Chapter 12 https://github.com/bitcoinbook/bitcoinbook/blob/develop/...
0 votes
0 answers
134 views

HD wallet root seed length

Mastering Bitcoin describes the process of generating the HD wallet seed: "1. Create a random sequence (entropy) of 128 to 256 bits." ... 6. The mnemonic code is the sequence of words. ... 9....
2 votes
1 answer
401 views

Using more than a 12 word mnemonic phrase

From Mastering Bitcoin: "From a security perspective, the amount of entropy actually used for the production of HD wallets is roughly 128 bits, which equals 12 words. Providing more than 12 words ...
0 votes
1 answer
88 views

hierarchical deterministic wallets - creation of public keys

From Mastering Bitcoin: "The second advantage of HD wallets is that users can create a sequence of public keys without having access to the corresponding private keys. This allows HD wallets to ...
0 votes
1 answer
191 views

QR Scan "Unrecognized format" mycelium "Mastering Bitcoin'

Noobie here. In Ch. 2 of Antonopoulos' "Mastering Bitcoin", I try to scan figure 2-2 (per his instruction) using a recently installed Mycelium on my Android. Why do I keep getting "Unrecognized ...
0 votes
1 answer
279 views

Create master public key after HMAC-SHA512

I have that result after hash_pbkdf2 5B56C417303FAA3FCBA7E57400E120A0CA83EC5A4FC9FFBA757FBE63FBD77A89A1A3BE4C67196F57C39A88B76373733891BFABA16ED27A813CEED498804C0570 left 256 bits are: ...
6 votes
1 answer
250 views

How does copying main stack prevent malformed unlocking scripts vulnerabilities?

https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch06.asciidoc In the original bitcoin client, the unlocking and locking scripts were concatenated and executed in sequence. For security ...
1 vote
1 answer
126 views

(Mastering Bitcoin) When sending a raw transaction, why is the receiver included in the details hash as a "send" transaction?

I'm working my way through Mastering Bitcoin. The author made a transaction to send 0.05 BTC from one address to another (http://chainquery.com/bitcoin-api/getrawtransaction/...
1 vote
2 answers
361 views

Extended Public Key 's mechanism misinterpreting in 'Mastering Bitcoin' by Andreas

I am a newbie and start exploring from the 'Mastering Bitcoin' book. The figure below to me is a little inaccurate, I think the arrow from HMAC-SHA256 should point right to the child public key. Am I ...
1 vote
2 answers
1k views

Create Pay to Witness Script Hash in Pay to Script Hash Address

I'm trying to generate a multisignature, segwit compatible address as a P2WSH nested in BIP16 P2SH as described in BIP141. Basically, I want to construct a P2WSH-nested-in-P2SH address from n public ...
3 votes
1 answer
754 views

Bitcoind with -txindex=1 still no mempool transactions

I'm reading through Mastering Bitcoin and trying to follow along the examples. When I first initialized bitcoind, I set txindex=1 in my bitcoin.conf file. In a later example I was unable to ...
2 votes
1 answer
821 views

BIP32 HD Wallets: HMAC vs. "just" Hashing the Seed

In A. Antonopoulus' Mastering Bitcoin (2nd edition) on page 106, there is a nice illustration showing how the basis for a BIP32 HD Wallet is generated: So here is the one thing I don't understand ...
1 vote
1 answer
423 views

A problem on difficulty equation

When I read this book Master Bitcoin, I have a problem in understanding the "Difficulty" in Chapter 8. There is a equation of difficulty: New Difficulty = Old Difficulty * (Actual Time of Last ...
2 votes
1 answer
484 views

What is criteria of mining priority except for transaction-fee?

I am reading "Mastering Bitcoin written by Andreas" and I found this explanation of mining. Transactions are added to the new block, prioritized by the highest-fee transactions first and a few ...
2 votes
1 answer
389 views

What is 'spendability of coinbase transaction after 100 blocks' in Mastering Bitcoin referring to?

Ch7 of the book writes at the end of the Introduction section: "After 100 blocks back there is so much stability that the coinbase transaction—the transaction containing newly mined bitcoins—can be ...
1 vote
2 answers
435 views

How was 59 days determined with 1 TH/sec from "Mastering Bitcoin"

In Mastering Bitcoin in the section on Difficulty Bits Andreas notes: This means that a valid block for height 277,316 is one that has a block header hash that is less than the target. In binary ...