You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Example Use Cases and Flows](#example-use-cases-and-flows)
20
-
-[Retrieving a Block Hash](#retrieving-a-block-hash)
21
-
-[Future Enhancements](#future-enhancements)
22
-
-[Conclusion](#conclusion)
23
-
-[Appendices](#appendices)
24
-
-[Glossary of Terms](#glossary-of-terms)
25
-
-[References](#references)
26
-
-[Acknowledgements](#acknowledgements)
27
-
28
7
## Introduction
29
8
30
9
The Bitcoin Core software has historically employed a monolithic architecture. The existing design has integrated functionality like P2P network operations, wallet management, and a GUI into a single executable. While effective, it has limitations in flexibility, security, and scalability. This project introduces changes that transition Bitcoin Core to a more modular architecture. It aims to enhance security, improve usability, and facilitate maintenance and development of the software in the long run.
@@ -136,7 +115,7 @@ The libmultiprocess runtime is designed to place as few constraints as possible
136
115
137
116
### Interface Definition Maintenance
138
117
139
-
The choice to maintain interface definitions and C++ type mappings as `.capnp` files in the [`src/ipc/capnp/`](../../src/ipc/capnp/) was mostly done for convenience, and probably something that could be improved in the future.
118
+
The choice to maintain interface definitions and C++ type mappings as `.capnp` files in the [`src/ipc/capnp/`](../../src/ipc/capnp/) was mostly done for convenience, and is probably something that could be improved in the future.
140
119
141
120
In the current design, class names, method names, and parameter names are duplicated between C++ interfaces in [`src/interfaces/`](../../src/interfaces/) and Cap’n Proto files in [`src/ipc/capnp/`](../../src/ipc/capnp/). While this keeps C++ interface headers simple and free of references to IPC, it is a maintenance burden because it means inconsistencies between C++ declarations and Cap’n Proto declarations will result in compile errors. (Static type checking ensures these are not runtime errors.)
@@ -859,8 +796,7 @@ Common misconceptions are clarified in those sections:
859
796
860
797
-*Rationale*: This avoids memory and resource leaks, and ensures exception safety.
861
798
862
-
C++ data structures
863
-
--------------------
799
+
## C++ data structures
864
800
865
801
- Never use the `std::map []` syntax when reading from a map, but instead use `.find()`.
866
802
@@ -953,8 +889,7 @@ int GetInt(Tabs tab)
953
889
954
890
*Rationale*: The comment documents skipping `default:` label, and it complies with `clang-format` rules. The assertion prevents firing of `-Wreturn-type` warning on some compilers.
955
891
956
-
Strings and formatting
957
-
------------------------
892
+
## Strings and formatting
958
893
959
894
- Use `std::string`, avoid C string manipulation functions.
960
895
@@ -988,8 +923,7 @@ Strings and formatting
988
923
checks. If a use of strings is sensitive to this, take care to check the string for embedded NULL characters first
989
924
and reject it if there are any.
990
925
991
-
Shadowing
992
-
--------------
926
+
## Shadowing
993
927
994
928
Although the shadowing warning (`-Wshadow`) is not enabled by default (it prevents issues arising
995
929
from using a different variable with the same name),
@@ -998,8 +932,7 @@ please name variables so that their names do not shadow variables defined in the
998
932
When using nested cycles, do not name the inner cycle variable the same as in
The `mem` value shows how many files are mmap'ed, and the `fd` value shows you
1159
+
The `mem` value shows how many files are mmap'ed, and the `fd` value shows how
1233
1160
many file descriptors these files are using. You should check that `fd` is a
1234
1161
small number (usually 0 on 64-bit hosts).
1235
1162
@@ -1250,8 +1177,7 @@ would be to revert the upstream fix before applying the updates to Bitcoin's
1250
1177
copy of LevelDB. In general, you should be wary of any upstream changes affecting
1251
1178
what data is returned from LevelDB queries.
1252
1179
1253
-
Scripted diffs
1254
-
--------------
1180
+
## Scripted diffs
1255
1181
1256
1182
For reformatting and refactoring commits where the changes can be easily automated using a bash script, we use
1257
1183
scripted-diff commits. The bash script is included in the commit message and our CI job checks that
@@ -1307,8 +1233,7 @@ To find all previous uses of scripted diffs in the repository, do:
1307
1233
git log --grep="-BEGIN VERIFY SCRIPT-"
1308
1234
```
1309
1235
1310
-
Release notes
1311
-
-------------
1236
+
## Release notes
1312
1237
1313
1238
Release notes should be written for any PR that:
1314
1239
@@ -1321,8 +1246,7 @@ Release notes should be added to a PR-specific release note file at
1321
1246
`/doc/release-notes-<PR number>.md` to avoid conflicts between multiple PRs.
1322
1247
All `release-notes*` files are merged into a single `release-notes-<version>.md` file prior to the release.
1323
1248
1324
-
RPC interface guidelines
1325
-
--------------------------
1249
+
## RPC interface guidelines
1326
1250
1327
1251
A few guidelines for introducing and reviewing new RPC interfaces:
1328
1252
@@ -1430,8 +1354,7 @@ A few guidelines for modifying existing RPC interfaces:
1430
1354
1431
1355
-*Rationale*: Changes in RPC JSON structure can break downstream application compatibility. Implementation of `deprecatedrpc` provides a grace period for downstream applications to migrate. Release notes provide notification to downstream users.
1432
1356
1433
-
Internal interface guidelines
1434
-
-----------------------------
1357
+
## Internal interface guidelines
1435
1358
1436
1359
Internal interfaces between parts of the codebase that are meant to be
0 commit comments