@@ -77,20 +77,18 @@ To contribute a patch, the workflow is a as follows:
77
77
2 . Create topic branch
78
78
3 . Commit patches
79
79
80
- In general commits should be atomic and diffs should be easy to read. For this
81
- reason do not mix any formatting fixes or code moves with actual code changes.
80
+ Please keep commits should atomic and diffs easy to read. For this reason
81
+ do not mix any formatting fixes or code moves with actual code changes.
82
82
Further, each commit, individually, should compile and pass tests, in order to
83
83
ensure git bisect and other automated tools function properly.
84
84
85
- When adding a new feature thought must be given to the long term technical debt.
86
- Every new features should be covered by unit tests.
85
+ Please cover every new feature with unit tests.
87
86
88
87
When refactoring, structure your PR to make it easy to review and don't hesitate
89
88
to split it into multiple small, focused PRs.
90
89
91
90
Commits should cover both the issue fixed and the solution's rationale.
92
- These [ guidelines] ( https://chris.beams.io/posts/git-commit/ ) should be kept in
93
- mind.
91
+ Please keep these [ guidelines] ( https://chris.beams.io/posts/git-commit/ ) in mind.
94
92
95
93
To facilitate communication with other contributors, the project is making use
96
94
of GitHub's "assignee" field. First check that no one is assigned and then
@@ -104,12 +102,11 @@ The main library development happens in the `master` branch. This branch must
104
102
always compile without errors (using GitHub CI). All external contributions are
105
103
made within PRs into this branch.
106
104
107
- Prerequisites that a PR must satisfy in order to be considered for merging into
108
- the ` master ` branch:
105
+ Prerequisites that a PR must satisfy for merging into the ` master ` branch:
109
106
* each commit within a PR must compile and pass unit tests with no errors, with
110
107
every feature combination (including compiling the fuzztests) on some
111
108
reasonably recent compiler (this is partially automated with CI, so the rule
112
- is that if GitHub CI is not passing, the commit can't be accepted );
109
+ is that we will not accept commits which do not pass GitHub CI );
113
110
* the tip of any PR branch must also compile and pass tests with no errors on
114
111
MSRV (check [ README.md] on current MSRV requirements) and pass fuzz tests on
115
112
nightly rust;
@@ -131,8 +128,8 @@ above, before submitting the PR to review:
131
128
``` shell script
132
129
BITCOIN_MSRV=1.29.0 ./contrib/ci.sh
133
130
```
134
- Where value in ` BITCOIN_MSRV=1.29.0 ` should be replaced with the current MSRV
135
- from [ README.md] .
131
+ Please replace the value in ` BITCOIN_MSRV=1.29.0 ` with the current MSRV from
132
+ [ README.md] .
136
133
137
134
NB: Please keep in mind that the script above replaces ` Cargo.lock ` file, which
138
135
is necessary to support current MSRV, incompatible with ` stable ` and newer cargo
@@ -142,15 +139,16 @@ versions.
142
139
143
140
Anyone may participate in peer review which is expressed by comments in the pull
144
141
request. Typically, reviewers will review the code for obvious errors, as well as
145
- test out the patch set and opine on the technical merits of the patch. PR should
146
- be reviewed first on the conceptual level before focusing on code style or
142
+ test out the patch set and opine on the technical merits of the patch. Please,
143
+ first review PR on the conceptual level before focusing on code style or
147
144
grammar fixes.
148
145
149
146
### Repository maintainers
150
147
151
- For the pull request to be merged we require (a) that all CI test should pass
152
- and (2) at least two "accepts"/ACKs from the repository maintainers – and no
153
- main reasonable "rejects"/NACKs from anybody who reviewed the code.
148
+ Pull request merge requirements:
149
+ - all CI test should pass,
150
+ - at least two "accepts"/ACKs from the repository maintainers
151
+ - no reasonable "rejects"/NACKs from anybody who reviewed the code.
154
152
155
153
Current list of the project maintainers:
156
154
@@ -165,19 +163,16 @@ Current list of the project maintainers:
165
163
166
164
## Coding conventions
167
165
168
- Overall, this library must reflect Bitcoin Core approach whenever possible.
169
- However, since many of the things in Bitcoin Core are maintained due to
170
- historical reasons and may represent poor design, Rust-idiomatic style is
171
- preferred to "how it looks in Core" if everyone agrees.
166
+ Library reflects Bitcoin Core approach whenever possible.
172
167
173
168
### Formatting
174
169
175
170
The repository currently does not use ` rustfmt ` .
176
171
177
172
New changes may format the code with ` rustfmt ` , but they should not re-format
178
173
any existing code for maintaining diff size small, keeping ` git blame ` intact and
179
- reduce review time. All PRs introducing large blocks of re-formatted code will
180
- not be reviewed .
174
+ reduce review time. Repository maintainers may not review PRs introducing large
175
+ blocks of re-formatted code .
181
176
182
177
You may check the [ discussion on the formatting] ( https://github.com/rust-bitcoin/rust-bitcoin/issues/172 )
183
178
and [ how it is planned to coordinate it with crate refactoring] ( https://github.com/rust-bitcoin/rust-bitcoin/pull/525 )
@@ -194,14 +189,14 @@ the [tracking issue](https://github.com/rust-bitcoin/rust-bitcoin/issues/510).
194
189
### Naming conventions
195
190
196
191
Naming of data structures/enums and their fields/variants must follow names used
197
- in Bitcoin Core, with except to :
198
- - case, which should follow Rust standards (i.e. PascalCase for types and
199
- snake_case for fields and variants)
200
- - ` C ` -prefix, which should be omitted
192
+ in Bitcoin Core, with the following exceptions :
193
+ - the case should follow Rust standards (i.e. PascalCase for types and
194
+ snake_case for fields and variants);
195
+ - omit ` C ` -prefixes.
201
196
202
197
### Unsafe code
203
198
204
- Use of ` unsafe ` code is prohibited unless there is a unanonymous decision among
199
+ Use of ` unsafe ` code is prohibited unless there is a unanimous decision among
205
200
library maintainers on the exclusion from this rule. In such cases there is a
206
201
requirement to test unsafe code with sanitizers including Miri.
207
202
@@ -213,8 +208,8 @@ vulnerabilities helps prevent user loss of funds. If you believe a vulnerability
213
208
may affect other implementations, please disclose this information according to
214
209
the [ security guidelines] ( ./SECURITY.md ) , work on which is currently in progress.
215
210
Before it is completed, feel free to send disclosure to Andrew Poelstra,
216
- [email protected] , encrypted with his public key
, which may be found
217
- at < https://www.wpsoftware.net/andrew/andrew.gpg > .
211
+ [email protected] , encrypted with his public key
from
212
+ < https://www.wpsoftware.net/andrew/andrew.gpg > .
218
213
219
214
220
215
## Testing
@@ -226,7 +221,8 @@ the project to enable fine-grained unit testing is also an ongoing effort.
226
221
227
222
Fuzzing is heavily encouraged: feel free to add related material under ` fuzz/ `
228
223
229
- Mutation testing is planned; any contribution there would be warmly welcomed.
224
+ Mutation testing is planned; any contributions helping with that are highly
225
+ welcome!
230
226
231
227
232
228
## Going further
0 commit comments