Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
12

Introduction The key to finding out where a piece of code is without already knowing where it is is to start at the thing that will eventually lead to what you want to find. These can be logically thought through. For example, for relay and validation, these all occur after a node has received a block or transaction, so begin at the point where a block or ...


11

This question may be opinion based in some ways, but I'm going to attempt to answer it as it is an important concept, and somewhat unlike traditional systems. Bitcoin is governed by math, in some places. At the end of the day, it's software, and even the math rules can be updated to use different rules, or removed altogether by means of a soft or hard fork (...


10

The separation between internal and external addresses comes from BIP32. Using a different chain for each permits you to give out an xpub for just the external ones to an auditor. They would then be able to observe your incoming payments, but not your spending.


9

With Bitcoin Core you'll run a full node. So, for every transaction someone does to your business, your Bitcoin Core wallet need to be synchronized with the complete blockchain.


9

Blockstream launched a satellite service. It did not launch a satellite. Bitcoin blocks are being broadcast by Blockstream, by contracting with several existing several satellite systems. These satellites are primarily designed for broadcasting TV signals, and thus don't run their own full nodes; the broadcast is dependent on ground stations that uplink ...


8

It is important to note that with this process, you will want to use a wallet that does not have private keys. Otherwise, you could accidentally be sending Bitcoin to an address that is in the online wallet. This especially important with change addresses because change addresses are automatically pulled from the current wallet. By disabling private keys, ...


8

You should not use a torrent to download the blockchain. There is no general purpose to using a torrent, as using it makes synchronization slower because validation (which is the slow part) cannot proceed concurrently with download. Because there is no purpose to using a torrent, I wouldn't trust that any particular torrent wasn't made maliciously and didn'...


8

Dorier is correct that Neutrino/SPV nodes are not full nodes, because they do not verify the entirety of the blockchain, leaving potential room for attack. However, the portrayal that Neutrino is no better than other SPV modes is not correct. Neutrino is a form of SPV which improves greatly over other implementations in regards to privacy. All SPV modes ...


7

That block is not just orphaned, it is actually invalid. It exploits CVE-2018-17144. The only way to fix this error is to upgrade to Bitcoin Core 0.16.3 and begin a reindex following the upgrade.


7

This warning is currently benign and has been fixed for Bitcoin Core 0.18. You see it because miners are using the block version number for a mining optimization called ASICBOOST. However soft forks in the past have used the version number for readiness signalling. Bitcoin Core is seeing version numbers it is not expecting (due to ASICBOOST) and thus ...


7

If you give Bitcoin Core a fully populated data directory, it will use it without any validation. However, if you only give it the blocks/ subdirectory, it will fully validate it to recreate the chainstate directory, exactly as if it were received over the network.


6

https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&unscoped_q=bad-txns-in-belowout const CAmount value_out = tx.GetValueOut(); if (nValueIn < value_out) { return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false, strprintf("value in (%s) < value out (%s)", FormatMoney(nValueIn), FormatMoney(value_out))); ...


6

No, it won't. That's also not possible without rebuilding the UTXO set from scratch, as the unspent outputs being spent need to be known to validate spends against. If you want to force a revalidation from scratch, start with -reindex-chainstate. This will blow away the UTXO set, and recreate it from the blocks on disk, and revalidate everything in the ...


6

Really getblocks should have been called getblockhashes , as the response contains just block hashes, not full blocks. Every block can be observed in three different ways: The full block, containing all transactions and header information. The block without the transactions, but just the 80-byte header which includes a Merkle root committing to the ...


5

getinfo is now deprecated. Use getblockchaininfo instead: bitcoin-cli -testnet getblockchaininfo I don't have 50 reputation to comment. Otherwise, I would've added this as a comment.


5

There is no known way to do this with the current consensus rules nor does it seem likely except via computationally expensive general ZKP. The normal way to make compact proofs of non-membership is to have a hash tree which is ordered by the key you're looking to prove non-membership on. The proof is just the two neighbors that are greater and lesser than ...


5

I don't ever recall seeing an actual calculation for it, and I strongly suspect the reason is that it is "good enough". The original, primary use of block timestamps is in difficulty calculations. They now also adjust the time for locktime transactions, but that's a newer addition. A block's timestamps must: Be greater than the median of the past 11 ...


5

The blog you linked to talks about a fairly sophisticated attack, involving large scale network manipulation. The basic premise is: You are able to identify the node that belongs to the person/entity you want to execute a double spend against You trick that node into thinking that the network time is far behind what it actually is (up to a difference of 70 ...


5

That the network is secure by means of math instead of some central authority (e.g. a bank overseeing everything)? If so, what math? The math that makes PoW possible? The math that makes proof of work possible is a one-way function, specifically the SHA256 algorithm. This combined with public key cryptography secures the ownership of digital assets in a ...


5

You can run both at the same time: $ bitcoind -daemon $ bitcoind -testnet -daemon Then you can issue commands on either using: $ bitcoin-cli <commmand> or $ bitcoin-cli -testnet <command> The blockchains are stored in ./bitcoin/blocks for mainnet and /bitcoin/testnet3/blocks for testnet. Update: With the bitcoin.conf updated in the ...


5

There is a maximum limit on the block reward which is 12.5 BTC but nothing prevents a miner from claiming less than 12.5 BTC. In fact, there have been times when miners forgot to claim any bitcoin at all (claimed 0 BTC), a very expensive mistake. This is probably a mistake from the miner, he could have certainly claimed more bitcoin. As long as the block ...


5

Technically, yes, yes, and yes. However, I'm not sure if we'd still call it "Bitcoin" at that point. Any of these changes would require a hard fork, which means that the underlying rules of the system are changing in a non-backwards-compatible way. It means that blocks/transactions from after the fork are not guaranteed to be considered valid to nodes ...


5

It does not have one. Bitcoin Core uses hardened derivation, so there is no way to compute the addresses it will use externally. Support for that will likely be added in upcoming versions, but likely won't be the default (there are security risks when using non-hardened derivation).


5

BIP 39 is not in Bitcoin Core largely for implementation reasons and because BIP 39 is not as secure as it could be. The structure of Bitcoin Core's wallet doesn't really allow for BIP 39 to be implemented. The current structure doesn't allow for 512 bit seeds as BIP 39 specifies, and adding it would require some significant changes to the wallet code. ...


4

As this question is related to executable compilation which has to do with linking (static or dynamic), therefore the ultimate way to know if your compiled bitcoind executable has been compiled with 0mq support is simply: ldd /usr/bin/bitcoind | grep -i mq


4

You can't avoid downloading the block chain with Bitcoin Core or any other full node. That is inherent to their functioning. You don't have to store it, however, if you enable pruning. This would reduce your storage needs to 1 GB or less. If all you want is to make transactions, and you're satisfied with having to trust other servers a bit more, you ...


4

You cannot because Bitcoin Core does not store such information. Bitcoin Core does not store all information for all addresses, it only stores information for its own addresses and the lower level information needed for verifying transactions (addresses are a higher level abstraction). There are no commands that allow you to get the balances or transactions ...


4

If you mean truly unmodified, the answer is almost certainly no. Version v0.2.9, released on May 26 2010, introduced checksums in the protocol. During a transition phase until Feb 20 2012, checksums were only used after a version negotiation, making sure both parties understand checksum. After Feb 20 2012, all new initial connections would start using ...


4

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73 The above is actually Bitcoin Script, not just byte data. This breaks down to: 04 # PUSH the next 4 bytes ffff001d # This is the same as the nbits for the block, which was the target for the ...


4

but I am going to take a slight guess that this has something to do with miner voting to show what the consensus is for a future change? No. There are currently no active consensus change proposals. These version numbers are likely due to a mining optimization known as ASICBOOST. This optimization is due to a quirk of SHA256 and Bitcoin's block header ...


Only top voted, non community-wiki answers of a minimum length are eligible