Questions tagged [bitcoin-core-development]

Source code and development of Bitcoin Core, the reference implementation of Bitcoin.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
16 views

set minrelayfee by command line?

I've seen a couple of questions asked about the min relay fee tripping people up on transaction broadcasts and I recently encountered the same thing when working with lnd. I had to restart bitcoin in ...
  • 139
1 vote
1 answer
27 views

Proof of work: comparing computed hash with target hash

According to the source code here is where the hash computed by a miner is compared with the target hash: bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params& params) { ...
1 vote
0 answers
26 views

Do I have to worry about endian swapping when calculating ECDSA public key values, Creation & Signing of transactions and verification of signature?

Do I have to worry about endian swapping when calculating ECDSA public key values, Creation & Signing of transactions and verification of signature? This question is more of a straightforward yes/...
0 votes
0 answers
7 views

Example of a bitcoin docker container with thread sanitizer

I'm on an M1 Mac that doesn't have support for the thread and address sanitizers. So I'm moving my development into a docker container to build bitcoin on Ubuntu. Wondering if anyone has any examples ...
  • 139
1 vote
1 answer
40 views

How does AttachChain function works in the Bitcoin Core?

Here in the function AttachChain there is block of code: // Unless allowed, ensure wallet files are not reused across chains: if (!gArgs.GetBoolArg("-walletcrosschain", ...
1 vote
0 answers
29 views

Active vs inactive bitcoin nodes

The protocol documentation states "The typical presumption is that a node is likely to be active if it has been sending a message within the last three hours." Does this mean any message ...
2 votes
1 answer
202 views

bitcoin-cli importmulti readonly address "This type of wallet does not support this command"

I used to tapscript to generate a taproot address thus I don't know what the related xpub key would be so I can't easily import a descriptor. I know that bitcoin-cli version 21 was able to watch a ...
1 vote
1 answer
83 views

Help explaining some C++ code I haven't seen before [closed]

I'm studying for the upcoming pr review club. if (!m_foreign_outputs.empty()) { std::string s(m_foreign_outputs.size(), 0); for (auto i = m_foreign_outputs.size(); i--...
  • 139
2 votes
1 answer
38 views

signet network Error: CreateBaseChainParams: Unknown chain sig

What does this mean? I'm trying to work with signet to review some prs and I'm getting a fair amount of errors.
  • 139
2 votes
0 answers
47 views

Linting check isn't passing on GitHub but doesn't trigger locally

I have a pull request thats struggling to get past linting. Python's open(...) seems to be used to open text files without explicitly specifying encoding='utf8': test/functional/...
  • 139
2 votes
1 answer
21 views

Where is an example of a feature test testing bitcoin-cli?

Looking for an example so I can run some functional tests against bitcoin-cli.
  • 139
1 vote
2 answers
63 views

Details regarding bitcoin addr messages

What is the frequency of the addr messages in bitcoin? And are the contents of the addr messages from the new or the tried table or both?
0 votes
0 answers
42 views

Sending addr messages to nodes

I came across this resource that can be potentially used to send messages to nodes. How would I go about sending addr messages to nodes? Is there a built in utility that I could use(bitcoin-cli) or do ...
0 votes
1 answer
39 views

IP and .onion addresses in buckets

From my understanding, the new tables have 1024 buckets and each bucket can hold a maximum of 64 addresses. Is there a limit set in place for the maximum number of address types that can be part of ...
2 votes
1 answer
175 views

Why Bitcoin Core source code use #include bracket syntax instead of quote syntax

Why Bitcoin Core source code use #include <rpc/wallet.h> bracket syntax instead of #include "rpc/wallet.h" quote syntax. Can intellisense C++ editors understand this option and not ...
2 votes
2 answers
167 views

How can I configure Vim to work with bitcoin core C++ source code and have Intellisense like functionality?

I use Vim for editing, I installed Conquer Of Completion (COC) plugin and now I can edit C++ projects with Vim taking advantage of syntax highlighting, autocompletion, inline error messages, etc. But ...
1 vote
1 answer
129 views

Why rebroadcasting transactions in the Bitcoin Core?

There is a function here, named ResendWalletTransactions in the Bitcoin Core: // Rebroadcast transactions from the wallet. We do this on a random timer // to slightly obfuscate which transactions come ...
0 votes
1 answer
22 views

What are dummy batch and dummy database classes in the Bitcoin Core?

Here and here are two classes called respectively DummyBatch and DummyDatabase: /** A dummy WalletDatabase that does nothing and never fails. Only used by unit tests. **/ class DummyDatabase : public ...
3 votes
1 answer
161 views

When was the 10,000 B limit for scripts introduced?

The file src/script/script.h defines a MAX_SCRIPT_SIZE of 10,000 B. Among other instances, the MAX_SCRIPT_SIZE is used in the IsUnspendable() check, which allows us to avoid adding outputs with ...
  • 65.4k
1 vote
2 answers
319 views

Should we inform others that all tests are passed in the course of reviewing a pull request?

I'm not sure is there a right place to ask this question or not, if it is off-topic please let me know. When reviewing a pull request of the Bitcoin Core, is it common to comment and inform others ...
0 votes
0 answers
21 views

Cannot build bitcoin source on macOS

I am following https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md guide for installing bitcoin from source(master branch) on my mac. After installing the minimal dependencies and ./...
  • 1
1 vote
0 answers
30 views

How to ignore ResourceWarnings during running tests?

I was trying to run python tests in order to test a PR. I used this command to run p2p tests: [amirreza@localhost bitcoin]$ ./test/functional/test_runner.py test/functional/p2p* It produces lots of ...
0 votes
1 answer
23 views

What is a functional infrastructure required to run a Bitcoin blockchain?

I need to understand what type of functional infrastructure required to run a Bitcoin. I found following article on the topic but I'm still not clear what is a "functional infrastructure" ...
1 vote
2 answers
96 views

What is an inv message?

I was reviewing the PR #25720. This is part of description for the PR: However, if an INV for a block is received before our headers chain is caught up, we'll then start to sync headers from each ...
3 votes
1 answer
48 views

Application security of Bitcoin Core

Is there any information about how Bitcoin Core has applied secure development or application security in the past and currently? For example, the inclusion of third-party dependencies must be checked ...
2 votes
0 answers
29 views

what is the CValidationInterface class int the Bitcoin Core?

There is class here in the Bitcoin Core, I tried to learn about it and what is its job but couldn't figure out anything useful. /** * Implement this to subscribe to events generated in validation * ...
0 votes
0 answers
18 views

What are some things that could be considered for stronger auditability and safety post completion of libbitcoinkernel?

The ongoing libbitcoinkernel project (1,2) is clearly a move in the right direction for Bitcoin Core and its consensus code. Longer term (ie post completion of libbitcoinkernel or perhaps even ...
2 votes
1 answer
641 views

What was the bug for the Bitcoin value overflow in 2010?

In 2010, there was an incident of value overflow on Bitcoin. I am not a developer, but I want to know what the bug was in more detail. #1 is the only answer I found online, and #2-3 are my attempts to ...
0 votes
1 answer
26 views

Is this other Boost warning harmless and should be ignored when building Bitcoin Core?

In a similar vein to this question I got a new Boost warning when building a PR branch on MacOS. In file included from /usr/local/include/boost/test/test_tools.hpp:46: /usr/local/include/boost/test/...
0 votes
0 answers
42 views

Error creating transaction using Python bitcoinlib

I'm trying to create a transaction with the Bitcoinlib python library and I'm getting an error. I am trying to load an existing wallet using the private key and then send money from it to another ...
0 votes
0 answers
77 views

Python unable to install Bitcoinlib

I try install bitcoinlib python package and I get an error: Collecting bitcoinlib Using cached bitcoinlib-0.6.5-py3-none-any.whl (315 kB) Requirement already satisfied: numpy>=1.21.0 in ./venv/...
2 votes
1 answer
78 views

Is anyone working on separating the wallet from Bitcoin Core?

I don't remember the talk that I was watching, but if I remember correctly the speaker mentioned something about separating out the wallet part of Bitcoin Core because not all of its functionality is ...
  • 35
3 votes
0 answers
68 views

How does bitcoin core handle service flag spoofing?

There are 5 service flags in src/protocol.cpp: static std::string serviceFlagToStr(size_t bit) { const uint64_t service_flag = 1ULL << bit; switch ((ServiceFlags)service_flag) { case ...
0 votes
1 answer
33 views

What is the FeeReason enumeration in the Bitcoin Core?

There is enumeration called FeeReason. What is it? What is its use cases? /* Enumeration of reason for returned fee estimate */ enum class FeeReason { NONE, HALF_ESTIMATE, FULL_ESTIMATE, ...
0 votes
0 answers
27 views

Could someone share with me some documentations or sites on how to set up a custom signet using bitcoin core?

Recently I am going to use bitcoin core to set up a custom signet on my docker. I have read some implementations on wiki, but I had some problems when starting up a custom signet. One of the problem ...
  • 21
1 vote
1 answer
149 views

Is there code in libsecp256k1 that theoretically should be moved to the main Core codebase?

In this question on libsecp256k1 Pieter Wuille stated: libsecp256k1 provides implementations for all kinds of operations that involve private keys, public keys, or both. That includes key generation (...
1 vote
1 answer
43 views

What is the difference between minRelayTxFee and rollingMinimumFeeRate?

CTxMemPool has a member named rollingMinimumFeeRate: mutable double rollingMinimumFeeRate GUARDED_BY(cs); //!< minimum fee to get into the pool, decreases exponentially The comment explains ...
1 vote
1 answer
124 views

In which situation the fee rate can be negative and what does it really mean?

Here in the definition of CFeeRate class is a member called nSatoshisPerK: /** * Fee rate in satoshis per kilovirtualbyte: CAmount / kvB */ class CFeeRate { private: /** Fee rate in sat/kvB (...
0 votes
1 answer
69 views

How to obtain transaction-ID for a payment?

I'm trying to create a transaction and send it to the blockchain. The goal is to get an address from which the money comes and an address to which the money will go, send the transaction to the ...
1 vote
1 answer
32 views

what is the mapBlocksUnknownParent variable?

I was reviewing this pull request. It was an attempt to remove the global variable mapBlocksUnknownParent. I found the definition here. In the CChainState::LoadExternalBlockFile function. // Map ...
0 votes
2 answers
54 views

Shouldn't CChain::Next check if the given block is the tip block or not?

This function here gives a pointer to a block, and return the succesor block of that pointer. /** Find the successor of a block in this chain, or nullptr if the given index is not found or is the ...
1 vote
1 answer
50 views

Should these Bitcoin Core build warnings be addressed or are they entirely harmless?

When I build Bitcoin Core on MacOS I get a number of "overriding a member function" Boost warnings: e.g. /usr/local/include/boost/signals2/connection.hpp:212:34: warning: 'release_slot' ...
2 votes
0 answers
30 views

Difference between pprev and pskip pointers in the CBlockIndex class?

In the Bitcoin Core there is class called CBlockIndex which as its name appears is the implementation of blocks. This class has two variable that for me they looks the same: class CBlockIndex { public:...
2 votes
1 answer
41 views

what is SERIALIZE_METHODS macro in the Bitcoin Core?

* Implement the Serialize and Unserialize methods by delegating to a single templated * static method that takes the to-be-(de)serialized object as a parameter. This approach * has the advantage ...
4 votes
2 answers
1k views

Why does IsCoinBase() check if there is exactly one input?

In the Bitcoin Core source code there is a function to check if a given transaction is a coinbase or not: bool IsCoinBase() const { return (vin.size() == 1 && vin[0].prevout....
5 votes
1 answer
183 views

What are packages in bitcoin core and what is their use case?

In bitcoin source code there is an entity named Package and I've seen them many places over the source code. I found this comment in src/policy/packages.h: /** A package is an ordered list of ...
5 votes
2 answers
559 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: * - ...
2 votes
1 answer
81 views

Where on the web can I find a Stratum protocol specification document?

I am writing my own mining pool server for Bitcoin and would like to work with a detailed and complete specification document for the Stratum protocol. There are documents on the web that casually ...
  • 257
5 votes
1 answer
109 views

How are validity flags in block index set in concurrent blocks when one of them is chosen?

I'm trying to understand block validity flags, and what happens when a branch occurs. I found a block status flags in the bitcoin core source code: enum BlockStatus : uint32_t { ...
  • 195
3 votes
1 answer
141 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 ...

1
2 3 4 5
11