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 ...
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 ...
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 ...
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 ...
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, ...
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, ...
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-...
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 ...
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.
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
10
votes
Where can I find resources for programmers to understand Bitcoin?
The Developer Documentation may also be of use.
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.
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bitcoin-core-development × 492bitcoin-core × 187
bitcoind × 74
blockchain × 36
client × 22
bitcoincore-review × 21
transactions × 20
script × 20
taproot × 19
testing × 19
development × 18
functional-test × 17
block × 15
c++ × 13
debugging × 13
wallet × 12
altcoin-development × 11
consensus × 10
p2p × 10
source-code × 10
database × 9
bip × 9
protocol × 8
leveldb × 8
signet × 8