Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,31 @@ name: Bug report
about: Create a report to help us squash bugs!
labels: bug
---

Version(s) of tendermint-rs: <!-- e.g. v0.23.0 -->

### What went wrong?

<!--

Please give us an overview of what went wrong, and what you expected to happen instead.

-->

**Steps to reproduce**
### Steps to reproduce

<!--

Please provide step-by-step instructions as to how to reproduce the problem.

-->

**What's the definition of "done" for this issue?**
### Definition of "done"

<!--

Please describe clear and practical acceptance criteria for this issue. Anyone
in the team should be able to look at this issue and determine whether or not
the bug's been fixed.
the bug's been fixed, and therefore whether or not this issue can be closed.

-->
10 changes: 8 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ name: Enhancement
about: A request for a new feature, or to enhance existing functionality
labels: enhancement
---

Version(s) of tendermint-rs: <!-- e.g. v0.23.0 -->

### Description

<!--

Please describe the enhancement you would like to see implemented in
tendermint-rs. Give as much context as possible.

-->

**What's the definition of "done" for this issue?**
### Definition of "done"

<!--

Please describe clear and practical acceptance criteria for this issue. Anyone
in the team should be able to look at this issue and determine whether or not
the new feature/enhancement has been implemented.
the new feature/enhancement has been implemented, and therefore whether or not
this issue can be closed.

-->
11 changes: 8 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<!--

Thanks for filing a PR! Before hitting the button, please check the following items.
Please note that every non-trivial PR must reference an issue that explains the
changes in the PR.
Thanks for filing a PR!

Before hitting the button, please check the following items. Please note that
every non-trivial PR must reference an issue that explains the changes in the
PR.

Please also make sure you've targeted the correct branch with your PR. See the
contributing guidelines for details.

-->

Expand Down
198 changes: 102 additions & 96 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,81 @@
# Contributing

Thank you for your interest in contributing to tendermint-rs. The goal
of tendermint-rs is to provide a high quality, formally verified implementation of
Tendermint.
Thank you for your interest in contributing to tendermint-rs! The goal of
tendermint-rs is to provide a high quality, formally verified interface to
[Tendermint].

All work on the code base should be motivated by a Github
Issue. Search is a good place start when looking for places to contribute. If you
would like to work on an issue which already exists, please indicate so
by leaving a comment. If you'd like to work on something else, open an Issue to
start the discussion.
This document outlines the best practices for contributing to this repository:

The rest of this document outlines the best practices for contributing to this
repository:

- [Decision Making](#decision-making) - process for agreeing to changes
- [Proposing Changes](#proposing-changes) - process for agreeing to changes
- [Forking](#forking) - fork the repo to make pull requests
- [Changelog](#changelog) - changes must be recorded in the changelog
- [Pull Requests](#pull-requests) - what makes a good pull request
- [Releases](#releases) - how our release process looks

## Decision Making
## Proposing Changes

When contributing to the project, the following process leads to the best chance of
landing the changes in master.
When contributing to the project, adhering to the following guidelines will
dramatically increase the likelihood of changes being accepted quickly.

All new contributions should start with a Github
Issue. The issue helps capture the problem you're trying to solve and allows for
early feedback. Once the issue is created, maintainers may request more detailed
documentation be written in the form of a Request for Comment (RFC) or
Architectural Decision Record
([ADR](https://github.com/informalsystems/tendermint-rs/blob/master/docs/architecture/README.md)).
### Create/locate and assign yourself to an issue

Discussion at the RFC stage will build collective understanding of the dimensions
of the problems and help structure conversations around trade-offs.
1. A good place to start is to search through the [existing
issues](https://github.com/informalsystems/tendermint-rs/issues) for the
problem you're encountering.
2. If no relevant issues exist, submit one describing the *problem* you're
facing, as well as a *definition of done*. A definition of done, which tells
us how to know when the issue can be closed, helps us to scope the problem
and give it definite boundaries. Without a definition of done, issues can
become vague, amorphous changesets that never really come to a satisfactory
conclusion.
3. Once the issue exists, *assign yourself to it*. If there's already someone
assigned to the issue, comment on the issue to ask if you can take it over,
or reach out directly to the current assignee.

When the problem is well understood but the solution leads to large
structural changes to the code base, these changes should be proposed in
the form of an [Architectural Decision Record
(ADR)](./docs/architecture/). The ADR will help build consensus on an
overall strategy to ensure the code base maintains coherence
in the larger context. If you are not comfortable with writing an ADR,
you can open a less-formal issue and the maintainers will help you
turn it into an ADR.
### Small PRs

TODO: ADR registration (eg. in an ADR registration issue)
We consider a PR to be "small" if it's under 100 lines' worth of meaningful code
changes, but we will accommodate PRs of up to about 300 lines. Only in
exceptional circumstances will we review larger PRs.

When the problem as well as proposed solution are well understood,
changes should start with a [draft
pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
against master. The draft signals that work is underway. When the work
is ready for feedback, hitting "Ready for Review" will signal to the
maintainers to take a look.
Keeping PRs small helps reduce maintainers' workloads, increases speed of
getting feedback, and prevents PRs from standing open for long periods of time.
If you need to make bigger changes, it's recommended that you plan out your
changes in smaller, more manageable chunks (e.g. one issue may take several PRs
to address).

Implementation trajectories should aim to proceed where possible as a series
of smaller incremental changes, in the form of small PRs that can be merged
quickly. This helps manage the load for reviewers and reduces the likelihood
that PRs will sit open for longer.
### ADRs

![Contributing
flow](https://github.com/tendermint/tendermint/blob/v0.33.6/docs/imgs/contributing.png)
If your proposed changes are large, complex, or involve substantial changes to
the architecture of one or more components, a maintainer may ask that you first
submit an [ADR](./docs/architecture/README.md) (architecture decision record)
before you start coding your solution.

Each stage of the process is aimed at creating feedback cycles which align contributors and maintainers to make sure:
ADRs are a way for us to keep track of *why* we've made specific architectural
changes over time. This is intended to help newcomers to the codebase understand
our current architecture and how it has evolved, as well as to help us not
repeat past mistakes.

- Contributors don’t waste their time implementing/proposing features which won’t land in `master`.
- Maintainers have the necessary context in order to support and review contributions.
If you need help with developing an ADR, feel free to ask us.

## Forking

If you do not have write access to the repository, your contribution should be
made through a fork on Github. Fork the repository, contribute to your fork,
and make a pull request back upstream.
If you do not have write access to the repository, your contribution should be
made through a fork on GitHub. Fork the repository, contribute to your fork, and
make a pull request back upstream.

When forking, add your fork's URL as a new git remote in your local copy of the
repo. For instance, to create a fork and work on a branch of it:

- Create the fork on GitHub, using the fork button.
- `cd` to the original clone of the repo on your machine
- `git remote rename origin upstream`
- `git remote add origin [email protected]:<location of fork>
- `git remote add origin [email protected]:<location of fork>`

Now `origin` refers to your fork and `upstream` refers to this version.
Now `git push -u origin master` to update the fork, and make pull requests against this repo.

`git push -u origin master` to update the fork, and make pull requests against
this repo.

To pull in updates from the origin repo, run

Expand All @@ -91,76 +86,86 @@ To pull in updates from the origin repo, run

Every non-trivial PR must update the [CHANGELOG.md]. This is accomplished
indirectly by adding entries to the `.changelog` folder in [unclog][unclog]
format. `CHANGELOG.md` will be built by whomever is responsible for performing
a release just prior to release - this is to avoid changelog conflicts prior to
format. `CHANGELOG.md` will be built by whomever is responsible for performing a
release just prior to release - this is to avoid changelog conflicts prior to
releases.

The Changelog is *not* a record of what Pull Requests were merged;
the commit history already shows that. The Changelog is a notice to the user
about how their expectations of the software should be modified.
It is part of the UX of a release and is a *critical* user facing integration point.
The Changelog must be clean, inviting, and readable, with concise, meaningful entries.
Entries must be semantically meaningful to users. If a change takes multiple
Pull Requests to complete, it should likely have only a single entry in the
Changelog describing the net effect to the user.
The Changelog is *not* a record of which pull requests were merged; the commit
history already shows that. The Changelog is a notice to the user about how
their expectations of the software should be modified. It is part of the UX of
a release and is a *critical* user facing integration point. The Changelog must
be clean, inviting, and readable, with concise, meaningful entries. Entries
must be semantically meaningful to users. If a change takes multiple Pull
Requests to complete, it should likely have only a single entry in the Changelog
describing the net effect to the user.

When writing Changelog entries, ensure they are targeting users of the software,
not fellow developers. Developers have much more context and care about more
things than users do. Changelogs are for users.
things than users do. Changelogs are for users.

Changelog structure is modeled after
[Tendermint
Core](https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md)
and
Changelog structure is modeled after [Tendermint
Core](https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md) and
[Hashicorp Consul](http://github.com/hashicorp/consul/tree/master/CHANGELOG.md).
See those changelogs for examples.

Changes for a given release should be split between the five sections: Security, Breaking
Changes, Features, Improvements, Bug Fixes.
Changes for a given release should be split between the five sections: Security,
Breaking Changes, Features, Improvements, Bug Fixes.

Changelog entries should be formatted as follows:

```
- [pkg] \#xxx Some description about the change (@contributor)
- `[pkg]` A description of the change with *users* in mind
([#xxx](https://github.com/informalsystems/tendermint-rs/issues/xxx))
```
Here, `pkg` is the part of the code that changed (typically a
top-level crate, but could be <crate>/<module>), `xxx` is the pull-request number, and `contributor`
is the author/s of the change.

It's also acceptable for `xxx` to refer to the relevent issue number, but pull-request
numbers are preferred.
Note this means pull-requests should be opened first so the changelog can then
be updated with the pull-request's number.
Here, `pkg` is the part of the code that changed, and `xxx` is the issue or
pull request number.

Changelog entries should be ordered alphabetically according to the
`pkg`, and numerically according to the pull-request number.
Changelog entries should be ordered alphabetically according to the `pkg`, and
numerically according to the issue/pull-request number.

Changes with multiple classifications should be doubly included (eg. a bug fix
that is also a breaking change should be recorded under both).

Breaking changes are further subdivided according to the APIs/users they impact.
Any change that effects multiple APIs/users should be recorded multiply - for
instance, a change to some core protocol data structure might need to be
reflected both as breaking the core protocol but also breaking any APIs where core data structures are
exposed.
reflected both as breaking the core protocol but also breaking any APIs where
core data structures are exposed.

## Pull Requests

The master development branch is `master`.
Branch names should be prefixed with the author, eg. `name/feature-x`.
Pull requests are squash-merged into one of the following primary development
branches:

- `master` - targeting compatibility with the [latest official release of
Tendermint](https://github.com/tendermint/tendermint/releases).
- tendermint-rs version-specific branches, e.g. `v0.23.x` - targeting patches to
older versions of tendermint-rs.

Pull requests are made against `master`
and are squash merged into master.
Indicate in your pull request which version of Tendermint/tendermint-rs you are
targeting with your changes. Changes to multiple versions will require separate
PRs. See the [README](./README.md#versioning) for the version support matrix.

Branch names should be prefixed with the author, eg. `name/feature-x`.

PRs must:

- make reference to an issue outlining the context.
- update any relevant documentation and include tests.
- update the [changelog](#changelog) with a description of the change

Pull requests should aim to be small and self contained to facilitate quick
review and merging. Larger change sets should be broken up across multiple PRs.
Commits should be concise but informative, and moderately clean. Commits will be squashed into a
single commit for the PR with all the commit messages.
Commits should be concise but informative, and moderately clean. Commits will be
squashed into a single commit for the PR with all the commit messages.

### Draft PRs

When the problem as well as proposed solution are well understood, changes
should start with a [draft pull
request](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
against master. The draft signals that work is underway. When the work is ready
for feedback, hitting "Ready for Review" will signal to the maintainers to take
a look. Maintainers will not review draft PRs.

## Releases

Expand All @@ -172,8 +177,8 @@ Our release process is as follows:
in this release.
2. Running `unclog build > CHANGELOG.md` to update the changelog.
3. Committing this updated `CHANGELOG.md` file to the repo.
2. Push this to a branch `release/vX.Y.Z` according to the version number of
the anticipated release (e.g. `release/v0.17.0`) and open a **draft PR**.
2. Push this to a branch `release/vX.Y.Z` according to the version number of the
anticipated release (e.g. `release/v0.17.0`) and open a **draft PR**.
3. Bump all relevant versions in the codebase to the new version and push these
changes to the release PR. This includes:
1. All `Cargo.toml` files (making sure dependencies' versions are updated
Expand All @@ -184,13 +189,14 @@ Our release process is as follows:
documentation compiles and seems up-to-date and coherent. Fix any potential
issues here and push them to the release PR.
5. Mark the PR as **Ready for Review** and incorporate feedback on the release.
6. Once approved, run the [`release.sh`] script. Fix any problems that may
arise during this process and push the changes to the release PR.
This step requires the appropriate privileges to push crates to [crates.io].
7. Once all crates have been successfully released, merge the PR to `master`
and tag the repo at the new version (e.g. `v0.17.0`).
6. Once approved, run the [`release.sh`] script. Fix any problems that may arise
during this process and push the changes to the release PR. This step
requires the appropriate privileges to push crates to [crates.io].
7. Once all crates have been successfully released, merge the PR to `master` and
tag the repo at the new version (e.g. `v0.17.0`).

[CHANGELOG.md]: https://github.com/informalsystems/tendermint-rs/blob/master/CHANGELOG.md
[`release.sh`]: https://github.com/informalsystems/tendermint-rs/blob/master/release.sh
[crates.io]: https://crates.io
[unclog]: https://github.com/informalsystems/unclog
[Tendermint]: https://tendermint.com
Loading