aboutsummaryrefslogtreecommitdiff
path: root/doc/developer-notes.md
AgeCommit message (Collapse)Author
2019-12-15fix directory path for secp256k1 subtree in developer-noteshackerrdave
2019-12-13doc: update developer notes wrt unix epoch timeJon Atack
2019-11-23Merge #17539: doc: Update and improve Developer Notesfanquake
794fe91395c79f46a6d920bc08de5a0551b359a3 doc: Update and improve Developer Notes (Hennadii Stepanov) Pull request description: This PR: - removes outdated things, e.g., global pointer `pwalletMain` etc - adds "Sanitizers" to the TOC - makes filenames, `peer.dat` and `debug.log`, monospaced - specifies that _compile-time_ constant names are all uppercase - rewords using `explicit` with constructors ACKs for top commit: jamesob: lazy ACK https://github.com/bitcoin/bitcoin/pull/17539/commits/794fe91395c79f46a6d920bc08de5a0551b359a3 practicalswift: ACK 794fe91395c79f46a6d920bc08de5a0551b359a3 -- nice improvements! Tree-SHA512: 2c5f035b1627f5fac8dc2453199d9e46bd101f86771de567cd95698de3c61cc459444ec1a68710e1d280195e1e40b42d9f40906297d12f12bf37749eca58297d
2019-11-20doc: Update and improve Developer NotesHennadii Stepanov
2019-11-19doc: Add some better examples for scripted diffWladimir J. van der Laan
The current example isn't too great, for example it uses `find` instead of `git ls-files`. Add a subsection with suggestions and examples.
2019-11-05Merge #17044: init: Remove auto-import of `bootstrap.dat` and associated codeWladimir J. van der Laan
104f7de5934f13b837fcf21f6d6b2559799eabe2 remove old bootstrap relevant code (tryphe) Pull request description: This picks up #15954 I fixed the code and added at a functional test utilizing the scripts in `contrib/linearize` as suggested by @MarcoFalke . ACKs for top commit: laanwj: ACK 104f7de5934f13b837fcf21f6d6b2559799eabe2 Tree-SHA512: acac9f285f9785fcbc3afc78118461e45bec2962f90ab90e9f82f3ad28adc90a44f0443b712458ccf486e46d891eb8a67f53e7bee5fa6d89e4387814fe03f117
2019-11-05remove old bootstrap relevant codetryphe
- only load blockfiles when we have paths - add release notes for modified bootstrap functionality - amend documentation on ThreadImport
2019-11-04doc: Fix some misspellingsrandymcmillan
2019-10-30doc: Add developer note on c_str()Wladimir J. van der Laan
Add a note when to use and when not to use `c_str()`.
2019-10-14doc: Add switch on enum exampleHennadii Stepanov
2019-09-19[doc] update brew instruction for doxygenSjors Provoost
2019-08-29Merge #16461: doc: Tidy up shadowing sectionfanquake
9452802480bd154e23771230bbdfebde1dbaa941 doc: Tidy up shadowing section (João Barbosa) Pull request description: Removes the example because it violates the code format. ACKs for top commit: MarcoFalke: unsigned ACK 9452802480bd154e23771230bbdfebde1dbaa941 ryanofsky: ACK 9452802480bd154e23771230bbdfebde1dbaa941 fanquake: ACK 9452802480bd154e23771230bbdfebde1dbaa941 - Thanks for following up. Tree-SHA512: 1fc31355d368225713298da7803e39e99014fbfcd229f2d3b56c082de95ab2965e51c80b172a5abce4646c53f845fa62a6d94d5df714e7835cac07a8ec7d5da7
2019-08-28doc: Tidy up shadowing sectionJoão Barbosa
2019-08-03doc: Fix grammar and punctuation in developer notesKristian Kramer
This pull request is regarding minor grammar and punctuation errors in the developer notes. There were no modifications to the existing code, only alterations to fix the grammar and punctuation in the text. Update developer-notes.md Update developer-notes.md Revert "Update developer-notes.md" This reverts commit dfeb0bacb054ed24766f8af7bae0c0166b0cb4cb.
2019-07-09scripted-diff: rename CBasicKeyStore to FillableSigningProviderAndrew Chow
-BEGIN VERIFY SCRIPT- git grep -l "CBasicKeyStore" | xargs sed -i -e 's/CBasicKeyStore/FillableSigningProvider/g' -END VERIFY SCRIPT-
2019-06-20doc: remove orphaned header in developer notesJon Atack
The "Git and GitHub tips" section was moved from doc/developer-notes.md to doc/productivity.md in 5b76c31, but the header link to that long-gone section in the developer notes remains and needs to go. So long, Git and GitHub tips, we barely knew ya.
2019-06-11Fix spelling errors identified by codespell 1.15.0Ben Woosley
After this commit, the only remaining output is: $ test/lint/lint-spelling.sh src/test/base32_tests.cpp:14: fo ==> of, for src/test/base64_tests.cpp:14: fo ==> of, for ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt Note: * I ignore several valid alternative spellings * homogenous is present in tinyformat, hence should be addressed upstream * process' is correct only if there are plural processes
2019-05-01doc: Explain how to pass in non-fundamental types into functionsMarcoFalke
2019-04-25Align code example with clang-formatHennadii Stepanov
2019-03-22[docs] remove reference to signrawtransaction in the developer docs.John Newbery
2019-03-02docs: Update Transifex linksmarcuswin
2019-02-18Merge #15348: doc: Add separate productivity notes documentMarcoFalke
5b76c314d6 doc: Add separate productivity notes document (Carl Dong) Pull request description: Many developers have their own tools and tricks to be more productive during their cycles, so let's document the best ones so that everyone can benefit from them. Tree-SHA512: b4989e7a815e972a9a646f448fb6c08bd896b4bce77fd7fb22a71a7602971d4cbe34f88183f503f5b851d002784d9e91b87df5348c661eeb9cefa69c52e0de2b
2019-02-05Merge #14519: tests: add utility to easily profile node performance with perfMarcoFalke
13782b8ba8 docs: add perf section to developer docs (James O'Beirne) 58180b5fd4 tests: add utility to easily profile node performance with perf (James O'Beirne) Pull request description: Adds a context manager to easily (and selectively) profile node performance during functional test execution using `perf`. While writing some tests, I encountered some odd bitcoind slowness. I wrote up a utility (`TestNode.profile_with_perf`) that generates performance diagnostics for a node by running `perf` during the execution of a particular region of test code. `perf` usage is detailed in the excellent (and sadly unmerged) https://github.com/bitcoin/bitcoin/pull/12649; all due props to @eklitzke. ### Example ```python with node.profile_with_perf("large-msgs"): for i in range(200): node.p2p.send_message(some_large_msg) node.p2p.sync_with_ping() ``` This generates a perf data file in the test node's datadir (`/tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data`). Running `perf report` generates nice output about where the node spent most of its time while running that part of the test: ```bash $ perf report -i /tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data --stdio \ | c++filt \ | less # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 135 of event 'cycles:pp' # Event count (approx.): 1458205679493582 # # Children Self Command Shared Object Symbol # ........ ........ ............... ................... ........................................................................................................................................................................................................................................................................ # 70.14% 0.00% bitcoin-net bitcoind [.] CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) | ---CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 70.14% 0.00% bitcoin-net bitcoind [.] CNetMessage::readData(char const*, unsigned int) | ---CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 35.52% 0.00% bitcoin-net bitcoind [.] std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) | ---std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) ... ``` Tree-SHA512: 9ac4ceaa88818d5eca00994e8e3c8ad42ae019550d6583972a0a4f7b0c4f61032e3d0c476b4ae58756bc5eb8f8015a19a7fc26c095bd588f31d49a37ed0c6b3e
2019-02-05doc: Add separate productivity notes documentCarl Dong
Many developers have their own tools and tricks to be more productive during their cycles, so let's document the best ones so that everyone can benefit from them.
2019-01-24[doc] add notes on release notesJohn Newbery
2019-01-22docs: add perf section to developer docsJames O'Beirne
2019-01-04Merge #14832: docs: Add more Doxygen information to Developer NotesMarcoFalke
a62e667296 docs: Add more Doxygen information to Developer Notes (Jon Layton) Pull request description: Update information about Doxygen in `doc/developer-notes.md`. Alternatively, this could have its own file (like `doc/web-documentation.md`), since there are installation steps included. For example, I had to run: ``` brew install doxygen graphviz ``` on MacOS, otherwise failures occurred. This information could also be linked to the `doc/release-process.md`. Tree-SHA512: 5d77ee83e1b96fde036482b502f676a90a56f3f667753545a7cfba5c2e3b825644bb4cf0f8a84b7f9ba92fa5f2e1cd6ef1e27a94277f43d012355df741f7dd2f
2018-12-06Merge #14882: [doc] developer-notes.md: point out that UniValue deviates ↵MarcoFalke
from upstream a67d71311d [doc] developer-notes.md: point out that UniValue deviates from upstream (Sjors Provoost) Pull request description: While debugging an issue I was somewhat surprised to [learn](https://github.com/bitcoin/bitcoin/pull/14164#issuecomment-419752678) that we've moved `src/univalue` from https://github.com/jgarzik/univalue to https://github.com/bitcoin-core/univalue, that these repos are both maintained and they're different. The first mention of using the bitcoin-core repo is from late 2015 in #7157. I didn't check when the last common ancestor commit is. I couldn't find documentation as to why (these things just happen in open source of course), but at minimum we should make this more clear. There's also the following line in `config.ac` that I'm not sure what to do with: ``` AC_INIT([univalue], [1.0.3], [http://github.com/jgarzik/univalue/]) ``` Tree-SHA512: e58105677b5ebe0005772282da4a805fee7dfccacfb1b2686a874517bf46072d1481181f8a8865d25526f6ed9e5fcd55d8d49906bf27cd0f5aefe4f258aa4d63
2018-12-06[doc] developer-notes.md: point out that UniValue deviates from upstreamSjors Provoost
2018-12-02Scripts and tools & Docs: Used #!/usr/bin/env bash instead of obsolete ↵vim88
#!/bin/bash, added linting for .sh files shebang and updated the Developer Notes.
2018-11-29docs: Add more Doxygen information to Developer NotesJon Layton
2018-11-15Improve scripted-diff developer docsCarl Dong
Instead of verifying all scripted-diffs, provide an example that only verifies all scripted-diffs in commits since `origin/master.
2018-10-31Make clear function argument case in dev notesCarl Dong
2018-10-04Fix typosDimitris Apostolou
2018-09-19Merge #14287: tests: Use MakeUnique to construct objects owned by unique_ptrsMarcoFalke
b6718e373e tests: Use MakeUnique to construct objects owned by unique_ptrs (practicalswift) Pull request description: A subset of #14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in https://github.com/bitcoin/bitcoin/pull/14211#issuecomment-423324019. Use `MakeUnique` to construct objects owned by `unique_ptr`s. Rationale: * `MakeUnique` ensures exception safety in complex expressions. * `MakeUnique` gives a more concise statement of the construction. Tree-SHA512: 1228ae6ce7beb178d79142c4e936b728178ccaa8aa35c6d8feeb33d1a667abfdd010c59996a9d833594611e913877ce5794e75953d11d9b1fdbac04aa491d9cf
2018-09-21tests: Use MakeUnique to construct objects owned by unique_ptrspracticalswift
2018-09-13Fix reference to lint-locale-dependence.shHennadii Stepanov
2018-08-07Merge #13717: docs: Link to python style guidelines from developer notesWladimir J. van der Laan
a9e898a4ad547ad344671db2b942b99925f0c732 docs: Link to python style guidelines from developer notes (Mason Simon) Pull request description: Initially I moved the python style guidelines from the functional test README, but some of the python rules are test-specific, and most of the developer notes doc is C++ centric, so just dropping a link seemed better. Tree-SHA512: 9d4d5cc45526319a118595d90fcfad2c9aced22007aa096d8af04ba1b963312822804f4c15b0b227d66af49565034437691b7760e7ff6d1e3f8b10b898906362
2018-08-02trivial: Fixed typos and cleaned up languageWilliam Robinson
2018-07-19docs: Link to python style guidelines from developer notesMason Simon
2018-06-12Merge #13312: docs: Add a note about the source code filename naming conventionMarcoFalke
e56771365b Do not use uppercase characters in source code filenames (practicalswift) 419a1983ca docs: Add a note about the source code filename naming convention (practicalswift) Pull request description: Add a note about the source code filename naming convention. Tree-SHA512: 8d329bd9e19bcd26e74b0862fb0bc2369b46095dbd3e69d34859908632763abd7c3d00ccc44ee059772ad4bae4460c2bcc1c0e22fd9d8876d57e5fcd346cea4b
2018-06-11Merge #13230: Simplify include analysis by enforcing the developer guide's ↵Wladimir J. van der Laan
include syntax 16e3cd380af570fb2f656e0344bab88829a4bcda Clarify include recommendation (practicalswift) 6d10f43738d58bf623975e3124fd5735aac7d3e1 Enforce the use of bracket syntax includes ("#include <foo.h>") (practicalswift) 906bee8e5f474f8718d02e6f1938f20dcfe3d2cc Use bracket syntax includes ("#include <foo.h>") (practicalswift) Pull request description: When analysing includes in the project it is often assumed that the preferred bracket include syntax (`#include <foo.h>`) mentioned in `developer-docs.md` is used consistently. @sipa:s excellent circular dependencies script [`circular-dependencies.py`](https://github.com/sipa/bitcoin/blob/50c69b78011c1bc55885ebfd216db60ed490ebea/contrib/devtools/circular-dependencies.py) (#13228) is an example of a script making this reasonable assumption. This PR enables automatic Travis checking of the include syntax making sure that the bracket syntax includes (`#include <foo.h>`) is used consistently. Tree-SHA512: a414921aabe8e487ebed42f3f1cbd02fecd1add385065c1f2244cd602c31889e61fea5a801507ec501ef9bd309b05d3c999f915cec1c2b44f085bb0d2835c182
2018-06-06Clarify include recommendationpracticalswift
2018-06-06docs: Mention lint-locale-dependence.sh in developer-notes.mdpracticalswift
2018-05-24test: Move linters to test/lint, add readmeMarcoFalke
2018-05-23docs: Add a note about the source code filename naming conventionpracticalswift
2018-04-13Fix inconsistent namespace formatting guidelinesRussell Yanofsky
Suggested formatting for namespaces in the developer guide is currently inconsistent. This commit updates the developer guide and clang-format configuration to consistently put "namespace" and opening/closing braces on the same line. Example: ```c++ namespace boost { namespace signals2 { class connection; } // namespace signals2 } // namespace boost ``` Currently the "Source code organization" section has an example like the one above, but the "Coding style" section example and description put a newline between the opening "namespace foo" and brace (but oddly no newline between closing namespace and brace). Avoiding newlines before namespace opening braces makes nested declarations less verbose and also avoids asymmetry with closing braces. It's also a common style used in other codebases: * https://google.github.io/styleguide/cppguide.html#Namespaces * https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes * https://llvm.org/docs/CodingStandards.html#namespace-indentation
2018-04-10Refine travis check for duplicate includesMarcoFalke
This partially reverts commit c36b720d009f1ab1c3900750e05c1f17412e564d.
2018-04-08Merge #12895: tests: Add note about test suite name uniqueness requirement ↵Wladimir J. van der Laan
to developer notes d1b622b tests: Add check for test suite name uniqueness in lint-tests.sh (practicalswift) dc8067b tests: Add note about uniqueness requirement for test suite names (practicalswift) 3ebfb2d tests: Avoid test suite name collision in wallet crypto_tests (MarcoFalke) Pull request description: * Add documentation: Add note about test suite name uniqueness requirement in developer notes * Add regression test: Update `lint-tests.sh` to make it check also for test suite name uniqueness Context: #12894 (`tests: Avoid test suite name collision in wallet crypto_tests`) Tree-SHA512: 3c8502db069ef3d753f534976a86a997b12bac539e808a7285193bf81c9dd8c1b06821c3dd1bdf870ab87722b02c8aa9574c62ace70c2a1b8091785cb8c9aace
2018-04-07Merge #12906: Avoid `interface` keyword to fix windows gitian buildMarcoFalke
17780d6f35 scripted-diff: Avoid `interface` keyword to fix windows gitian build (Russell Yanofsky) Pull request description: Rename `interface` to `interfaces` Build failure reported by ken2812221 in https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 Tree-SHA512: e02c97c728540f344202c13b036f9f63af23bd25e25ed7a5cfe9e2c2f201a12ff232cc94a93fbe37ef6fb6bf9e036fe62210ba798ecd30de191d09338754a8d0