Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Implement repo common structure and update contributing guidelines
Browse files Browse the repository at this point in the history
Move the 'one shot' prerelease build functionality from `develop` to `prerelease` to avoid confusion.

Signed-off-by: Silas Davis <[email protected]>
  • Loading branch information
Silas Davis committed Mar 16, 2021
1 parent 87144bf commit 2a80412
Show file tree
Hide file tree
Showing 14 changed files with 229 additions and 73 deletions.
28 changes: 15 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Contributing to `burrow`:
Forked from Docker's [contributing guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md)
Forked from Docker's [contributing guidelines](https://github.com/docker/docker/blob/main/CONTRIBUTING.md)

## Developer Certificate of Origin

Please always include "signed-off-by" in your commit message and note this constitutes a developer certification you are contributing a patch under Apache 2.0. Please find a verbatim copy of the Developer Certificate of Origin in this repository [here](.github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md) or on [developercertificate.org](https://developercertificate.org/).

## Branches and releases

All development happens on 'main'. Any other branches should be considered temporary and should have a corresponding pull request where they are the source to help keep track of them. Such branches can be marked WIP/draft.

There is a special branch called 'prereleae' that is solely used to trigger a build of the JS library and docker images with a special prerelease tag based on the commit hash. This can be triggered by force pushing to 'prerelease'. If you would like a prerelease build please ask a maintainer (via an issue or on https://chat.hyperledger.org/channel/burrow) to force push for you. Since this branch may be overwritten at any time it should never be the only home for durable changes.

Commits tagged with a 'v'-prefixed semver tag like `v0.11.1` are official releases and will trigger builds of binaries, JS library, and docker images in CI. We will try to make these regularly but will sometimes batch up a few changes and dependency upgrades (particularly Tendermint).

## Bug Reporting

A great way to contribute to the project is to send a detailed report when you encounter an issue. We always appreciate a well-written, thorough bug report, and will thank you for it!
Expand All @@ -17,15 +25,15 @@ Our [ISSUE_TEMPLATE.md](ISSUE_TEMPLATE.md) will autopopulate the new issue.

## Contribution Tips and Guidelines

### Pull requests are always welcome (to `develop` rather than `master`).
### Pull requests are always welcome (always based on the `main` branch)

Not sure if that typo is worth a pull request? Found a bug and know how to fix it? Do it! We will appreciate it. Any significant improvement should be documented as a GitHub issue or discussed in [The Marmot Den](https://slack.monax.io) Slack community prior to beginning.
Not sure if that typo is worth a pull request? Found a bug and know how to fix it? Do it! We will appreciate it.

We are always thrilled to receive pull requests (and bug reports!) and we do our best to process them quickly.

## Conventions

Fork the repository and make changes on your fork in a feature branch (branched from develop), create an issue outlining your feature or a bug, or use an open one.
Fork the repository and make changes on your fork in a feature branch, create an issue outlining your feature or a bug, or use an open one.

If it's a bug fix branch, name it something-XXXX where XXXX is the number of the issue.
If it's a feature branch, create an enhancement issue to announce your intentions, and name it something-XXXX where XXXX is the number of the issue.
Expand All @@ -42,22 +50,16 @@ Commit messages must start with a short summary (max. 50 chars) written in the i

Code review comments may be added to your pull request. Discuss, then make the suggested modifications and push additional commits to your feature branch.

Pull requests must be cleanly rebased on top of develop without multiple branches mixed into the PR.
Pull requests must be cleanly rebased on top of main without multiple branches mixed into the PR.

*Git tip:* If your PR no longer merges cleanly, use `git rebase develop` in your feature branch to update your pull request rather than merge develop.

Before you make a pull request, squash your commits into logical units of work using `git rebase -i` and `git push -f`. A logical unit of work is a consistent set of patches that should be reviewed together: for example, upgrading the version of a vendored dependency and taking advantage of its now available new feature constitute two separate units of work. Implementing a new function and calling it in another file constitute a single logical unit of work. The very high majority of submissions should have a single commit, so if in doubt: squash down to one.
*Git tip:* If your PR no longer merges cleanly, use `git rebase main` in your feature branch to update your pull request rather than merge main.

After every commit, make sure the test suite passes. Include documentation changes in the same pull request so that a revert would remove all traces of the feature or fix.

### Merge approval

We use LGTM (Looks Good To Me) in commands on the code review to indicate acceptance.

## Errors and Log Messages Style

TODO

## Coding Style

Unless explicitly stated, we follow all coding guidelines from the Go community. While some of these standards may seem arbitrary, they somehow seem to result in a solid, consistent codebase.
Expand All @@ -68,7 +70,7 @@ It is possible that the code base does not currently comply with these guideline
* All code should follow the guidelines covered in [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments).
* Comment the code. Tell us the why, the history and the context.
* Document all declarations and methods, even private ones. Declare expectations, caveats and anything else that may be important. If a type gets exported, having the comments already there will ensure it's ready.
* Variable name length should be proportional to it's context and no longer. noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo. In practice, short methods will have short variable names and globals will have longer names.
* Variable name length should be proportional to its context and no longer. noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo. In practice, short methods will have short variable names and globals will have longer names.
* No underscores in package names. If you need a compound name, step back, and re-examine why you need a compound name. If you still think you need a compound name, lose the underscore.
* No utils or helpers packages. If a function is not general enough to warrant its own package, it has not been written generally enough to be a part of a `util` package. Just leave it unexported and well-documented.
* All tests should run with `go test` and outside tooling should not be required. No, we don't need another unit testing framework. Assertion packages are acceptable if they provide real incremental value.
4 changes: 2 additions & 2 deletions .github/workflows/master.yaml → .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: master
name: main
on:
push:
branches:
- master
- main

jobs:
cover:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: develop
# Force push to 'prerelease' to get a JS/docker build for testing etc
name: prerelease
on:
push:
branches:
- develop
- prerelease
tags-ignore:
- 'v*'

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
unit:
Expand All @@ -17,7 +17,7 @@ jobs:
- run: git fetch --unshallow --prune
- run: make test
- run: make build
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@main
with:
name: burrow
path: bin
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
needs: unit
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
- uses: actions/download-artifact@main
with:
name: burrow
path: bin
Expand All @@ -70,7 +70,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/download-artifact@master
- uses: actions/download-artifact@main
with:
name: burrow
path: bin
Expand All @@ -85,7 +85,7 @@ jobs:
needs: unit
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
- uses: actions/download-artifact@main
with:
name: burrow
path: bin
Expand All @@ -100,7 +100,7 @@ jobs:
needs: unit
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
- uses: actions/download-artifact@main
with:
name: burrow
path: bin
Expand All @@ -118,7 +118,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/download-artifact@master
- uses: actions/download-artifact@main
with:
name: burrow
path: bin
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@

### Added
- [EVM] Implemented [CREATE2 opcode](https://eips.ethereum.org/EIPS/eip-1014)
- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1052.md)
- [EVM] Implemented [EXTCODEHASH opcode](https://github.com/ethereum/EIPs/blob/main/EIPS/eip-1052.md)
- [Accounts] Add account GetStats to query endpoint
- [Config] Expose AddrBookStrict from Tendermint
- [Deploy] burrow deploy now prints events generated during transactions
Expand Down
2 changes: 1 addition & 1 deletion docs/ADRs/adr-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ discussions-to: https://chat.hyperledger.org/channel/burrow-contributors
status: Draft
type: Meta
author: The Burrow's marmots and others
https://github.com/hyperledger/burrow/ADRs/blob/master/ADRs/adr-1.md
https://github.com/hyperledger/burrow/ADRs/blob/main/ADRs/adr-1.md
created: 2018-10-09
---

Expand Down
12 changes: 9 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# [Hyperledger Burrow](https://hyperledger.github.io/burrow)

[![CI](https://github.com/hyperledger/burrow/workflows/master/badge.svg)](https://launch-editor.github.com/actions?workflowID=master&event=push&nwo=hyperledger%2Fburrow)
[![CI](https://github.com/hyperledger/burrow/workflows/main/badge.svg)](https://launch-editor.github.com/actions?workflowID=main&event=push&nwo=hyperledger%2Fburrow)
[![version](https://img.shields.io/github/tag/hyperledger/burrow.svg)](https://github.com/hyperledger/burrow/releases/latest)
[![GoDoc](https://godoc.org/github.com/burrow?status.png)](https://godoc.org/github.com/hyperledger/burrow)
[![license](https://img.shields.io/github/license/hyperledger/burrow.svg)](../LICENSE.md)
[![LoC](https://tokei.rs/b1/github/hyperledger/burrow?category=lines)](https://github.com/hyperledger/burrow)
[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow)
[![codecov](https://codecov.io/gh/hyperledger/burrow/branch/main/graph/badge.svg)](https://codecov.io/gh/hyperledger/burrow)

Hyperledger Burrow is a permissioned Ethereum smart-contract blockchain node. It executes Ethereum EVM and WASM smart contract code (usually written in [Solidity](https://solidity.readthedocs.io)) on a permissioned virtual machine. Burrow provides transaction finality and high transaction throughput on a proof-of-stake [Tendermint](https://tendermint.com) consensus engine.

Expand Down Expand Up @@ -43,7 +43,7 @@ Watch the [Boring into Burrow](https://www.youtube.com/watch?v=OpbjYaGAP4k) talk

## JavaScript Client

There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/master/js)
There is a [JavaScript API](https://github.com/hyperledger/burrow/tree/main/js)

## Project Roadmap

Expand All @@ -52,6 +52,12 @@ Project information generally updated on a quarterly basis can be found on the [
## Documentation
Burrow getting started documentation is available on the [documentation site](https://hyperledger.github.io/burrow) (source markdown files can be found in [docs]()) and programmatic API in [GoDocs](https://godoc.org/github.com/hyperledger/burrow).

## Releases

- **Burrow binaries**: https://github.com/hyperledger/burrow/releases
- **Burrow.js**: https://www.npmjs.com/package/@hyperledger/burrow
- **Docker**: https://hub.docker.com/repository/docker/hyperledger/burrow

## Contribute

We welcome any and all contributions. Read the [contributing file](../.github/CONTRIBUTING.md) for more information on making your first Pull Request to Burrow!
Expand Down
4 changes: 2 additions & 2 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The Burrow deploy toolkit can do a number of things:
* create proposals or vote for a proposal

burrow deploy needs a script to its commands. This script format bares some similarity to [ansible](https://www.ansible.com/). It
is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/master/deploy/def/job.go).
The different job types are [defined here](https://github.com/hyperledger/burrow/blob/master/deploy/def/jobs.go).
is in yaml format. The top level structure is an array of [jobs](https://github.com/hyperledger/burrow/blob/main/deploy/def/job.go).
The different job types are [defined here](https://github.com/hyperledger/burrow/blob/main/deploy/def/jobs.go).

You can invoke burrow from the command line:

Expand Down
8 changes: 4 additions & 4 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
- [protoc](http://google.github.io/proto-lens/installing-protoc.html) (libprotoc 3.7.1)

Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/master/.github/CONTRIBUTING.md).
Please also refer to our [contributing guidelines](https://github.com/hyperledger/burrow/blob/main/.github/CONTRIBUTING.md).

## Building

Expand All @@ -25,9 +25,9 @@ Install protoc and run `make protobuf_deps`. If you make any changes to the prot
## Releasing

* First of all make sure everyone is happy with doing a release now.
* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to master.
* On the master branch, run `make ready_for_pull_request`. Check for any modified files.
* Once master is update to date, switch to master locally run `make tag_release`. This will push the tag which kicks of the release build.
* Update project/history.go with the latest releases notes and version. Run `make CHANGELOG.md NOTES.md` and make sure this is merged to main.
* On the main branch, run `make ready_for_pull_request`. Check for any modified files.
* Once main is update to date, switch to main locally run `make tag_release`. This will push the tag which kicks of the release build.
* Optionally send out email on hyperledger burrow mailinglist. Agreements network email should be sent out automatically.

## Proposals
Expand Down
Loading

0 comments on commit 2a80412

Please sign in to comment.