Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [source-code]

The tag has no usage guidance.

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

How to build most basic bitcoin-qt from source?

When testing and fiddling with different settings for bitcoin-qt, I have to build bitcoin-qt from scratch from time to time. I am using Ubuntu. Since this is time consuming, I'm wondering what kind of ...
1
vote
0answers
23 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
28 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
79 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
50 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
74 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
272 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
52 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
55 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
25 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
2answers
100 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
43 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
59 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 ...
18
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
31 views

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

When i review the source code, i find that the noui.h is a header file, but the method noui_connect has been declared by key words 'extern'. i think there is no need to do this. extern void ...
1
vote
1answer
37 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 ...
0
votes
2answers
122 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 ...
0
votes
1answer
173 views

Debugging Bitcoin Unit Tests

I am running the unit tests from bitcoin source using make check, and would like to debug the tests using LogPrint in the bitcoin source files. I read in the Test Docs that logs are only output to ...
1
vote
0answers
28 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
83 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
54 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
328 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
282 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 ...
0
votes
2answers
171 views

What are seeds in the source code of bitcoin?

https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp starting from line 132, I see the function vSeeds.emplace_back("seed.bitcoin.") and next to them there are real full names. What do ...
1
vote
1answer
728 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 ...
0
votes
1answer
4k 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
49 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
80 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://...
8
votes
2answers
1k 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
285 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
95 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
352 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
124 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
142 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
2k 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
317 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
326 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 ...