Commit graph

142 commits

Author SHA1 Message Date
Hennadii Stepanov 0bd1184adf
Remove unused LockAssertion struct 2020-09-19 18:02:42 +03:00
Hennadii Stepanov ea74e10acf
doc: Add best practice for annotating/asserting locks 2020-08-29 20:46:47 +03:00
Wladimir J. van der Laan fd9db45c3e
Merge #19258: doc: improve subtree check instructions
a4a3fc4cd2 doc: improve subtree check instructions (Sjors Provoost)

Pull request description:

  Running `git-subtree-check.sh` requires adding the subtree repository as a remote. I learned that several years ago and then forgot again.

  This PR also improves the error message if the subtree commit can't be found.

ACKs for top commit:
  laanwj:
    ACK a4a3fc4cd2
  fanquake:
    ACK a4a3fc4cd2 - this looks ok.

Tree-SHA512: 959bd923726c172d17f9f97f8a56988bf2df5a94d3131e5152a66150b941394cee9e82fdc6b86e09c0ba91d123a496599f07ca454212168d8d301738394c12c8
2020-07-09 17:52:54 +02:00
Pieter Wuille fab57e2b9b doc: Mention Span in developer-notes.md 2020-06-26 13:53:49 -07:00
Sjors Provoost a4a3fc4cd2
doc: improve subtree check instructions 2020-06-12 13:31:42 +02:00
John Newbery 808ef36b89 [doc] Update thread information in developer docs 2020-04-15 12:02:39 -04:00
Yahia Chiheb 478c11dde3 Correct scripted-diff example link 2020-04-09 19:41:49 +01:00
Russell Yanofsky 3dc27a1524 doc: Add internal interface conventions to developer notes 2020-03-19 15:26:04 -05:00
MarcoFalke 0eebe45cf7
Merge #18208: rpc: Change RPCExamples to bech32
3e32499909 Change example addresses to bech32 (Yusuf Sahin HAMZA)

Pull request description:

  This is a follow-up PR to #18197 that fixes RPCExamples.

  Fixes #18185.

ACKs for top commit:
  MarcoFalke:
    ACK 3e32499909
  jonatack:
    ACK 3e32499

Tree-SHA512: c7a6410ef8b6e169016c2c5eac3e6b9501caabd0e8a0871ec31e56bfc44589f056d3f5cb55b5a13bba36f6c15136c2352f883e30e4dcc0997ffd36b27f9173b9
2020-03-11 12:42:47 -04:00
MarcoFalke 90b3e59caf
Merge #17833: doc: Added running functional tests in valgrind
155a11f897 doc: Added running functional tests in valgrind (Elichai Turkel)

Pull request description:

  Technically the notes only show an "example" of how to run valgrind with the suppression file,
  but now that https://github.com/bitcoin/bitcoin/pull/17633 is merged then maybe this can encourage more people to run also the functional tests in valgrind

Top commit has no ACKs.

Tree-SHA512: b8417249b720d0ed5e10b732648f2e07e8889bfc7aa7e94192d1c049b4b7837971678d30c535f273c227848f1290cf11e14369fd6c1924b734f2e47e2af41401
2020-03-11 10:21:05 -04:00
Yusuf Sahin HAMZA 3e32499909
Change example addresses to bech32 2020-03-01 18:13:35 +03:00
Sebastian Falbesoner 7f1475c711 rpc: update validateaddress RPCExamples to bech32
also contains the following changes:
- rpc: factor out example bech32 address for RPCExamples
- doc: update developer notes wrt RPCExamples addresses
 (mention the EXAMPLE_ADDRESS constant as an example for an invalid bech32
  address suitable for RPCExamples help documentation)
2020-02-13 12:57:37 +01:00
Wladimir J. van der Laan 7cf13a5134 doc: Add crc32c subtree to developer notes 2020-01-28 17:01:48 +01:00
MarcoFalke 218274de7d
Merge #17819: doc: developer notes guideline on RPCExamples addresses
42ec499489 doc: developer notes guideline on RPCExamples addresses (Jon Atack)

Pull request description:

  to make explicit the use of invalid addresses for user safety and to encourage
  the use of bech32 addresses by default. See https://github.com/bitcoin/bitcoin/pull/17578#discussion_r361752570 and https://github.com/bitcoin/bitcoin/pull/17578#discussion_r362564492.

  Fix a typo to appease the linter.

ACKs for top commit:
  promag:
    ACK 42ec499489, no strong opinion as whether this belongs to developer notes or not but why not.
  fjahr:
    ACK 42ec499
  michaelfolkson:
    ACK 42ec499489

Tree-SHA512: 64f90e227d256aa194c4fd48435440bdc233a51213dd4a6ac5b05d04263f729c6b4bb5f3afd3b87719b20cb1b159d5a9673d58a11b72823a4a6a16e8a26ae10e
2020-01-16 15:23:40 -05:00
fanquake ceb789cf3a
Merge #17873: doc: Add to Doxygen documentation guidelines
c902c4c0c6 doc: Add to Doxygen documentation guidelines (Jon Layton)

Pull request description:

  Completes the up-for-grabs PR #16948.

  Changes can be tested here: [doc/developer-notes.md](https://github.com/jonatack/bitcoin/blob/doxygen-developer-notes-improvements/doc/developer-notes.md)

  Co-authored-by: Jon Layton <me@jonl.io>

ACKs for top commit:
  fanquake:
    ACK c902c4c0c6 - quick read, checked the new links work.
  laanwj:
    ACK c902c4c0c6

Tree-SHA512: 3b4cebba23061ad5243b2288c2006bf8527e74c689223825f96a44014875d15b2ab6ff54b8aa342ca657a14cf6ce3ab7d6e25bea5befd91162bc2645a74ddb7e
2020-01-14 10:02:26 +08:00
Jon Layton c902c4c0c6
doc: Add to Doxygen documentation guidelines
and update the table of contents.

Co-authored-by: Jon Layton <me@jonl.io>
2020-01-05 08:05:35 +01:00
Elichai Turkel 155a11f897
doc: Added running functional tests in valgrind 2019-12-30 12:38:08 +02:00
Jon Atack 42ec499489
doc: developer notes guideline on RPCExamples addresses
to make explicit the use of invalid addresses for user safety and to encourage
the use of bech32 addresses by default.

Fix a typo to appease the linter.
2019-12-28 21:45:36 +01:00
hackerrdave a5089f62bd fix directory path for secp256k1 subtree in developer-notes 2019-12-15 19:58:51 -05:00
Jon Atack d94d34f05f
doc: update developer notes wrt unix epoch time 2019-12-13 02:05:05 +01:00
fanquake 33c103e2fe
Merge #17539: doc: Update and improve Developer Notes
794fe91395 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 794fe91395
  practicalswift:
    ACK 794fe91395 -- nice improvements!

Tree-SHA512: 2c5f035b1627f5fac8dc2453199d9e46bd101f86771de567cd95698de3c61cc459444ec1a68710e1d280195e1e40b42d9f40906297d12f12bf37749eca58297d
2019-11-23 11:30:15 -05:00
Hennadii Stepanov 794fe91395
doc: Update and improve Developer Notes 2019-11-20 20:30:39 +02:00
Wladimir J. van der Laan adbe155047 doc: Add some better examples for scripted diff
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-19 15:13:57 +01:00
Wladimir J. van der Laan d35b12107e
Merge #17044: init: Remove auto-import of bootstrap.dat and associated code
104f7de593 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 104f7de593

Tree-SHA512: acac9f285f9785fcbc3afc78118461e45bec2962f90ab90e9f82f3ad28adc90a44f0443b712458ccf486e46d891eb8a67f53e7bee5fa6d89e4387814fe03f117
2019-11-05 19:25:10 +01:00
tryphe 104f7de593 remove old bootstrap relevant code
- only load blockfiles when we have paths
- add release notes for modified bootstrap functionality
- amend documentation on ThreadImport
2019-11-05 16:47:26 +01:00
randymcmillan ac831339cb
doc: Fix some misspellings 2019-11-04 04:22:53 -05:00
Wladimir J. van der Laan 1cf9b35c0d doc: Add developer note on c_str()
Add a note when to use and when not to use `c_str()`.
2019-10-30 10:53:27 +01:00
Hennadii Stepanov c8961c7d9f
doc: Add switch on enum example 2019-10-14 15:46:42 +03:00
Sjors Provoost 14c6a2de1a
[doc] update brew instruction for doxygen 2019-09-19 10:22:20 +02:00
fanquake 085fe76299
Merge #16461: doc: Tidy up shadowing section
9452802480 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 9452802480
  ryanofsky:
    ACK 9452802480
  fanquake:
    ACK 9452802480 - Thanks for following up.

Tree-SHA512: 1fc31355d368225713298da7803e39e99014fbfcd229f2d3b56c082de95ab2965e51c80b172a5abce4646c53f845fa62a6d94d5df714e7835cac07a8ec7d5da7
2019-08-29 08:16:31 +08:00
João Barbosa 9452802480 doc: Tidy up shadowing section 2019-08-28 18:52:53 +01:00
Kristian Kramer b2ea20d330 doc: Fix grammar and punctuation in developer notes
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-08-03 09:30:37 -06:00
Andrew Chow d9becff4e1 scripted-diff: rename CBasicKeyStore to FillableSigningProvider
-BEGIN VERIFY SCRIPT-
git grep -l "CBasicKeyStore" | xargs sed -i -e 's/CBasicKeyStore/FillableSigningProvider/g'
-END VERIFY SCRIPT-
2019-07-09 16:20:18 -04:00
Jon Atack 5a88ea7c67
doc: remove orphaned header in developer notes
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-20 18:15:17 -04:00
Ben Woosley b748bf6f50
Fix spelling errors identified by codespell 1.15.0
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-06-11 17:18:16 +02:00
MarcoFalke faede747b3
doc: Explain how to pass in non-fundamental types into functions 2019-05-01 16:03:20 -04:00
Hennadii Stepanov 201393f932
Align code example with clang-format 2019-04-25 00:10:06 +03:00
John Newbery 947f73ceba [docs] remove reference to signrawtransaction in the developer docs. 2019-03-22 15:18:20 -04:00
marcuswin 10c7642a57
docs: Update Transifex links 2019-03-02 17:42:33 +08:00
MarcoFalke f78cd3dd51
Merge #15348: doc: Add separate productivity notes document
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-18 10:32:52 -05:00
MarcoFalke 5029e94f85
Merge #14519: tests: add utility to easily profile node performance with perf
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-05 17:40:16 -05:00
Carl Dong 5b76c314d6 doc: Add separate productivity notes document
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-02-05 15:18:36 -05:00
John Newbery 65bc38d1c1 [doc] add notes on release notes 2019-01-24 11:14:43 -05:00
James O'Beirne 13782b8ba8 docs: add perf section to developer docs 2019-01-22 08:56:01 -05:00
MarcoFalke fd83c57d6b
Merge #14832: docs: Add more Doxygen information to Developer Notes
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
2019-01-04 11:49:29 +01:00
MarcoFalke 4987cdd16d
Merge #14882: [doc] developer-notes.md: point out that UniValue deviates 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 11:33:39 -05:00
Sjors Provoost a67d71311d
[doc] developer-notes.md: point out that UniValue deviates from upstream 2018-12-06 11:55:26 +01:00
vim88 688f665a5e Scripts and tools & Docs: Used #!/usr/bin/env bash instead of obsolete #!/bin/bash, added linting for .sh files shebang and updated the Developer Notes. 2018-12-02 16:14:21 +02:00
Jon Layton a62e667296 docs: Add more Doxygen information to Developer Notes 2018-11-29 11:58:30 -06:00
Carl Dong 07e286d940 Improve scripted-diff developer docs
Instead of verifying all scripted-diffs, provide an example that only verifies all scripted-diffs in commits since `origin/master.
2018-11-15 15:45:48 -08:00