Questions tagged [source-code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
412 views

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

In the bitcoin source code in txmempool.h, a comment says that unconfirmed transactions are indexed by five criteria: * mapTx is a boost::multi_index that sorts the mempool on 5 criteria: * - ...
user avatar
3 votes
1 answer
126 views

where does the main.cpp moved to in recent versions?

I was reading this article about bitcoin-core. It is an explanation of bitcoin-core source code version 0.3, and it described a file named main.cpp. In the recent versions this file does not exist (or ...
user avatar
2 votes
1 answer
29 views

Does bitcoind validate every block for every time it starts?

When running bitcoind, it starts downloading the blockchain and validate every block in a row. It stores the blockchain in the ~/.bitcoin/blocks directory. And when we break daemon and restart it, ...
user avatar
3 votes
1 answer
59 views

Is commenting on github as reviewer good place to ask questions about source code?

I'm not sure even this question is off-topic or not. But bear with me. Currently I have a good knowledge of bitcoin protocol and network but know very little about its source code and implementation ...
user avatar
5 votes
2 answers
347 views

Was the addition of OP_NOP codes in Bitcoin 0.3.6 a hard or soft fork?

I'm doing some deeper research into historical consensus changes and it seems like most folks consider the addition of the OP_NOP codes to be a hard fork. Here's the diff for their addition: https://...
user avatar
0 votes
1 answer
45 views

Scripthash from bitcoin address with Golang

I broke my head looking for a solution. I want use bitcoin address for electrumx Take bitcoin address from docs example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa And i need convert to ...
user avatar
0 votes
0 answers
35 views

In practice, is the original Bitcoin implementation incompatible with the current reference implementation?

The historical repository of Satoshi Nakamoto's original Bitcoin source code can be found here:https://github.com/trottier/original-bitcoin. In practice, is this historical repository (if properly and ...
user avatar
3 votes
1 answer
67 views

Satoshi's coding quality

I have little knowledge about C++, so I want to ask two questions from "expert" (C++) programmers here: Why Satoshi wrote Bitcoin in C++ and not in (for example) C language? any technical ...
user avatar
  • 31
0 votes
1 answer
62 views

Where's the code that bitcoin core uses to generate private keys

I was looking through the repository but theres just too many folders to go through https://github.com/bitcoin/bitcoin Wheres the code bitcoin core uses to generate private keys?
user avatar
0 votes
1 answer
41 views

Trying to validade a bitcoin block

So I'm trying to validade a bitcoin block just for curiosity, let's take for example bitcoin block #1 (https://bitpay.com/insight/#/BTC/mainnet/block/...
user avatar
2 votes
3 answers
189 views

Why are there limitations between educational and real world usage?

This link looks very practical and "hands in the dirty". But in the example of Python code for node discovery and connections, it often gives warning about the fact it is of "...
user avatar
0 votes
0 answers
16 views

MULTİBİT HD WALLED TO ELECTRUM [duplicate]

I need help with my cold wallets. I have a multi-bit wallet and I know its 18-phrase seed key and password, but I know the password, but when installing the multi-bit program, 5 BTC appears in it, but ...
user avatar
0 votes
2 answers
93 views

What's the relationship between Bittorrent and Bitcoin?

I know both implementations make use of decentralization, but is Bitcoin using any technology that was developed by Bittorrent?
user avatar
0 votes
1 answer
75 views

How do I get circulating supply and total supply for cryptocurrencies?

How can I get circulating supply and total supply for cryptocurrencies? I am not talking about using coinmarketcap's API, I want to get the data myself. Should I get it from the source-code?
user avatar
0 votes
0 answers
96 views

How to reset bitcoin testnet / signet / regtest in newest bitcoin core

The testnet data directory is not ~/.bitcoin but rather ~/.bitcoin/testnet3. ~/.bitcoin holds the data for the main Bitcoin blockchain. the files are still there but deleting them wont work anymore. ...
user avatar
0 votes
1 answer
200 views

Building Bitcoin Core on Linux/Ubuntu with Visual Studio Code

Does anyone developing Bitcoin Core use VSCode for compilation and debugging on Linux/Ubuntu? How can one configure VSCode to compile Bitcoin Core?
user avatar
0 votes
1 answer
65 views

bitcoin file function folder location testnet setgenerate true

can somebody help me to point out where and in wich file the setgenerate true testnet function is located and controlled is it in chainparams.ccp or somewhere else ? and where to change the bitcoin ...
user avatar
1 vote
1 answer
202 views

How exactly does bitcoin code change happen in a decentralized system [duplicate]

I have long been under the assumption that bitcoin was just a "protocol" or a "contract“. Different nodes run their own implementation, on different hardwares. Some are efficient, some ...
user avatar
1 vote
1 answer
53 views

Where change the size of the window in Bitcoin code?

I already try changeing the height and width parameters of the forms in src/qt/forms but nothing changes, where else i need to look?
user avatar
0 votes
2 answers
151 views

Who approves the feature and bug code reviews in Bitcoin?

I see a list of Bitcoin feature and pull requests here. How do all million plus users agree to these feature/bug requests? Do all users of Bitcoin have to approve them, or who represents them in ...
user avatar
1 vote
1 answer
39 views

Educational sample of minimal working mining code

I would like if someone could point me to a minimal program source code that does solo minig on a CPU. (Can assume a running bitcoind/full node) Something that in theory (obviously not in practice) ...
user avatar
0 votes
1 answer
1k views

I have forgotten my Blockchain account password and 12 word recovery. I have the wallet id and password to the wallet. Can i get my funds back?

I have forgotten my Blockchain bitcoin account password and 12 word recovery(possibly didn't even create one). However I do have my wallet id and the password to the wallet. Is there a way to get the ...
user avatar
2 votes
1 answer
85 views

Is the entire blockchain kept in memory?

Putting aside pool mining, does the Bitcoin mining program keep the entire blockchain in memory? Including transactions? I've been reading through the original Bitcoin code and it looks like the ...
user avatar
  • 171
1 vote
1 answer
169 views

How to improve bitcoin-qt when downloading blockchain? (very technical, dev views appreciated)

GitHub suggested discussing here before bothering developers with an issue. So be it! :) I'm running Bitcoin Core Version v0.20.1 and Linux Mint 18.3 on crappy old hardware. Pruning blockchain to 2 G ...
user avatar
0 votes
2 answers
89 views

What are some of the GitHub alternatives that you consider for Bitcoin Core and other Bitcoin related projects? [closed]

Time for Bitcoin Core and other bitcoin related projects to look for GitHub alternatives? Some of the issues: https://techcrunch.com/2019/07/29/github-ban-sanctioned-countries/ https://twitter.com/...
user avatar
1 vote
0 answers
64 views

How can I add the MySQL C++ connector to Bitcoin Makefile?

I'm trying to add a custom function to my bitcoin client that queries a mysql db. I followed this guide for the basic: https://technology.finra.org/code/compile-run-customize-your-own-bitcoin-client....
user avatar
  • 11
0 votes
1 answer
41 views

Why CBlockIndex does not store a vector of next blocks for forward iteration?

CBlockIndex stores a pointer to previous block.. Is there any specific reason why it does not store a vector of "next" blocks for forward iteration? If you think, a typical tree (as data structure) ...
user avatar
3 votes
2 answers
124 views

What is a good approach to learning the Bitcoin codebase?

I've read Mastering Bitcoin and other high level resources and I believe I have a decent understanding of Bitcoin. I'd now like to read and understand the source code. However, I'm very new to cpp and ...
user avatar
1 vote
0 answers
26 views

How can I get stealthVersion from bitcoin's source code?

I found that a library called Bitcoinkit use stealthVersion. Network.swift public class Mainnet: Network { ... override var stealthVersion: UInt8 { return 0x2A } ... I tried to ...
user avatar
  • 11
0 votes
1 answer
44 views

Bitcoin create TX. What is 'hash_type'?

https://bitcoin.stackexchange.com/a/5241/92798 What is the meaning of item 13? Why is this value chosen? What does it mean?
user avatar
1 vote
1 answer
303 views

where in the source code is the the proof of work checking the blockheader hash and nonce?

Where in the source code do we check whether hash(blockheader*nonce) < Difficulty In fact, the line I found is as follows: https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/pow.cpp#L87 My ...
user avatar
1 vote
1 answer
60 views

Why Ardor does not use Maven?

Are there some reasons why maven and standard maven directory layout are not used in Ardor?
user avatar
0 votes
1 answer
224 views

Representation of coordinates in signature. OpenSSL

I want to calculate the v-value from the signature obtained using the OpenSSL ECDSA_do_sign function. I found that this value is calculated using the parity of y-coordinate of r. Here I also found ...
user avatar
  • 25
2 votes
1 answer
701 views

Bitcoin ECDSA signature in the compact format

I would like to understand how to get Bitcoin ECDSA signature in a compact format, when it's exactly 65 bytes. In the bitcoin-core repository, secp256k1_ecdsa_recoverable_signature_load is ...
user avatar
  • 25
1 vote
0 answers
94 views

What is the best way to test new consensus protocol?

I wanted to test a new consensus protocol. However, the bitcoin core is a large codebase (>100k lines). Is there any small codebase which is designed to test new consensus protocols and includes only ...
user avatar
0 votes
1 answer
82 views

Is it true that only one message can be sent at a time in Bitcoin Core?

I looked into Bitcoin Core client code, and it seems that there is a lock that allows only one thread to send data (Block, TX, etc.) at a given time point. If this is true, it means that transactions ...
user avatar
1 vote
0 answers
36 views

What is the behavior of the try catch statement in lines 1707-1729 in the ui.cpp in the release 0.1?

In the first public release, ui.cpp has this code on the lines in the subject: void CSendingDialog::OnReply3(CDataStream& vRecv) { int nRet; try { vRecv >> nRet; ...
user avatar
  • 333
2 votes
3 answers
225 views

Bitcoind does not like ECDSA (r, s) pair produced by OpenSSL

I am writing transactions manually and have stumbled across a rather bizarre situation. Only one in a few of the transactions I broadcast to bitcoind is accepted, otherwise I get a REJECT_NONSTANDARD ...
user avatar
  • 87
3 votes
1 answer
48 views

How is bitcoind "shy" when exchanging `version` packets?

This is more of a technical/programming question. I am referring to this line of code: https://github.com/bitcoin/bitcoin/blob/be992701b018f256db6d64786624be4cb60d8975/src/net_processing.cpp#L1699 ...
user avatar
  • 87
1 vote
1 answer
102 views

Where in the source code are transaction validation checks implemented?

I understand that consensus (mining) and transaction validation are different concepts. Correct me if I'm wrong, but I believe each full node validates transactions and puts the valid ones into its ...
user avatar
  • 11
20 votes
1 answer
1k views

How does the most recently found critical vulnerability (CVE-2018-17144) work?

If you were a miner, what are the steps you would take to create the extra (21,000,012.5th) bitcoin? Where in the source code is this exactly (link)? Why can't this be done by a non-miner? Also, ...
user avatar
1 vote
1 answer
48 views

Why was 'extern' used in the noui.h file?

When I review the Bitcoin Core source code, I see the noui.h as a header file, but the method noui_connect has been declared with the keyword extern. I think there is no need to do this. extern void ...
user avatar
1 vote
1 answer
62 views

Bitcoin Code and Transaction Model [closed]

I'm Studying bitcoin from a while, focusing transaction model and I'm looking to extract transaction model only to try out some experiments to make the structure better from the current one. If anyone ...
user avatar
  • 49
1 vote
2 answers
166 views

When are blocks validated?

Are blocks validated just before they are stored to memory, upon receipt from an RPC submit call, or at some other time? Can you point to the place in code where this validation process begins? Is ...
user avatar
  • 7,060
1 vote
0 answers
34 views

Are there any blockchain implementations that are not based on the Bitcoin source code?

I wanted to code up a blockchain from scratch using C++. So I got around to looking at some existing blockchain source code to get some ideas. But all I can find is the Bitcoin source or forks of it. ...
user avatar
  • 111
0 votes
1 answer
90 views

Which file is the source codes of regtest net located?

I try to compare the source codes between main net and regtest net of bitcoin. I am not sure where the source codes of regtest located. Would someone help me, please?
user avatar
  • 51
1 vote
0 answers
67 views

How to compile newest source and find merkleRoot hash value?

I am following youtube video for make own coin. I did below 4 lines command for compile newest bitcoin source. ./autogen.sh ./configure make sudo make install And run ./mycoind file at src/ ...
user avatar
  • 107
0 votes
1 answer
512 views

Bitcoin Source Code genesisOutputScript

I am checking bitcoin source code to learn forking a coin better, in this link https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp Line 52 has scratched my mind, what is that for? ...
user avatar
  • 161
2 votes
1 answer
349 views

(Shouldn't be too hard) Where vanitygen checks if the random address starts with the expected pattern?

I've been trying the find the code in Vanitygen that does checks whether the generated address starts with the expected pattern. Vanitygen repo: https://github.com/samr7/vanitygen What I currently ...
user avatar
  • 9,819
2 votes
1 answer
1k views

BTC Source code amount.h file

I have question about the source code, under src/amount.h I see the max coin supply being 21.000.000 (million) under the variable called MAX_MONEY. I want to ask what other variables mean, CAmount ...
user avatar
  • 161