Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [bitcoincore-development]

This tag should be used for questions regarding Bitcoin Core development. This includes questions about the source code and development of Bitcoin Core.

23
votes
2answers
28k views

Why is bitcoin written in C++?

What made the core developers choose C++ as the main programming language for implementing bitcoin? Was this because of their personal preference? Or another reason?
16
votes
1answer
3k views

Migration from Berkeley DB to LevelDB

In 2013 a new bitcoin core was released and one of the supposed improvement was migrating from Berkeley DB to LevelDB. According to the release notes at bitcoin.org: LevelDB, a fast, open-source, ...
14
votes
6answers
18k views

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

I am looking to understand the Bitcoin C++ source code on GitHub. The Python one is simpler, but even that is too complicated for a beginner. Could someone guide me to some good resources on the ...
12
votes
2answers
685 views

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

BIP 62 lists nine source of malleability: Non-DER encoded ECDSA signatures Non-push operations in scriptSig Push operations in scriptSig of non-standard size type Zero-padded number pushes Inherent ...
12
votes
4answers
3k views

Who controls the Bitcoin software?

Is there anything comparable to a "board of directors" for Bitcoin or is the software on complete cruise-control?
11
votes
3answers
929 views

What should I do if my friend runs a Bitcoin business but doesn't understand how it works?

My friend doesn't listen to his head of engineering and doesn't fully understand how decentralized consensus based systems like Bitcoin really work. He seems to think a new untested/buggy ...
11
votes
1answer
230 views

Are there alternatives to Gitian?

I like how Bitcoin Core uses Gitian to make their builds deterministic. But Gitian is also a really complicated workaround. Is there any research being done into alternatives for deterministic builds?
10
votes
3answers
2k views

Where can I find resources for programmers to understand Bitcoin?

I am a senior Python developer. Recently I came across to the need of fully understanding how bitcoin works on it's core. The Internet is full of explanations and tutorials for regular folks and ...
10
votes
1answer
967 views

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

Dandelion is a new relay protocol for transactions on cryptocurrency peer-to-peer networks. It has been heralded as a huge privacy improvement for cryptocurrencies at the networking level– I'm ...
10
votes
1answer
2k views

Is there developer documentation for the Bitcoin Core source code?

Is there a documentation somewhere to understand the C++ code of Bitcoin Core (available on Github) "from a to z" and being able to recreate it ?
10
votes
1answer
1k views

What does OP_CHECKSEQUENCEVERIFY (OP_CSV) do?

Some people have suggested repurposing OP_NOP3 as a new opcode, OP_CHECKSEQUENCEVERIFY. What would the new opcode do? Why is it useful? Can't the signer choose the sequence field when they sign?
9
votes
1answer
3k views

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

Looking at the v0.9.3 source in miner.cpp: CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; ...
9
votes
3answers
1k views

Do “the official bitcoin developers” control Bitcoin?

Is there one person or organization that controls Bitcoin? What if Gavin Andresen, the lead developer, or Bitcoin Foundation, "the official bitcoin organization", decide to change something? What if ...
9
votes
1answer
576 views

Why would increasing the Bitcoin block size lead to a more centralised system?

Why does Bitcoin Core contributor Peter Todd think that increasing the Bitcoin block size would lead to a more centralised system? “The system doesn’t scale, and you just have to accept that and do ...
9
votes
1answer
149 views

How can vulnerabilites in bitcoin be responsibly reported?

I am wondering if someone discovers a bug/exploit in Bitcoin software or protocol, who should it be disclosed to? Who is the authority? What would happen if the bug went public? Has it occurred in the ...
8
votes
2answers
1k views

What contributions have Blockstream developers made to the Bitcoin project?

I’m spending a lot of time debating people about Bitcoin online these days. One issue that I encounter regularly is that my opposite colloquists are unaware of the contributions the Blockstream ...
8
votes
1answer
757 views

Why was the Schnorr code removed from Bitcoin Core?

I was looking for the Schnorr implementation in Bitcoin Core and was surprised to see that it was removed on Nov 2016 (commit e06e878fd7dcc99825025fa99aedb86bc7d5c29f). Why was the source code ...
8
votes
1answer
3k views

Where is the UTXO data stored?

When a new transaction is received it is added to the memory pool (after checking for conflicts). While mining, only the transactions which are in the pool are considered. What happens to the ...
8
votes
1answer
810 views

What are version bits?

What does Pieter Wuille's version bits proposal change? How does a miner signal support for a particular fork? Can the version bits system be used with hard forks?
8
votes
1answer
308 views

Are there drawbacks to the Thin Block patch?

Mike Hearn talked about a patch he applied to BitcoinXT recently in his AMA: I posted a patch last week that makes XT download blocks as lists of hashes instead of duplicating the transaction data, ...
7
votes
1answer
1k views

Why does Github say that the Bitcoin project is 74% TypeScript?

For the Bitcoin project on Github clicking "Show language statistics" shows that the source code is almost 74% TypeScript. Why is this so when ostensibly Bitcoin is written almost entirely in C++. ...
7
votes
1answer
2k views

Where, in the code, in the Satoshi client is 21 million cap implemented?

Which fragment of the Satoshi client is verifying if announced block has a valid reward? I mean, we now live in the 25 BTC reward period. I guess client after receiving a newly minted block, does ...
7
votes
1answer
1k views

Where exactly is the “off-by-one” difficulty bug?

I read through How is difficulty calculated? and want to understand where the "off-by-one" bug is in calculating difficulty. Here is a Matlab snipet I wrote to calculate difficulty. What are the ...
6
votes
1answer
191 views

What is bitcoin core developers solution to the increasing number of transactions?

I was reading that BitcoinXT is created to increase the blocksize to accommodate increasing transaction volume, but bitcoin core developers were against to it as it make the currency more centralized. ...
6
votes
2answers
2k views

How to open bitcoin source in IDE?

After downloading bitcoin source from github I'l try to open it in Netbeans for Mac. Please tell how to open all bitcoin project for run it with breakpoints in IDE?
6
votes
1answer
406 views

Is there a point on the secp256k1 curve for any given X coordinate?

There function in libsecp256k1 that allows you to directly set the field element to 32 bytes of your choice. Does secp256k1 always return a valid group element for any 32 byte value? ...
6
votes
1answer
206 views

Add dependency Bitcoin Core

I'm trying to add a new dependency to my Bitcoin Core fork. The dependency is Rapidcheck, a property based testing framework. I've added a file called rapidcheck.mk inside of depends/packages with ...
6
votes
2answers
1k views

What is OP_CODESEPARATOR used for?

Looking at the bitcoin source (https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/script.cpp#L843-L847, specifically), I ran into the the use of the OP_CODESEPARATOR. Am I right in interpreting this ...
6
votes
2answers
136 views

Wladimir's new GPG key

I just went to install the latest version of bitcoind and discovered that Wladimir has signed the https://bitcoin.org/bin/bitcoin-core-0.12.1/SHA256SUMS.asc file with a new GPG key: https://bitcoin....
6
votes
1answer
122 views

What are the arguments for and against deprecating transaction priority?

A recent pull request moves ahead to deprecate the concept of transaction priority by changing the block priority space to zero. This has enraged some users who believe that deprecating transaction ...
6
votes
1answer
212 views

Which block() method does what?

In the main.cpp bitcoin code, there are a few different functions for managing blocks. ProcessNewBlock() AcceptBlock() CheckBlock() ConnectBlock() DisconnectBlock() What is a good summary for what ...
6
votes
1answer
147 views

What is better, pre-existing Bitcoin-core API bindings for python or custom wrapper functions

How advisable is using the following code to query the bitcoin core as compared to using some python RPC library. import os btc_prefix = 'bitcoin-cli ' def getblockcount(btc_prefix): print("in ...
5
votes
3answers
97 views

bitcoin smartcontract feature

I am a noob, so please bear with me. I'm wondering whether the Bitcoin Core team plans to integrate a smart contract feature evolving the Bitcoin scripting language in a more sophisticated one in the ...
5
votes
2answers
4k views

16: mandatory-script-verify-flag-failed (Non-canonical DER signature) (code -26)

I try to send transaction via sendrawtransaction in console of bitcoind. Sig is: ...
5
votes
2answers
635 views

Have bitcoin developers applied the solution for selfish miner attack?

The Majority is not enough paper proposed an academic and somehow practical attack to Bitcoin mining system based on creating hidden forks. The paper claims that if miners work on whichever fork they ...
5
votes
1answer
204 views

Bitcoind block chain structure

I am trying to understand the structure of the underlying block chain stored in the core implementation (or rather just the BLK files used by a fullnode). My question is ; does the block chain store ...
5
votes
1answer
507 views

Why are blk*.dat files ~134200000 bytes?

I understand that blocks are stored on disk across multiple blk*.dat files, but why is the maximum file size roughly 134,200,000 bytes? What's the reason behind this file size? Where can I find this ...
5
votes
1answer
104 views

What versioning scheme does Bitcoin Core follow?

I saw a discussion recently about whether Bitcoin Core was following the Semantic Versioning scheme. I could not find information in the GitHub ReadMe.md or Contributing.md. Luke-Jr stated that ...
5
votes
1answer
111 views

what is a discrete logarithmic assumption? how does it set-up trustless proofs?

pending proposal of bulletproofs as a zk proof for confidential transactions relies on fiat-shamir heuristic to be non-interactive via creating a digital signature on interactive proof of knowledge ...
5
votes
1answer
782 views

How to get BIP34Hash and nMinimumChainWork?

I'm interested in the technical question of how you got BIP34Hash and nMinimumChainWork. The changes were introduced here: nMinimumChainWork: https://github.com/bitcoin/bitcoin/commit/...
5
votes
1answer
162 views

Where is the code that sends generated Bitcoins from mining to the wallet?

I was just looking through the Bitcoin code but since I am relatively new to C++ I was wondering, if anybody could tell me where the code responsible for sending coins generated through mining to the ...
5
votes
2answers
440 views

How do I program smart contracts?

Is there a guide to learn how to program smart contracts for the Bitcoin blockchain?
4
votes
1answer
600 views

Parameters in UpdateTip - calculation of log2_work

I looked up log2_work inside main.cpp and I can't follow its calculation by log(chainActive.Tip()->nChainWork.getdouble())/log(2.0). a) What is -> explicitely indicating? (I'm at basic level of ...
4
votes
1answer
286 views

Transaction creation process is not non-interactive(Mimblewimble)?

I have read Mimblewimble paper. Certainly, Transaction merging process is non-interactive. However, Transaction creation process seems to be not non-interactive. To create transaction, a sender must ...
4
votes
1answer
1k views

What is meant by “relaxed standards” for P2SH redeem scripts in Bitcoin Core 0.10.0?

From the Bitcoin Core 0.10.0 release notes: Standard script rules relaxed for P2SH addresses The IsStandard() rules have been almost completely removed for P2SH redemption scripts, allowing ...
4
votes
1answer
483 views

How to specify ECDSA nonce used in bitcoin signing code?

Below is the CECKey::Sign() code (v0.9.3). bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) { vchSig.clear(); ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&...
4
votes
2answers
422 views

How double spend is handled in lightning Network?

How Lightning Network handles double-spend? What will happen when the other person is not available online to enforce the integrity of the transactions? PFB my understanding of the Lightning Network. ...
4
votes
1answer
56 views

How much testing is done on each pull request before it is merged?

Frequently after one pull request is merged, multiple other pull requests follow to clean up a problem created by the first PR Recent example: https://github.com/bitcoin/bitcoin/pull/7957 https://...
4
votes
1answer
480 views

Is there a class or sequence diagram for BitcoinCore?

I'm looking at the code located at https://github.com/bitcoin/bitcoin/tree/master/src Does anyone have a basic diagram of what calls what, just a sequence chart of how all the classes piece together ...
4
votes
1answer
158 views

Why is CheckBlock called twice when processing a new block?

Once the Bitcoin node receives a message with a new block, it calls the ProcessNewBlock function: else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks ...