Skip to main content
11 votes
Accepted

What are the debug categories?

net: Networking. All messages related to communicating with other nodes on the network, including what P2P messages were sent and received and to whom and other information about the network messages. ...
Ava Chow's user avatar
  • 71.6k
6 votes
Accepted

How to check OP_CHECKLOCKTIMEVERIFY?

OP_CHECKLOCKTIMEVERIFY verifies, as the name implies, the locktime. It does not verify the time. In other words, it checks the transaction's nLockTime field against the value provided in the opcode. ...
Pieter Wuille's user avatar
5 votes
Accepted

What IDE to use for Bitcoin development?

Bitcoin Core uses the autotools build system, but CLion only supports projects using CMake, so you can't use Core with CLion. You should be able to use Core with Eclipse CDT and NetBeans as those ...
Ava Chow's user avatar
  • 71.6k
4 votes
Accepted

bitcoind 23.0 crashed mysteriously after 2 hours, what do I do next?

I think I found a likely cause of the crashes. I saw some suspicious log messages: [ 6067.607405] blk_update_request: I/O error, dev sda, sector 155782528 op 0x0:(READ) flags 0x0 phys_seg 1 prio class ...
Epictitus's user avatar
4 votes

How do I get started debugging Bitcoin Core functional tests?

To understand the functional tests, I think it's important to start with an understanding of how bitcoind works and how the RPC interface is used. Start Bitcoin Core in a terminal window in regtest ...
pinhead's user avatar
  • 5,174
3 votes
Accepted

What do these memory configurations in debug.log of BitCoin Core represent?

The block index and chain state databases are LevelDB databases. LevelDB has its own caching and cache management. So 2 MiB is being allocated for the block index's LevelDB database cache, and 8 MiB ...
Ava Chow's user avatar
  • 71.6k
3 votes

How to limit the debug.log file while running bitcoind?

As I don't have enough reputation to add a comment to hsmiths (correct!) answer above: I found I had to also add a line to tell logrotate to switch users to the bitcoin user (as I run bitcoind as its ...
willcl_ark's user avatar
3 votes
Accepted

Debugging Bitcoin Unit Tests

You are confusing the two kinds of tests. Unit tests are compiled into a separate binary and run by make check. Functional tests are testing the RPC commands and have to be run explicitly using the ...
Ava Chow's user avatar
  • 71.6k
2 votes

How to debug bitcoin core in "real time"

There is no "makefile" command. If you don't build the project, there is no way for you to debug it. The released binaries do not contain any debugging symbols so it will be very difficult for you to ...
Ava Chow's user avatar
  • 71.6k
2 votes

What IDE to use for Bitcoin development?

There is an issue in the Bitcoin Core repo on the existing IDE options. Apparently it is/was possible to use CLion in debug mode but gdb or lldb are generally recommended for line by line debugging. ...
Michael Folkson's user avatar
2 votes

bitcoin debug withe clion

CLion only supports using the CMake build system. However Bitcoin Core uses the autotools build system. Without some special configuring, it is unlikely that you will be able to build Bitcoin Core ...
Ava Chow's user avatar
  • 71.6k
2 votes

Setting up Bitcoin Core Wallet

From your debug.log file, you can see these lines: 018-03-28 18:05:07 LevelDB read failure: Corruption: block checksum mismatch 2018-03-28 18:05:07 Corruption: block checksum mismatch Typically this ...
meshcollider's user avatar
  • 11.9k
2 votes
Accepted

Debugging Bitcoin Core with gdb - how to turn off compiler optimizations

Bitcoin Core disables -O2 and enables -Og when --enable-debug is set. -Og is intended for debugging; however, it removes some of the debugging information and is buggy. To disable it and to improve ...
MCCCS's user avatar
  • 10.2k
2 votes
Accepted

What is Valgrind? When should I use it for debugging Bitcoin Core over using gdb, lldb, pdb etc?

If you watched Fabian's presentation (or read the transcript) you'll have seen that he said you can use Valgrind for memory leak checks and that it can be used similarly to lldb. valgrind --leak-check=...
Michael Folkson's user avatar
2 votes

How do I get started debugging Bitcoin Core functional tests?

There are a few different resources I would point you to. For more information on functional tests in Bitcoin Core (with guidance on writing them) I would check out the functional tests README. For a ...
Michael Folkson's user avatar
2 votes
Accepted

blocknotify ignores > /dev/null 2>&1 and fills up my debug log

The log message runCommand error: system(/root/.nvm/versions/node/v11.15.0/bin/node /home/BTC/block.js ea31b10db3554ba03a81166c27aa94ba27c335769 7cdd834509731c8946d6fde > /dev/null 2>&1) ...
Pieter Wuille's user avatar
2 votes

Another similar experience to "a Bug in copying BTC address"

So, first of all, the two addresses you show are indeed related. Native segwit (P2WPKH) addresses use a closely related public key hash construction as legacy (P2PKH) addresses, they just use an ...
Murch's user avatar
  • 77k
2 votes
Accepted

Do you need a configuration flag to be able to obtain detailed debug logs?

No they are orthogonal. --enable-debug creates unoptimized binaries which are more usable when you're trying to attach a debugger (e.g. gdb, lldb). It is unrelated to debug output. Debug output is ...
Michael Folkson's user avatar
2 votes

Bitcoin transaction script debugging strategy - how to debug 'invalid script' errors

As mentioned in my comment, for answer completeness, a great way of debugging Bitcoin script is using the script debugger. VerifyECDSASignature passed on the first of the two signatures in the ...
meshcollider's user avatar
  • 11.9k
2 votes
Accepted

Building Bitcoin Core on Linux/Ubuntu with Visual Studio Code

I found a solution to work with VSCode, and use it for compilation. Install vscode on your machine, including the C/C++ development extension Create a directory named .vscode in the root of bitcoin ...
user107511's user avatar
2 votes
Accepted

Fail at coding my private to public key converter (Pyhon)

Your immediate problem is that you replaced the python '3-arg pow' used for modular exponentiation with separate power and modulo operations -- i.e. x ** y % p instead of pow(x,y,p). While these ...
dave_thompson_085's user avatar
1 vote
Accepted

Does bitcoind validate every block for every time it starts?

IIRC, it validates the best chain of headers it got, and see if this chain is indeed the best chain its peers know about. So, you won't validate blocks entirely (like, all transaction), but only the ...
Davidson Souza's user avatar
1 vote
Accepted

When would I use USDT tracing over debugging? How do they compare and complement each other?

0xB10C answered this on Mastodon. Alternative answers are welcome. We implement our own tracepoints in our userspace application (Bitcoin Core) and write custom scripts to get insights into the parts ...
Michael Folkson's user avatar
1 vote

Debugging Bitcoin Core with gdb - how to turn off compiler optimizations

As of PR #16435 --enable-debug is actually setting "-O0", so there should be no optimization at all anymore.
fjahr's user avatar
  • 111
1 vote

Converting raw scriptPubKey to readable format

I figured it out. setps: Get the transactionID RPCCall getRawTransaction transactionID - copy the rawTransaction RPCCall decoderawtransaction rawTransaction - copy the scriptPubKey RPCCall ...
Vishwas Bhushan's user avatar
1 vote

Setting up Bitcoin Core Wallet

Thanks, that was helpful. Now, I have never had a problem with that computer. Can't remember it blue screening a single time. So the question was, why was Bitcoin Core synchronization causing ...
Rahul Deshmukh's user avatar
1 vote

Debugging bitcoind

As Nate Eldrige commented: Try gdb /path/to/bitcoind and then attach 841. However, what OS are you on? Some don't allow normal users to attach debuggers to running processes; you would have to be ...
1 vote

How to limit the debug.log file while running bitcoind?

Alternatively, you can use printtoconsole to redirect the debug output to the console instead of the debug.log file.
Murch's user avatar
  • 77k

Only top scored, non community-wiki answers of a minimum length are eligible