You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 5.1KB

7 years ago
10 years ago
10 years ago
  1. Bitcoin Core integration/staging tree
  2. =====================================
  3. [![Build Status](](
  5. Copyright (c) 2009-2014 Bitcoin Core Developers
  6. What is Bitcoin?
  7. ----------------
  8. Bitcoin is an experimental new digital currency that enables instant payments to
  9. anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
  10. with no central authority: managing transactions and issuing money are carried
  11. out collectively by the network. Bitcoin Core is the name of open source
  12. software which enables the use of this currency.
  13. For more information, as well as an immediately useable, binary version of
  14. the Bitcoin Core software, see
  15. License
  16. -------
  17. Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
  18. information or see
  19. Development process
  20. -------------------
  21. Developers work in their own trees, then submit pull requests when they think
  22. their feature or bug fix is ready.
  23. If it is a simple/trivial/non-controversial change, then one of the Bitcoin
  24. development team members simply pulls it.
  25. If it is a *more complicated or potentially controversial* change, then the patch
  26. submitter will be asked to start a discussion (if they haven't already) on the
  27. [mailing list](
  28. The patch will be accepted if there is broad consensus that it is a good thing.
  29. Developers should expect to rework and resubmit patches if the code doesn't
  30. match the project's coding conventions (see [doc/](doc/ or are
  31. controversial.
  32. The `master` branch is regularly built and tested, but is not guaranteed to be
  33. completely stable. [Tags]( are created
  34. regularly to indicate new official, stable release versions of Bitcoin.
  35. Testing
  36. -------
  37. Testing and code review is the bottleneck for development; we get more pull
  38. requests than we can review and test on short notice. Please be patient and help out by testing
  39. other people's pull requests, and remember this is a security-critical project where any mistake might cost people
  40. lots of money.
  41. ### Automated Testing
  42. Developers are strongly encouraged to write unit tests for new code, and to
  43. submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: `make check`
  44. Every pull request is built for both Windows and Linux on a dedicated server,
  45. and unit and sanity tests are automatically run. The binaries produced may be
  46. used for manual QA testing — a link to them will appear in a comment on the
  47. pull request posted by [BitcoinPullTester]( See
  48. for the build/test scripts.
  49. ### Manual Quality Assurance (QA) Testing
  50. Large changes should have a test plan, and should be tested by somebody other
  51. than the developer who wrote the code.
  52. See for how to create a test plan.
  53. Translations
  54. ------------
  55. Changes to translations as well as new translations can be submitted to
  56. [Bitcoin Core's Transifex page](
  57. Translations are periodically pulled from Transifex and merged into the git repository. See the
  58. [translation process](doc/ for details on how this works.
  59. **Important**: We do not accept translation changes as GitHub pull requests because the next
  60. pull from Transifex would automatically overwrite them again.
  61. Translators should also subscribe to the [mailing list](!forum/bitcoin-translators).
  62. Development tips and tricks
  63. ---------------------------
  64. **compiling for debugging**
  65. Run configure with the --enable-debug option, then make. Or run configure with
  66. CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need.
  67. **debug.log**
  68. If the code is behaving strangely, take a look in the debug.log file in the data directory;
  69. error and debugging message are written there.
  70. The -debug=... command-line option controls debugging; running with just -debug will turn
  71. on all categories (and give you a very large debug.log file).
  72. The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt
  73. to see it.
  74. **testnet and regtest modes**
  75. Run with the -testnet option to run with "play bitcoins" on the test network, if you
  76. are testing multi-machine code that needs to operate across the internet.
  77. If you are testing something that can run on one machine, run with the -regtest option.
  78. In regression test mode blocks can be created on-demand; see qa/rpc-tests/ for tests
  79. that run in -regest mode.
  81. Bitcoin Core is a multithreaded application, and deadlocks or other multithreading bugs
  82. can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure
  83. CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of what locks
  84. are held, and adds warning to the debug.log file if inconsistencies are detected.