Skip to content

Commit d23e630

Browse files
committed
add CONTRIBUTING.md
1 parent 8341fae commit d23e630

File tree

2 files changed

+72
-3
lines changed

2 files changed

+72
-3
lines changed

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to bitcoinjs-lib
2+
3+
Firstly in terms of structure, there is no particular concept of "bitcoinjs developers" in the sense of privileged people.
4+
Open source often naturally revolves around meritocracy where longer term contributors gain more trust from the developer community.
5+
6+
However, for practical purpose, there are repository "maintainers" who are responsible for merging pull requests.
7+
8+
We are always accepting of pull requests, but we do adhere to specific standards in regards to coding style, test driven development and commit messages.
9+
10+
11+
## Communication Channels
12+
GitHub is the preferred method of communication between members.
13+
14+
Otherwise, in order of preference:
15+
* bitcoinjs.slack.com
16+
* #bitcoinjs-dev on Freenode IRC
17+
18+
19+
## Workflow
20+
The codebase is maintained using the "contributor workflow" where everyone without exception contributes patch proposals using "pull requests".
21+
This facilitates social contribution, easy testing and peer review.
22+
23+
To contribute a patch, the workflow is as follows:
24+
25+
1. Fork repository
26+
1. Create topic branch
27+
1. Commit patches
28+
1. Push changes to your fork
29+
1. Submit a pull request to https://github.com/bitcoinjs/bitcoinjs-lib
30+
31+
[Commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) and diffs easy to read.
32+
33+
If your pull request is accepted for merging, you may be asked by a maintainer to squash and or [rebase](https://git-scm.com/docs/git-rebase) your commits before it will be merged.
34+
35+
Please refrain from creating several pull requests for the same change.
36+
37+
Patchsets should be focused:
38+
39+
* Adding a feature, or
40+
* Fixing a bug, or
41+
* Refactoring code.
42+
43+
If you combine these, the PR may be rejected or asked to be split up.
44+
45+
The length of time required for peer review is unpredictable and will vary from pull request to pull request.
46+
47+
Refer to the [Git manual](https://git-scm.com/doc) for any information about `git`.
48+
49+
## We adhere to Bitcoin-Core policy
50+
- `bitcoinjs.template.*` functions should follow the script "templates" typically used in the community (and consequently, the bitcoin blockchain).
51+
52+
This is a matter of community consensus, but is probably going to always be closely related to what bitcoin core does by default.
53+
They are quite plainly just pattern matching functions, and should be treated as such.
54+
55+
`bitcoinjs.script.decompile` is consensus bound only, it does not reject based on policy.
56+
`bitcoinjs.script.compile` will adhere to bitcoin-core `IsStandard` policies rules. (eg. minimalpush in https://github.com/bitcoinjs/bitcoinjs-lib/pull/638)
57+
58+
ECDSA `sign` operations will adhere to `IsStandard` policies such as `LOW_S`, but `verify` will not reject them.
59+
60+
For rejecting non-standard `decoding`, you should use external modules to this library.
61+
62+
**TLDR:**
63+
Where "standards compliant" refers to the default policies of bitcoin-core, we adhere to the following:
64+
- Any "creation" event must create standards-compliant data (standards bound)
65+
- Any "validation" event must allow for non-standards compliant data (consensus bound)
66+
67+
For stricter validation, use an external module which we [might have] provided.
68+
69+
70+
## Release Policy
71+
TODO

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ If you have a use case that you feel could be listed here, please [ask for it](h
163163

164164

165165
## Contributing
166-
We are always accepting of pull requests, but we do adhere to specific standards in regards to coding style, test driven development and commit messages.
167-
168-
Please make your best effort to adhere to these when contributing to save on trivial corrections.
166+
See [CONTRIBUTING.md](CONTRIBUTING.md).
169167

170168

171169
### Running the test suite

0 commit comments

Comments
 (0)