aboutsummaryrefslogtreecommitdiff
path: root/doc/developer-notes.md
AgeCommit message (Collapse)Author
2022-09-09scripted-diff: rename CChainState -> ChainstateJames O'Beirne
-BEGIN VERIFY SCRIPT- sed -i 's/CChainState/Chainstate/g' $(git grep -l CChainState ':(exclude)doc/release-notes*') -END VERIFY SCRIPT- Co-authored-by: MacroFake <falke.marco@gmail.com>
2022-08-20Update debug logging section in the developer notesJon Atack
2022-07-11doc: update the URLs to thread functions in developer-notesVasil Dimov
ThreadMapPort() does not appear on doxygen.bitcoincore.org because it is inside `#ifdef`.
2022-07-07doc: list the I2P accept thread in developer-notesVasil Dimov
2022-06-15refactor: cleanups post unsubtree'ing univaluefanquake
Mostly changes to remove src/univalue exceptions from the various linters, and the required code changes to make them happy. As well as minor doc changes.
2022-06-10Merge bitcoin/bitcoin#24931: Strengthen thread safety assertionsMacroFake
ce893c0497fc9b8ab9752153dfcc77c9f427545e doc: Update developer notes (Anthony Towns) d2852917eecad6ab422a7b2c9892d351a7f0cc96 sync.h: Imply negative assertions when calling LOCK (Anthony Towns) bba87c0553780eacf0317fbfec7330ea27aa02f8 scripted-diff: Convert global Mutexes to GlobalMutexes (Anthony Towns) a559509a0b8cade27199740212d7b589f71a0e3b sync.h: Add GlobalMutex type (Anthony Towns) be6aa72f9f8d50b6b5b19b319a74abe7ab4099ff qt/clientmodel: thread safety annotation for m_cached_tip_mutex (Anthony Towns) f24bd45b37e1b2d19e5a053dbfefa30306c1d41a net_processing: thread safety annotation for m_tx_relay_mutex (Anthony Towns) Pull request description: This changes `LOCK(mutex)` for non-global, non-recursive mutexes to be annotated with the negative capability for the mutex it refers to, to prevent . clang applies negative capabilities recursively, so this helps avoid forgetting to annotate functions. This can't reasonably be used for globals, because clang would require every function to be annotated with `EXCLUSIVE_LOCKS_REQUIRED(!g_mutex)` for each global mutex; so this introduces a trivial `GlobalMutex` subclass of `Mutex`, and reduces the annotations for both `GlobalMutex` to `LOCKS_EXCLUDED` which only catches trivial errors (eg (`LOCK(x); LOCK(x);`). ACKs for top commit: MarcoFalke: review ACK ce893c0497fc9b8ab9752153dfcc77c9f427545e 🐦 hebasto: ACK ce893c0497fc9b8ab9752153dfcc77c9f427545e Tree-SHA512: 5c35e8c7677ce3d994a7e3774f4344adad496223a51b3a1d1d3b5f20684b2e1d5cff688eb3fbc8d33e1b9940dfa76e515f9434e21de6f3ce3c935e29a319f529
2022-06-07Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section ↵Jon Atack
in dev notes that was added in 2015 by commit b8c06ef40 in PR 7003, as that potential issue would now be caught by the test/lint/lint-format-strings.py script run by the CI
2022-06-01Merge bitcoin/bitcoin#24416: doc: Avoid ADL for function callslaanwj
52a797bfe5ced4329f2272be417c35730ec8839f doc: Avoid ADL for function calls (Hennadii Stepanov) Pull request description: It happened two times recently, when [ADL](https://en.cppreference.com/w/cpp/language/adl) popped up unexpectedly and brought some confusion: - https://github.com/bitcoin/bitcoin/pull/24338/files#r805989994 > Any idea why this even compiles? - https://www.erisian.com.au/bitcoin-core-dev/log-2022-02-18.html#l-51: > 2022-02-18T03:24:14 \<dongcarl\> Does anyone know why this compiles? https://github.com/dongcarl/bitcoin/commit/6d3d2caa3751f968f72d19fa84f001472fb26749 > 2022-02-18T03:24:14 \<dongcarl\> GetUTXOStatsWithHasher and MakeUTXOHasher are both in the `kernel::` namespace and I never added a `using` declaration on top... > 2022-02-18T03:25:53 \<sipa\> https://en.cppreference.com/w/cpp/language/adl ? Let's document our intention to avoid similar cases in the future. ACKs for top commit: laanwj: Anyhow, ACK 52a797bfe5ced4329f2272be417c35730ec8839f, there is no need to hold merge up on this, documenting it is a step forward. Tree-SHA512: f52688b5d8f6130302185206ec6ea4731b099a75294ea2d477901a52d6d58473e3427e658aea408c140c2824c37a0399ec7376aded2a91197895ea52d51f0018
2022-05-21doc: Update developer notesAnthony Towns
2022-05-20doc: update developer notes wrt --enable-debug and DEBUG_LOCKCONTENTIONJon Atack
2022-05-10Add clang lifetimebound section to developer notesJon Atack
2022-05-10Add C++ functions and methods section to developer notesJon Atack
Credit for some parts to the Google C++ Style Guide "Inputs and Outputs" section at https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-05-09Link in developer notes style to internal interface exceptionJon Atack
2022-05-09Prefer Python for scripts in developer notesJon Atack
along with a few miscellaneous touch-ups.
2022-05-06Remove obsolete BDB ENABLE_WALLET section in developer notesJon Atack
2022-04-08Update RPC argument and field naming guideline in developer notesJon Atack
Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-04-05Add DEBUG_LOCKCONTENTION documentation to the developer notesJon Atack
2022-03-25doc: Document clang-tidy in dev notesMarcoFalke
2022-02-22doc: Avoid ADL for function callsHennadii Stepanov
2022-02-21Replace "can not" with "cannot" in docs, user messages, and testsJon Atack
2021-11-15Improve fs::PathToString documentationRussell Yanofsky
2021-10-21Add minisketch dependencyGleb Naumenko
2021-10-11Merge bitcoin/bitcoin#22409: configure: keep relative paths in debug infofanquake
0bc666b053b8f4883c3f5de43959e2bbd91b95c5 doc: add info for debugging with relative paths (S3RK) a8b515c317f0b5560f62c72a8f4eb6560d8f1c75 configure: keep relative paths in debug info (S3RK) Pull request description: This is a follow-up for #20353 that fixes #21885 It also adds a small section to assist debugging without absolute paths in debug info. ACKs for top commit: kallewoof: Tested ACK 0bc666b053b8f4883c3f5de43959e2bbd91b95c5 Zero-1729: Light crACK 0bc666b053b8f4883c3f5de43959e2bbd91b95c5 Tree-SHA512: d4b75183c3d3a0f59fe786841fb230581de87f6fe04cf7224e4b89c520d45513ba729d4ad8c0e62dd1dbaaa7a25741f04d036bc047f92842e76c9cc31ea47fb2
2021-09-29doc: update developer docs for subtree renamingfanquake
2021-09-16Enable TLS in links in documentationJeremy Rand
2021-08-21doc: add info for debugging with relative pathsS3RK
2021-07-13doc: update enum naming in developer notesJon Atack
- Update the enumerator examples to snake_case per CPP Core Guidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps - Clarify that in this project enumerators may be snake_case, PascalCase, or ALL_CAPS, and to use what is seems appropriate.
2021-06-30Merge bitcoin/bitcoin#18568: doc: Clarify developer notes about constant namingfanquake
05f9770c1fa64bd9730cd6e18ec333e0801c00d6 doc: Clarify developer notes about constant naming (Russell Yanofsky) Pull request description: I'm pretty sure developer notes were intended to say constants should be upper case and variables should be lower case, but right now they are ambiguous about whether to write: ```c++ extern const int SYMBOL; ``` or: ```c++ extern const int g_symbol; ``` First convention above is better than the second convention because it tells you without having to look anything up that the value of `SYMBOL` won't change at runtime. Also I haven't seen other c++ projects using the second convention. ACKs for top commit: MarcoFalke: cr ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6 practicalswift: ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6 jarolrod: ACK 05f9770c1fa64bd9730cd6e18ec333e0801c00d6 🥃 Tree-SHA512: 766d0e25d9db818d45df4ad6386987014f2053584cbced4b755ceef8bda6b7e2cfeb34eb8516423bd03b140faaf577614d5e3be2799f7eed0eb439187ab85323
2021-06-10doc: remove obsolete `okSafeMode` RPC guideline from developer notesSebastian Falbesoner
Since the flag has been removed from the RPC command table in commit ec6902d0ea2bbe75179684fc71849d5e34647a14 (PR #11179), this guideline is not relevant anymore and can be removed.
2021-04-05refactor: Remove negative lock annotations from globalsMarcoFalke
2021-03-11doc: update developer notes for removal of MakeUniquefanquake
2021-02-17[doc] Add a note about where lock annotations should go.Amiti Uttarwar
2021-01-22[docs] Update developer notes to discourage very long linesJohn Newbery
2021-01-04doc: Use https URLs where possibleSawyer Billings
2021-01-02doc: update developer notes for signetJon Atack
2020-12-18doc: Drop mentions of Travis CI as it is no longer usedHennadii Stepanov
2020-11-24util: Add Assume() identity functionMarcoFalke
2020-09-19Remove unused LockAssertion structHennadii Stepanov
2020-08-29doc: Add best practice for annotating/asserting locksHennadii Stepanov
2020-07-09Merge #19258: doc: improve subtree check instructionsWladimir J. van der Laan
a4a3fc4cd2e6f53cdffcc2962fd152a4e40c7413 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 a4a3fc4cd2e6f53cdffcc2962fd152a4e40c7413 fanquake: ACK a4a3fc4cd2e6f53cdffcc2962fd152a4e40c7413 - this looks ok. Tree-SHA512: 959bd923726c172d17f9f97f8a56988bf2df5a94d3131e5152a66150b941394cee9e82fdc6b86e09c0ba91d123a496599f07ca454212168d8d301738394c12c8
2020-06-26doc: Mention Span in developer-notes.mdPieter Wuille
2020-06-12doc: improve subtree check instructionsSjors Provoost
2020-04-15[doc] Update thread information in developer docsJohn Newbery
2020-04-09Correct scripted-diff example linkYahia Chiheb
2020-04-08doc: Clarify developer notes about constant namingRussell Yanofsky
I'm pretty sure developer notes were intended to say constants should be upper case and variables should be lower case, but right now they are ambiguous about whether to write: ```c++ // foo.h extern const int SYMBOL; // foo.cpp const int SYMBOL = 1; ``` or: ```c++ // foo.h extern const int g_symbol; // foo.cpp const int g_symbol = 1; ``` First convention above is better than the second convention because it tells you without having to look anything up that the value of `SYMBOL` will never change at runtime. Also I've never seen any c++ project anywhere using the second convention
2020-03-19doc: Add internal interface conventions to developer notesRussell Yanofsky
2020-03-11Merge #18208: rpc: Change RPCExamples to bech32MarcoFalke
3e32499909ca8127baaa9b40ad113b25ee151bbd 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 3e32499909ca8127baaa9b40ad113b25ee151bbd jonatack: ACK 3e32499 Tree-SHA512: c7a6410ef8b6e169016c2c5eac3e6b9501caabd0e8a0871ec31e56bfc44589f056d3f5cb55b5a13bba36f6c15136c2352f883e30e4dcc0997ffd36b27f9173b9
2020-03-11Merge #17833: doc: Added running functional tests in valgrindMarcoFalke
155a11f897c7dfdc891587cc7ddd7c153cbc2a8f 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-01Change example addresses to bech32Yusuf Sahin HAMZA
2020-02-13rpc: update validateaddress RPCExamples to bech32Sebastian Falbesoner
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)