Skip to content

Commit a29a192

Browse files
OttoAllmendingerllm-git
andcommitted
feat(docs): update CONTRIBUTING.md and README.md for BitGo fork
Update documentation to reflect this is a BitGo fork with altcoin support. Clarify contribution guidelines, remove upstream-specific information, and add details about Bitcoin Cash support. Issue: BTC-2656 Co-authored-by: llm-git <[email protected]>
1 parent 649205b commit a29a192

File tree

2 files changed

+55
-132
lines changed

2 files changed

+55
-132
lines changed

CONTRIBUTING.md

Lines changed: 27 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
# Contributing to rust-bitcoin
1+
# Contributing to rust-bitcoin (BitGo Fork)
22

33
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
44

5-
The following is a set of guidelines for contributing to Rust Bitcoin
6-
implementation and other Rust Bitcoin-related projects, which are hosted in the
7-
[Rust Bitcoin Community](https://github.com/rust-bitcoin) on GitHub. These are
8-
mostly guidelines, not rules. Use your best judgment, and feel free to propose
9-
changes to this document in a pull request.
5+
This is BitGo's fork of rust-bitcoin that adds support for select altcoins.
6+
The following guidelines are adapted from the upstream project.
107

118
#### Table Of Contents
129

1310
- [General](#general)
14-
- [Communication channels](#communication-channels)
15-
- [Asking questions](#asking-questions)
1611
- [Contribution workflow](#contribution-workflow)
1712
* [Preparing PRs](#preparing-prs)
1813
* [Peer review](#peer-review)
19-
* [Repository maintainers](#repository-maintainers)
2014
- [Coding conventions](#coding-conventions)
2115
* [Naming conventions](#naming-conventions)
2216
* [Upgrading dependencies](#upgrading-dependencies)
@@ -29,41 +23,18 @@ changes to this document in a pull request.
2923

3024
## General
3125

32-
The Rust Bitcoin project operates an open contributor model where anyone is
33-
welcome to contribute towards development in the form of peer review,
34-
documentation, testing and patches.
26+
This fork is maintained by BitGo to add altcoin support that the upstream
27+
rust-bitcoin project does not provide. We welcome contributions that:
3528

36-
Anyone is invited to contribute without regard to technical experience,
37-
"expertise", OSS experience, age, or other concern. However, the development of
38-
standards & reference implementations demands a high-level of rigor, adversarial
39-
thinking, thorough testing and risk-minimization. Any bug may cost users real
40-
money. That being said, we deeply welcome people contributing for the first time
41-
to an open source project or pick up Rust while contributing. Don't be shy,
42-
you'll learn.
29+
- Fix bugs in Bitcoin or altcoin functionality
30+
- Add support for additional altcoins needed by BitGo
31+
- Keep us in sync with upstream rust-bitcoin improvements
4332

33+
When contributing altcoin-specific code, please keep it isolated from core
34+
Bitcoin functionality to minimize merge conflicts with upstream.
4435

45-
## Communication channels
46-
47-
Communication about Rust Bitcoin happens primarily in
48-
[#bitcoin-rust](https://web.libera.chat/?channel=#bitcoin-rust) IRC chat on
49-
[Libera](https://libera.chat/) with the logs available at
50-
<https://gnusha.org/bitcoin-rust/> (starting from Jun 2021 and now on) and
51-
<https://gnusha.org/rust-bitcoin/> (historical archive before Jun 2021).
52-
53-
Discussion about code base improvements happens in GitHub issues and on pull
54-
requests.
55-
56-
Major projects are tracked [here](https://github.com/orgs/rust-bitcoin/projects).
57-
Major milestones are tracked [here](https://github.com/rust-bitcoin/rust-bitcoin/milestones).
58-
59-
60-
## Asking questions
61-
62-
> **Note:** Please don't file an issue to ask a question. You'll get faster
63-
> results by using the resources below.
64-
65-
We have a dedicated developer channel on IRC, #[email protected] where
66-
you may get helpful advice if you have questions.
36+
For upstream rust-bitcoin development, please contribute directly to the
37+
[upstream repository](https://github.com/rust-bitcoin/rust-bitcoin).
6738

6839

6940
## Contribution workflow
@@ -111,8 +82,7 @@ Prerequisites that a PR must satisfy for merging into the `master` branch:
11182
reorder them during review and check that the new tests fail without the new
11283
code);
11384
* contain all inline docs for newly introduced API and pass doc tests;
114-
* be based on the recent `master` tip from the original repository at
115-
<https://github.com/rust-bitcoin/rust-bitcoin>.
85+
* be based on the recent `master` tip from this repository.
11686

11787
NB: reviewers may run more complex test/CI scripts, thus, satisfying all the
11888
requirements above is just a preliminary, but not necessary sufficient step for
@@ -134,53 +104,8 @@ grammar fixes.
134104

135105
### Repository maintainers
136106

137-
Pull request merge requirements:
138-
- all CI test should pass,
139-
- at least two "accepts"/ACKs from the repository maintainers (see "refactor carve-out").
140-
- no reasonable "rejects"/NACKs from anybody who reviewed the code.
141-
142-
Current list of the project maintainers:
143-
144-
- [Andrew Poelstra](https://github.com/apoelstra)
145-
- [Steven Roose](https://github.com/stevenroose)
146-
- [Matt Corallo](https://github.com/TheBlueMatt)
147-
- [Elichai Turkel](https://github.com/elichai)
148-
- [Sanket Kanjalkar](https://github.com/sanket1729)
149-
- [Martin Habovštiak](https://github.com/Kixunil)
150-
- [Riccardo Casatta](https://github.com/RCasatta)
151-
- [Tobin Harding](https://github.com/tcharding)
152-
153-
#### One ACK carve-out
154-
155-
The repository is going through heavy refactoring and "trivial" API redesign
156-
(eg, rename `Foo::empty` to `Foo::new`) as we push towards API stabilization. As
157-
such reviewers are either bored or overloaded with notifications, hence we have
158-
created a carve out to the 2-ACK rule.
159-
160-
We reserve the right to merge PRs with a single ACK [0], at any time, if they match
161-
any of the following conditions:
162-
163-
0. PR has a single ACK and has sat open for at least two weeks with no comments,
164-
questions, or NACKs.
165-
1. PR only touches CI i.e, only changes any of the test scripts and/or
166-
stuff in `.github/workflows`.
167-
2. Non-content changing documentation fixes i.e., grammar/typos, spelling, full
168-
stops, capital letters. Any change with more substance must still get two
169-
ACKs.
170-
3. Code moves that do not change the API e.g., moving error types to a private
171-
submodule and re-exporting them from the original module. Must not include
172-
any code changes except to import paths. Requires absolutely no change to the
173-
public API.
174-
4. PR has previously had two ACKs, had minimal changes, and gets a single ACK
175-
from Andrew. This call is subjective, gives extra privileges, but also
176-
requires extra responsibility/accountability (including running a bunch
177-
of local CI checks before merging) [1].
178-
179-
180-
181-
[0] - Obviously author and ACK'er must not be the same person.
182-
[1] - The aim is to reduce the burden of re-ACK'ing trivial changes and also
183-
alleviate the problem of devs spread around the world in different timezones.
107+
This fork is maintained by the BitGo engineering team. Pull requests should be
108+
reviewed by at least one team member before merging.
184109

185110

186111
## Coding conventions
@@ -417,12 +342,12 @@ We use SPDX license tags, all files should start with
417342
## Security
418343

419344
Security is the primary focus for this library; disclosure of security
420-
vulnerabilities helps prevent user loss of funds. If you believe a vulnerability
421-
may affect other implementations, please disclose this information according to
422-
the [security guidelines](./SECURITY.md), work on which is currently in progress.
423-
Before it is completed, feel free to send disclosure to Andrew Poelstra,
424-
[email protected], encrypted with his public key from
425-
<https://www.wpsoftware.net/andrew/andrew.gpg>.
345+
vulnerabilities helps prevent user loss of funds. If you believe you have found
346+
a security vulnerability, please report it through BitGo's security disclosure
347+
process or contact the BitGo security team directly.
348+
349+
For vulnerabilities that may affect the upstream rust-bitcoin project, please
350+
also follow their [security guidelines](https://github.com/rust-bitcoin/rust-bitcoin/blob/master/SECURITY.md).
426351

427352

428353
## Testing
@@ -438,10 +363,10 @@ the [readme](./README.md) for more information.
438363

439364
## Going further
440365

441-
You may be interested in the guide by Jon Atack on
442-
[How to review Bitcoin Core PRs](https://github.com/jonatack/bitcoin-development/blob/master/how-to-review-bitcoin-core-prs.md)
443-
and [How to make Bitcoin Core PRs](https://github.com/jonatack/bitcoin-development/blob/master/how-to-make-bitcoin-core-prs.md).
444-
While there are differences between the projects in terms of context and
445-
maturity, many of the suggestions offered apply to this project.
366+
For more context on Bitcoin development practices, you may be interested in:
367+
368+
- [Upstream rust-bitcoin repository](https://github.com/rust-bitcoin/rust-bitcoin)
369+
- [How to review Bitcoin Core PRs](https://github.com/jonatack/bitcoin-development/blob/master/how-to-review-bitcoin-core-prs.md)
370+
- [How to make Bitcoin Core PRs](https://github.com/jonatack/bitcoin-development/blob/master/how-to-make-bitcoin-core-prs.md)
446371

447-
Overall, have fun :)
372+
Happy hacking!

README.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
<div align="center">
2-
<h1>Rust Bitcoin</h1>
2+
<h1>Rust Bitcoin (BitGo Fork)</h1>
33

44
<img alt="Rust Bitcoin logo by Hunter Trujillo, see license and source files under /logo" src="./logo/rust-bitcoin.png" width="300" />
55

6-
<p>Library with support for de/serialization, parsing and executing on data-structures
7-
and network messages related to Bitcoin.
6+
<p>BitGo's fork of rust-bitcoin with support for Bitcoin and select altcoins
7+
including Bitcoin Cash (BCH).
88
</p>
99

1010
<p>
11-
<a href="https://crates.io/crates/bitcoin"><img alt="Crate Info" src="https://img.shields.io/crates/v/bitcoin.svg"/></a>
1211
<a href="https://github.com/rust-bitcoin/rust-bitcoin/blob/master/LICENSE"><img alt="CC0 1.0 Universal Licensed" src="https://img.shields.io/badge/license-CC0--1.0-blue.svg"/></a>
13-
<a href="https://github.com/rust-bitcoin/rust-bitcoin/actions?query=workflow%3AContinuous%20integration"><img alt="CI Status" src="https://github.com/rust-bitcoin/rust-bitcoin/workflows/Continuous%20integration/badge.svg"></a>
14-
<a href="https://docs.rs/bitcoin"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bitcoin-green"/></a>
1512
<a href="https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html"><img alt="Rustc Version 1.56.1+" src="https://img.shields.io/badge/rustc-1.56.1%2B-lightgrey.svg"/></a>
16-
<a href="https://gnusha.org/bitcoin-rust/"><img alt="Chat on IRC" src="https://img.shields.io/badge/irc-%23bitcoin--rust%20on%20libera.chat-blue"></a>
17-
<a href="https://github.com/model-checking/kani"><imp alt="kani" src="https://github.com/rust-bitcoin/rust-bitcoin/actions/workflows/kani.yaml/badge.svg"></a>
1813
</p>
1914
</div>
2015

21-
[Documentation](https://docs.rs/bitcoin/)
16+
This is a [BitGo](https://www.bitgo.com/) fork of [rust-bitcoin](https://github.com/rust-bitcoin/rust-bitcoin)
17+
that extends the library with support for select altcoins. The upstream project does not support altcoins
18+
(see their [policy](#policy-on-altcoinsaltchains)), so we maintain this fork for our internal needs.
2219

23-
Supports (or should support)
20+
## Altcoin Support
21+
22+
This fork adds support for:
23+
24+
* **Bitcoin Cash (BCH)**: SIGHASH_FORKID for replay-protected transactions, BCH-compatible PSBT signing
25+
26+
See the `altcoins/` directory for specifications and test vectors.
27+
28+
## Upstream Features
29+
30+
All upstream rust-bitcoin features are supported:
2431

2532
* De/serialization of Bitcoin protocol network messages
2633
* De/serialization of blocks and transactions
2734
* Script de/serialization
2835
* Private keys and address creation, de/serialization and validation (including full BIP32 support)
29-
* PSBT v0 de/serialization and all but the Input Finalizer role. Use [rust-miniscript](https://docs.rs/miniscript/latest/miniscript/psbt/index.html) to finalize.
30-
31-
For JSONRPC interaction with Bitcoin Core, it is recommended to use
32-
[rust-bitcoincore-rpc](https://github.com/rust-bitcoin/rust-bitcoincore-rpc).
36+
* PSBT v0 de/serialization and all but the Input Finalizer role
3337

34-
It is recommended to always use [cargo-crev](https://github.com/crev-dev/cargo-crev) to verify the
35-
trustworthiness of each of your dependencies, including this one.
38+
For upstream documentation, see [docs.rs/bitcoin](https://docs.rs/bitcoin/).
3639

3740
## Known limitations
3841

@@ -59,11 +62,8 @@ and to expand on existing docs would be extremely appreciated.
5962

6063
## Contributing
6164

62-
Contributions are generally welcome. If you intend to make larger changes please discuss them in an
63-
issue before PRing them to avoid duplicate work and architectural mismatches. If you have any
64-
questions or ideas you want to discuss please join us in
65-
[#bitcoin-rust](https://web.libera.chat/?channel=#bitcoin-rust) on
66-
[libera.chat](https://libera.chat).
65+
Contributions are welcome. If you intend to make larger changes please discuss them in an
66+
issue before PRing them to avoid duplicate work and architectural mismatches.
6767

6868
For more information please see `./CONTRIBUTING.md`.
6969

@@ -107,7 +107,7 @@ be usable without `std`. Both can be enabled without conflict.
107107
The library can be built and tested using [`cargo`](https://github.com/rust-lang/cargo/):
108108

109109
```
110-
git clone [email protected]:rust-bitcoin/rust-bitcoin.git
110+
git clone [email protected]:BitGo/rust-bitcoin.git
111111
cd rust-bitcoin
112112
cargo build
113113
```
@@ -170,9 +170,8 @@ We have started using [kani](https://github.com/model-checking/kani), install wi
170170

171171
## Pull Requests
172172

173-
Every PR needs at least two reviews to get merged. During the review phase maintainers and
174-
contributors are likely to leave comments and request changes. Please try to address them, otherwise
175-
your PR might get closed without merging after a longer time of inactivity. If your PR isn't ready
173+
PRs should be reviewed by at least one BitGo team member before merging. During the review phase,
174+
reviewers may leave comments and request changes. Please try to address them. If your PR isn't ready
176175
for review yet please mark it by prefixing the title with `WIP: `.
177176

178177
### CI Pipeline
@@ -197,12 +196,11 @@ Alternatively add symlinks in your `.git/hooks` directory to any of the githooks
197196

198197
## Policy on Altcoins/Altchains
199198

200-
Since the altcoin landscape includes projects which [frequently appear and disappear, and are poorly
201-
designed anyway](https://download.wpsoftware.net/bitcoin/alts.pdf) we do not support any altcoins.
202-
Supporting Bitcoin properly is already difficult enough and we do not want to increase the
203-
maintenance burden and decrease API stability by adding support for other coins.
199+
The upstream rust-bitcoin project does not support altcoins. This BitGo fork adds support for
200+
select altcoins that we need for our business operations. We aim to keep altcoin-specific code
201+
isolated and minimize divergence from upstream to ease future merges.
204202

205-
Our code is public domain so by all means fork it and go wild :)
203+
If you need altcoin support beyond what this fork provides, you're welcome to fork further.
206204

207205

208206
## Release Notes

0 commit comments

Comments
 (0)