Questions tagged [source-code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

Bitcoin validator node spec [duplicate]

We are working on integrating Bitcoin with another blockchain. Essentially, we are trying to store Bitcoin on this new blockchain. For that, we need a mechanism to properly store the Bitcoin ledger ...
0
votes
0answers
17 views

bitcoin-cli error -28

When I run any bitcoin-cli command I get the following message: error code:-28 error message: loading block index... As far I know this error means Client still warming up, so I should wait a few ...
1
vote
1answer
83 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 ...
2
votes
1answer
44 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?
0
votes
2answers
105 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 ...
0
votes
0answers
20 views

How can I programmatically check if a 12 word mnemonic is valid? [duplicate]

I would like to use python to check if a 12 word mnemonic is valid. How can this be done?
1
vote
1answer
33 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) ...
0
votes
1answer
997 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 ...
2
votes
1answer
60 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 ...
1
vote
1answer
118 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 ...
0
votes
2answers
81 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/...
1
vote
0answers
46 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....
0
votes
1answer
26 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) ...
3
votes
2answers
111 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 ...
1
vote
0answers
25 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 ...
0
votes
1answer
38 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?
1
vote
1answer
253 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 ...
1
vote
1answer
54 views

Why Ardor does not use Maven?

Are there some reasons why maven and standard maven directory layout are not used in Ardor?
0
votes
1answer
182 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 ...
2
votes
1answer
575 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 ...
1
vote
0answers
86 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 ...
0
votes
1answer
67 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 ...
1
vote
0answers
29 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; ...
2
votes
3answers
193 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 ...
3
votes
1answer
46 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 ...
1
vote
1answer
90 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 ...
20
votes
1answer
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, ...
1
vote
1answer
44 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 ...
1
vote
1answer
50 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 ...
1
vote
2answers
147 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 ...
1
vote
0answers
31 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. ...
0
votes
1answer
88 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?
1
vote
0answers
65 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/ ...
0
votes
1answer
471 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? ...
2
votes
1answer
326 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 ...
2
votes
1answer
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 ...
1
vote
1answer
5k views

How to Create New Genesis Block?

I am trying to create a new crypto currency and i am struggling with creating genesis block with the bitcoin code. I am following this tutorial https://bitcointalk.org/index.php?topic=225690.0 and i ...
0
votes
1answer
61 views

What are the most historic code changes on bitcoin core?

I was looking through the pull requests on bitcoin core's github and was looking for some of the major changes to the code. https://github.com/bitcoin/bitcoin/pulls?page=10&q=is%3Apr+is%3Aopen ...
1
vote
0answers
100 views

Altering blockinfo to include valid nonce and extraNonce's in the miner_tests

I currently work on upgrading an old cryptocurrency (fork of an old bitcoin version) to the latest of Bitcoin that includes a lot of tests. I currently am stuck with making this test succeed: https://...
10
votes
2answers
2k views

In 2009, where were Bitcoin source codes stored?

Now I can see the Bitcoin Core source code in Github but I wonder where the original source code of Bitcoin were stored back in 2009? Was it managed under SVN? How did contributors or programmers work ...
0
votes
1answer
389 views

What is consensus.BIP34Height? [duplicate]

In the bitcoin source code, I am looking at chainparams.cpp. I can see on line 81 something called consensus.BIP34Height? What is that? I can't figure out what this is. I'm not sure what else to ask ...
0
votes
1answer
111 views

Definition of `Idx`

idx is an integer in source code of bitcoin related softwares. https://github.com/decred/atomicswap/blob/70f795e/cmd/btcatomicswap/main.go#L391 https://github.com/btcsuite/btcd/blob/...
1
vote
1answer
357 views

Where's the code related to block 494784 for segwit2x?

I read everywhere that segwit2x activates at blocks 494784, around 15 or 16 of November. I did just checkout the segwit2x codebase doing: git clone https://github.com/btc1/bitcoin And I can see ...
0
votes
1answer
143 views

What is 999999999999ULL

I am building an altcoin based on bitcoin 0.12, in chainparams we find : consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0; consensus.vDeployments[Consensus::...
2
votes
0answers
151 views

Clarification of some getaddr() function inputs and outputs

In the Bitcoin system to discover new nodes, each node communicates with its peers by sending getaddr() to the peers. Based on the bitcoin implementation: //! the maximum percentage of nodes to ...
1
vote
2answers
3k views

How create / generate a coinbase transaction for a new block?

I am coding a miner program with C, and right now I need some info of how create / generate a coinbase transaction to add to the block before submit it to the bitcoin network. Someone can indicate any ...
1
vote
1answer
342 views

Bitcoin difficulty re targeting in case of catastrophic hashrate drop?

I do understand that the mining difficulty changes every 2016 blocks : next_difficulty = (previous_difficulty * 2016 * 10 minutes) / (time to mine last 2016 blocks) But how is difficulty changes if ...
1
vote
1answer
357 views

Why did Satoshi not choose for Segwit?

I know that the very early version of the Bitcoin code had a lot of advanced features, and was already very mature. But Segwit (storing signatures separately from the transactions in the block) is a ...