33 votes

Why is bitcoin written in C++?

The most important reason is that the original Satoshi codebase was written in C++. A system like Bitcoin has extremely strong requirements about consistency in behaviour: all nodes on the network ...
user avatar
28 votes

Why is bitcoin written in C++?

I gave a keynote address at cppcon 2016 about almost this exact issue. There are a variety of reasons why C++ is an excellent language choice for blockchain applications like Bitcoin. Blockchain ...
user avatar
17 votes
Accepted

Migration from Berkeley DB to LevelDB

As someone who was involved in doing that migration at the time, I believe it was the right decision. LevelDB is far from perfect, but I wouldn't know what else to use. In particular: BDB is much ...
user avatar
16 votes
Accepted

Why does the default miner implementation use pay-to-pubkey?

Pay-to-PubKey (P2PK) and pay-to-PubKey-Hash (P2PKH) were both introduced in the original Bitcoin 0.1 release. P2PK was used by default for mining and payments received using the interactive IP-to-IP ...
user avatar
16 votes

Where is the UTXO data stored?

I assume this question is about Bitcoin Core's internal operations. This description is valid for version 0.8 and later (up to 0.14 at least). One part of the system deals with the active chain, ...
user avatar
16 votes
Accepted

What is the tradeoff between privacy and implementation complexity of Dandelion (BIP156)

In my view, the main implementation detail to be worked out with Dandelion is ensuring that there are no new DoS vectors introduced. In the existing transaction relay model of Bitcoin Core, ...
user avatar
  • 371
15 votes
Accepted

What contributions have Blockstream developers made to the Bitcoin project?

Disclosure: I'm a Blockstream co-founder Major feature contributions to Bitcoin Core: Greg Maxwell, Andrew Poelstra and myself (as well as several other contributors) worked on libsecp256k1, a well-...
user avatar
15 votes
Accepted

Bitcoin protocol and Wireshark

Someone wrote a Bitcoin protocol decoder for Wireshark, several years ago. I assume it was included in the Wireshark distribution. Wireshark simply knows about the Bitcoin protocol. There is no magic ...
user avatar
14 votes
Accepted

Where can I find resources for programmers to understand Bitcoin?

The book Mastering Bitcoin would be a good solid start (although it might not answer all your questions). It is also available for free.
user avatar
  • 2,204
14 votes
Accepted

What does Bitcoin policy language offer the developer that Miniscript doesn't? What is the difference between Bitcoin policy language and Miniscript?

Both answers by James C. and sanket1729 are very good, but I wanted to give a very high-level answer: Miniscript is an intermediate more structured representation for actual Bitcoin Scripts. It is ...
user avatar
13 votes
Accepted

Where in Bitcoin Core does it do X?

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 ...
user avatar
  • 61.4k
12 votes
Accepted

Where to find help understanding Bitcoin's source code in C++?

I am not aware of an extensively commented version of the Bitcoin sourcecode, but you could check out the Bitcoin Developer Reference and you can read online the book Mastering Bitcoin by Andreas M. ...
user avatar
  • 63.5k
12 votes
Accepted

Why is Bitcoin Core using LevelDB instead of Redis or SQLite?

Redis and LevelDB solve very different problems. We tried using SQLite and its performance was abysmal. Bitcoin Core needs a database to store the set of unspent transaction outputs (UTXOs). This ...
user avatar
11 votes
Accepted

How much of BIP 62 ("Dealing with malleability") has been implemented?

Most of the fixes have been implemented in Bitcoin Core's master branch, or earlier versions, as standard transaction checks that prevent default Bitcoin Core nodes from relaying or mining ...
user avatar
11 votes
Accepted

Is there developer documentation for the Bitcoin Core source code?

To understand Bitcoin Core, the best resource is probably the source code itself: https://github.com/bitcoin/bitcoin To help understand what is going on in the code, try the developer documentation ...
user avatar
  • 8,734
11 votes
Accepted

Why was the Schnorr code removed from Bitcoin Core?

The Schnorr implementation was never in Bitcoin Core. Rather it is in the libsecp256k1 library that is a subtree in Bitcoin Core. The commit you reference is actually a commit in that library which ...
user avatar
  • 61.4k
11 votes
Accepted

BIP44: What's the use of internal addresses?

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 ...
user avatar
11 votes
Accepted

What is the purpose of indexing the mempool by these five criteria?

The mempool is the short-term memory of a full node. We use its content e.g. to: exchange information with peers build block templates estimate feerates track pending payments to our wallet The ...
user avatar
  • 63.5k
10 votes
Accepted

What are version bits?

In the Bitcoin blockchain, each block has a 32-bit field called version. Right now, it takes on simple small values like 2 or 3. As an example of changes, block version 3 introduced new rules about ...
user avatar
  • 883
10 votes

Where can I find resources for programmers to understand Bitcoin?

The Developer Documentation may also be of use.
user avatar
  • 1,583
10 votes
Accepted

What are the debug categories?

net: Networking. All messages related to communicating with other nodes on the network, including what P2P messages were sent and received and to whom and other information about the network messages. ...
user avatar
  • 61.4k
10 votes

What does Bitcoin policy language offer the developer that Miniscript doesn't? What is the difference between Bitcoin policy language and Miniscript?

Miniscript doesn't compile down to script. It encodes a subset of all Bitcoin script. It is a (very crafty) template language which reduces the Bitcoin script language to specific script expressions ...
user avatar
  • 2,423
10 votes

What does Bitcoin policy language offer the developer that Miniscript doesn't? What is the difference between Bitcoin policy language and Miniscript?

At a high level: The policy is compiled to Miniscript. Miniscript is encoded to Bitcoin Script. (One to One Mapping) Bitcoin Script is decoded back to Miniscript. (One to One Mapping) Policy and ...
user avatar
  • 1,214
9 votes
Accepted

Is there a list of core Bitcoin committers?

Here is a list of people who have had commit access to Bitcoin Core. This list can also be found on Bitcointalk and on Reddit (it's the same list just in two different places). All lists are kept up ...
user avatar
  • 61.4k
9 votes
Accepted

Parameters in UpdateTip - calculation of log2_work

FYI the code under discussion is available here on GitHub. -> is a member access operator in C++, just as . is. They both expect the name of an object's member on the right (e.g. a member function ...
user avatar
9 votes
Accepted

What is the motivation behind Russell Yanofsky's work to separate Bitcoin Core into independent node, wallet and GUI processes?

There are benefits to both users and developers to having Bitcoin Core split into separate node, wallet and GUI processes. As Alyssa Hertig outlines here the benefit to users will be being able to run ...
user avatar
9 votes
Accepted

Why is the Bitcoin Core wallet database moving from Berkeley DB to SQLite?

The introduction of descriptor wallets presents an opportunity to introduce a new database backend as descriptor wallets are backwards incompatible. The following is taken from Andrew Chow's blog post ...
user avatar
9 votes
Accepted

What version of C++ is used in Bitcoin Core?

Bitcoin Core: v0.1.0...v0.12.x: C++03 v0.13.0...v0.21.x: C++11 v22.0...: C++17
user avatar
9 votes
Accepted

How do Bitcoin devs make sure that their modifications do not affect the consensus rules or the running network protocol?

"Best-effort". Formal proofs don't help. All one can do is to write tests, like any other well-written piece of software. They also maintain forks of some dependencies such as LevelDB and ...
user avatar
  • 9,819
8 votes
Accepted

What is OP_CODESEPARATOR used for?

Looking at this diagram of OP_CHECKSIG steps and the Bitcoin Script wiki, OP_CODESEPARATOR is used to make OP_CHECKSIG check only part of the scriptPubKey. Essentially, only the script that goes after ...
user avatar
  • 283

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