You can use the invalidateblock RPC commands to create blockchain forks.
invalidateblock hash tells a node to consider hash invalid, so just generate a bunch of blocks, invalidate one somewhere down the chain on one of the regtest nodes, and have that node generate a bunch more to create a fork.
See qa/rpc-tests/mempool_resurrect_test.py in the Bitcoin ...
Testnet is really heavy (hundreds of gigabytes), there is a lighter alternative to that now: signet. There is also a local-only network called regtest, which I put in its own section. Finally, I'll explain txindex, which is a useful option to have your own mini block explorer.
To use it, first start bitcoind with the option:
It will ...
I managed to test forks by creating 3 reg test nodes. One node is used to interface with my software, and two other nodes are used to hold competing blockchains. The regtest mode starts each node with no connections to begin with, so they are completely isolated. I can use "sendrawtransaction" and "setgenerate" on these isolated nodes to create competing ...
Previous Bitcoin Core PR review club sessions
A good starting point is the various Bitcoin Core PR review club sessions that have been held thus far on specific commits of the Taproot PR. The latest one was on "Implement Taproot validation" (hosted by John Newbery) and there are various notes and a transcript of the meeting there. There are also ...
I'd suggest starting here: https://bitcoincore.org/en/2015/12/23/capacity-increases-faq/. There's also a SegWit adoption page on the site somewhere.
Finally, this article has some details on recent testing: http://www.coindesk.com/bitcoin-scaling-segregated-witness-expected-launch/
There are a number of more complex alternatives under discussion which involve more elastic limits (instead of the hard limit which currently exists), automatically adjusted limits based on some metric in the blockchain, or some combination of both.
More complex alternatives mean more complex code and more potential for bugs. They certainly could and should ...
Testnet code has been modified to lessen the impact of fluctuations of hashing power mining against testnet:
If you wish to test against your own testnet, or think you might interfere with others needlessly, then Testnet-In-A-Box is for you.
Now this doesn't mean you shouldn't use Testnet -- especially if you ...
The functional tests test the RPCs. The unit tests test the C++ code directly by calling the functions.
The functional test frameworks uses a version of python-bitcoinrpc which can be found here. This library allows the test framework to call RPC commands as if they were python functions; authproxy handles the conversion to HTTP POST requests for the RPC ...
I'll use the definitions used in this presentation from Jonathan Metzman at Black Hat 2019 but obviously this is a relatively new field and so there may well be disagreement amongst researchers and academia on formal definitions.
In this presentation Metzman explained how the first rudmimentary fuzzers were completely black box meaning they knew nothing ...
Summarized from Bitcoin Core's Segregated Witness announcement:
The original version of SegWit was implemented in April through June 2015 for the Elements Project. It has facilitated every transaction on the Elements-based sidechains since then.
The new softfork-variant of SegWit moved to the multi-user testing stage in December 2015 by activating on the ...
Blockchain.info service will not accept testnet coins so you can only test with regular coins.
As you can see in their site the minimum transfer amount allowed by their system is 0.0005 BTC so that's the minimum and no fee is required for that amount.
As you will be on the sender and receiving ends you can send any amount, if everything go as it should ...
You could take a look at Jeremy Rubin's TinyCoin:
It is, exactly as the name suggests, a very small cryptocurrency written in python which is designed purely for learning purposes. Might be what you're after :)
Checkout the updated Testnet in a box. You will need bitcoind already installed in your system.
The "Testnet in a box" linked above is just like the world-wide bitcoin network except the only members are the 2 running on your computer. There should be no difference except that it's easier to generate coins.
first install the software(bitcoin-qt) by following the steps:
sudo apt-add-repository ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get install bitcoin-qt
since testnet is huge, as @Janus Troelsen suggest, there is a lighter version(signet):
click on the Receive button in the screenshot to get the ...
This is the output for all platforms at the moment, not just MacOS. To paraphrase from sipa on IRC:
The first summary is bitcoin's own summary: because of some hackery to run unit tests in parallel, it currently shows no tests (even though they are executed).
The second and third summary are the output from make check for the built-in dependencies, ...
It depends on the situation. When the change is a few lines of code it is sufficient to show the author the patch and they will amend the pull request. You can do this using a ``` diff in the comments or link to your branch in the comments.
If it is a bigger change, to avoid the clutter of the GitHub UI you can surround it by <details><summary>...
In the paper The Art, Science and Engineering of Fuzzing the authors define fuzzing as “a process of repeatedly running a program with generated inputs that may be syntactically or semantically malformed”.
Fuzz testing is not a new concept. It was introduced in the early 1990s but at the present time its potential for finding bugs has not been fully explored ...
As Nate Eldredge suggest, you could use the Bitcoin Testnet. This is a separate Bitcoin fork that exists especially for testing purposes.
You can easily get some testnet coins from testnet faucets.
Besides that, do you know that it is possible to create a transaction with multiple inputs and multiple outputs? So instead of creating many transactions, you ...
It might contain security vulnerabilities (which could potentially expose your private key), but that's extremely unlikely. Something more plausible (but still unlikely) is corrupting your wallet.dat, so be sure to back it up before upgrading.
As a normal user, the test build ought to be safe for most purposes. The main risk, I guess, is for people ...
You likely have many small (in value) coins in your wallet, so when constructing a payment, many of them need to be assembled to construct a transaction - resulting in a large (in bytes) transaction.
The reference implementation (v0.8.6) will enforce a fee of 0.0001 BTC per kilobyte if it doesn't satisfy the "free transaction policy". Future versions of ...
You are probably trying to pay with BTC collected from very small payments (known as dust). This dust is commonly collected from advertisement sites. Though they know sending small payments will break your wallet this way, they just don't care as long as you keep clicking ads!
Since transaction size depends greatly on how many payments you're drawing money ...
So entropy seeds mnemonic (bip39?), then mnemonic | password hashes to Seed; Seed then acts as the master key for the bip32 xprv? (correct me if I'm wrong!?)
That sounds about right. Most of the process is well detailed in BIP-39.
An SHA-256 is taken of the entropy, and the first entropy_len_in_bits / 32 bits of this hash are appended to the end of the ...
As far as I know, there is no way to download arbitrary blocks (although I suspect it's not too hard to do if you implement your own client).
If you just want blocks for testing, you won't have much trouble finding bootstrap.dats that contain a few hundred thousand blocks. Alternatively, you could just run bitcoin core for half an hour or so and get a few ...
If you know what hashes of the blocks you want, you can use the P2P protocol to connect to a node and request those specific blocks. However, you cannot just do that with block heights as the block's height is not a unique identifier for the block. There are many libraries available that can speak the P2P protocol. The python-bitcoinlib can be used to send ...
If you need 100 coins, you should use regtest mode, this is a message from a faucet website:
Please do not ask me to send a coin outside the faucet!
My stocks of coins are shrinking and generation new coins is becoming more and more difficult.
If you really need a lot of testing coins, try some other solution. For example:
You can sign a message using the signmessage command. Note that this only works if you are using legacy addresses (Bitcoin Core currently defaults to p2sh-segwit addresses which cannot be used to sign a message). You an get a legacy address using:
bitcoin-cli getnewaddres "" legacy
If the wallet is locked, you won't be able to sign a message.
The Bitcoin Core contributing guidelines recommend that post Concept ACK, Approach ACK:
A review begins with ACK BRANCH_COMMIT, where BRANCH_COMMIT is the top
of the PR branch, followed by a description of how the reviewer did
As you suggest "I ran the tests on typical hardware" generally isn't particularly useful as Bitcoin Core has ...
Marco Falke has a site that analyzes the current line, function and branch coverage for unit tests, functional tests and fuzz tests.
Alternatively, vasild runs clang's tools and then a script to highlight which lines in the coverage report have been modified by a particular patch (PR).