forked from hyperledger-archives/burrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hyperledger-archives#519 from eris-ltd/release-0.16
Release eris-db v0.16.0
- Loading branch information
Showing
227 changed files
with
8,933 additions
and
4,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Contributing to `eris-db`: | ||
Forked from Docker's [contributing guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) | ||
|
||
## 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! | ||
|
||
Check that the issue doesn't already exist before submitting an issue. If you find a match, you can use the "subscribe" button to get notified on updates. Add a :+1: if you've also encountered this issue. If you have ways to reproduce the issue or have additional information that may help resolving the issue, please leave a comment. | ||
|
||
Also include the steps required to reproduce the problem if possible and applicable. This information will help us review and fix your issue faster. When sending lengthy log-files, post them as a gist (https://gist.github.com). Don't forget to remove sensitive data from your log files before posting (you can replace those parts with "REDACTED"). | ||
|
||
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`). | ||
|
||
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. | ||
|
||
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. | ||
|
||
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. | ||
|
||
Submit unit tests for your changes. Go has a great test framework built in; use it! Take a look at existing tests for inspiration. Run the full test suite on your branch before submitting a pull request. | ||
|
||
Update the documentation when creating or modifying features. Test your documentation changes for clarity, concision, and correctness, as well as a clean documentation build. | ||
|
||
Write clean code. Universally formatted code promotes ease of writing, reading, and maintenance. Always run `gofmt -s -w file.go` on each changed file before committing your changes. Most editors have plug-ins that do this automatically. | ||
|
||
Pull request descriptions should be as clear as possible and include a reference to all the issues that they address. | ||
|
||
Commit messages must start with a short summary (max. 50 chars) written in the imperative, followed by an optional, more detailed explanatory text which is separated from the summary by an empty line. | ||
|
||
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. | ||
|
||
*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. | ||
|
||
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. | ||
|
||
It is possible that the code base does not currently comply with these guidelines. We are not looking for a massive PR that fixes this, since that goes against the spirit of the guidelines. All new contributions should make a best effort to clean up and make the code base better than they left it. Obviously, apply your best judgement. Remember, the goal here is to make the code base easier for humans to navigate and understand. Always keep that in mind when nudging others to comply. | ||
|
||
* All code should be formatted with `gofmt -s`. | ||
* 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. | ||
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Please include in your bug report: | ||
|
||
- [ ] `eris-db version` (docker image tag or branch if built from source) | ||
- [ ] `eris version` (if applicable) | ||
- [ ] `go version` (if applicable) | ||
- [ ] `docker version` (if applicable) | ||
- [ ] operating system details (osx/windows/linux) | ||
- [ ] what you expected to happen | ||
- [ ] what actually happened | ||
- [ ] steps to reproduction | ||
|
||
If issue is a feature request, tell us why this feature is useful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# do not vendor in dependencies | ||
vendor | ||
|
||
# build target | ||
target | ||
|
||
# Temporary / cached | ||
*.swp | ||
debug | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Eris-db changelog | ||
## v0.16.0 | ||
This is a consolidation release that fixes various bugs and improves elements | ||
of the architecture across the Eris Platform to support a quicker release | ||
cadence. | ||
|
||
#### Features and improvements (among others) | ||
- [pull-510](https://github.com/eris-ltd/eris-db/pull/510) upgrade consensus engine to Tendermint v0.8.0 | ||
- [pull-507](https://github.com/eris-ltd/eris-db/pull/507) use sha3 for snative addresses for future-proofing | ||
- [pull-506](https://github.com/eris-ltd/eris-db/pull/506) alignment and consolidation for genesis and config between tooling and chains | ||
- [pull-504](https://github.com/eris-ltd/eris-db/pull/504) relicense eris-db to Apache 2.0 | ||
- [pull-500](https://github.com/eris-ltd/eris-db/pull/500) introduce more strongly types secure native contracts | ||
- [pull-499](https://github.com/eris-ltd/eris-db/pull/499) introduce word256 and remove dependency on tendermint/go-common | ||
- [pull-493](https://github.com/eris-ltd/eris-db/pull/493) re-introduce GenesisTime in GenesisDoc | ||
|
||
- Logging system overhauled based on the central logging interface of go-kit log. Configuration lacking in this release but should be in 0.16.1. Allows powerful routing, filtering, and output options for better operations and increasing the observability of an eris blockchain. More to follow. | ||
- Genesis making is improved and moved into eris-db. | ||
- Config templating is moved into eris-db for better synchronisation of server config between the consumer of it (eris-db) and the producers of it (eris cli and other tools). | ||
- Some documentation updates in code and in specs. | ||
- [pull-462](https://github.com/eris-ltd/eris-db/pull/499) Makefile added to capture conventions around building and testing and replicate them across different environments such as continuous integration systems. | ||
|
||
#### Bugfixes (among others) | ||
- [pull-516](https://github.com/eris-ltd/eris-db/pull/516) Organize and add unit tests for rpc/v0 | ||
- [pull-453](https://github.com/eris-ltd/eris-db/pull/453) Fix deserialisation for BroadcastTx on rpc/v0 | ||
- [pull-476](https://github.com/eris-ltd/eris-db/pull/476) patch EXTCODESIZE for native contracts as solc ^v0.4 performs a safety check for non-zero contract code | ||
- [pull-468](https://github.com/eris-ltd/eris-db/pull/468) correct specifications for params on unsubscribe on rpc/tendermint | ||
- [pull-465](https://github.com/eris-ltd/eris-db/pull/465) fix divergence from JSON-RPC spec for Response object | ||
- [pull-366](https://github.com/eris-ltd/eris-db/pull/366) correction to circle ci script | ||
- [pull-379](https://github.com/eris-ltd/eris-db/pull/379) more descriptive error message for eris-client | ||
|
||
## v0.12.0 | ||
This release marks the start of Eris-DB as the full permissioned blockchain node | ||
of the Eris platform with the Tendermint permissioned consensus engine. | ||
This involved significant refactoring of almost all parts of the code, | ||
but provides a solid foundation to build the next generation of advanced | ||
permissioned smart contract blockchains. | ||
|
||
Many changes are under the hood but here are the main externally | ||
visible changes: | ||
|
||
- Features and improvements | ||
- Upgrade to Tendermint 0.6.0 in-process consensus | ||
- Support DELEGATECALL opcode in Ethereum Virtual Machine (important for solidity library calls) | ||
- ARM support | ||
- Docker image size reduced | ||
- Introduction of eris-client companion library for interacting with | ||
eris:db | ||
- Improved single configuration file for all components written by eris-cm | ||
- Allow multiple event subscriptions from same host under rpc/tendermint | ||
|
||
|
||
- Tool changes | ||
- Use glide instead of godeps for dependencies | ||
|
||
|
||
- Testing | ||
- integration tests over simulated RPC calls | ||
- significantly improved unit tests | ||
- the ethereum virtual machine and the consensus engine are now top-level | ||
components and are exposed to continuous integration tests | ||
|
||
|
||
- Bugfixes (incomplete list) | ||
- [EVM] Fix calculation of child CALL gaslimit (allowing solidity library calls to work properly) | ||
- [RPC/v0] Fix blocking event subscription in transactAndHold (preventing return in Javascript libraries) | ||
- [Blockchain] Fix getBlocks to respect block height cap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# ---------------------------------------------------------- | ||
# REQUIREMENTS | ||
|
||
# - go installed locally | ||
# - for build_docker: docker installed locally | ||
|
||
# ---------------------------------------------------------- | ||
|
||
SHELL := /bin/bash | ||
REPO := $(shell pwd) | ||
GOFILES_NOVENDOR := $(shell find ${REPO} -type f -name '*.go' -not -path "${REPO}/vendor/*") | ||
PACKAGES_NOVENDOR := $(shell go list github.com/eris-ltd/eris-db/... | grep -v /vendor/) | ||
VERSION := $(shell cat ${REPO}/version/version.go | tail -n 1 | cut -d \ -f 4 | tr -d '"') | ||
VERSION_MIN := $(shell echo ${VERSION} | cut -d . -f 1-2) | ||
COMMIT_SHA := $(shell echo `git rev-parse --short --verify HEAD`) | ||
|
||
DOCKER_NAMESPACE := quay.io/eris | ||
|
||
|
||
.PHONY: greet | ||
greet: | ||
@echo "Hi! I'm the marmot that will help you with eris-db v${VERSION}" | ||
|
||
### Formatting, linting and vetting | ||
|
||
# check the code for style standards; currently enforces go formatting. | ||
# display output first, then check for success | ||
.PHONY: check | ||
check: | ||
@echo "Checking code for formatting style compliance." | ||
@gofmt -l -d ${GOFILES_NOVENDOR} | ||
@gofmt -l ${GOFILES_NOVENDOR} | read && echo && echo "Your marmot has found a problem with the formatting style of the code." 1>&2 && exit 1 || true | ||
|
||
# fmt runs gofmt -w on the code, modifying any files that do not match | ||
# the style guide. | ||
.PHONY: fmt | ||
fmt: | ||
@echo "Correcting any formatting style corrections." | ||
@gofmt -l -w ${GOFILES_NOVENDOR} | ||
|
||
# lint installs golint and prints recommendations for coding style. | ||
lint: | ||
@echo "Running lint checks." | ||
go get -u github.com/golang/lint/golint | ||
@for file in $(GOFILES_NOVENDOR); do \ | ||
echo; \ | ||
golint --set_exit_status $${file}; \ | ||
done | ||
|
||
# vet runs extended compilation checks to find recommendations for | ||
# suspicious code constructs. | ||
.PHONY: vet | ||
vet: | ||
@echo "Running go vet." | ||
@go vet ${PACKAGES_NOVENDOR} | ||
|
||
### Dependency management for github.com/eris-ltd/eris-db | ||
|
||
# erase vendor wipes the full vendor directory | ||
.PHONY: erase_vendor | ||
erase_vendor: | ||
rm -rf ${REPO}/vendor/ | ||
|
||
# install vendor uses glide to install vendored dependencies | ||
.PHONY: install_vendor | ||
install_vendor: | ||
go get github.com/Masterminds/glide | ||
glide install | ||
|
||
# hell runs utility tool hell to selectively update glide dependencies | ||
.PHONY: hell | ||
hell: | ||
go build -o ${REPO}/target/hell ./util/hell/cmd/hell/main.go | ||
./target/hell $(filter-out $@,$(MAKECMDGOALS)) | ||
|
||
# Dumps Solidity interface contracts for SNatives | ||
.PHONY: snatives | ||
snatives: | ||
@go run ./util/snatives/cmd/main.go | ||
|
||
### Building github.com/eris-ltd/eris-db | ||
|
||
# build all targets in github.com/eris-ltd/eris-db | ||
.PHONY: build | ||
build: check build_db build_client build_keys | ||
|
||
# build all targets in github.com/eris-ltd/eris-db with checks for race conditions | ||
.PHONY: build_race | ||
build_race: check build_race_db build_race_client build_race_keys | ||
|
||
# build eris-db | ||
.PHONY: build_db | ||
build_db: | ||
go build -o ${REPO}/target/eris-db-${COMMIT_SHA} ./cmd/eris-db | ||
|
||
# build eris-client | ||
.PHONY: build_client | ||
build_client: | ||
go build -o ${REPO}/target/eris-client-${COMMIT_SHA} ./client/cmd/eris-client | ||
|
||
# build eris-keys | ||
.PHONY: build_keys | ||
build_keys: | ||
@echo "Marmots need to complete moving repository eris-keys into eris-db." | ||
|
||
# build eris-db with checks for race conditions | ||
.PHONY: build_race_db | ||
build_race_db: | ||
go build -race -o ${REPO}/target/eris-db-${COMMIT_SHA} ./cmd/eris-db | ||
|
||
# build eris-client with checks for race conditions | ||
.PHONY: build_race_client | ||
build_race_client: | ||
go build -race -o ${REPO}/target/eris-client-${COMMIT_SHA} ./client/cmd/eris-client | ||
|
||
# build eris-keys with checks for race conditions | ||
.PHONY: build_race_keys | ||
build_race_keys: | ||
@echo "Marmots need to complete moving repository eris-keys into eris-db." | ||
|
||
### Testing github.com/eris-ltd/eris-db | ||
|
||
# test eris-db | ||
.PHONY: test | ||
test: build | ||
@go test ${PACKAGES_NOVENDOR} -tags integration | ||
|
||
# test eris-db with checks for race conditions | ||
.PHONY: test_race | ||
test_race: build_race | ||
@go test -race ${PACKAGES_NOVENDOR} | ||
|
||
### Build docker images for github.com/eris-ltd/eris-db | ||
|
||
# build docker image for eris-db | ||
.PHONY: build_docker_db | ||
build_docker_db: check | ||
@mkdir -p ${REPO}/target/docker | ||
docker build -t ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} ${REPO} | ||
docker run --rm --entrypoint cat ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} /usr/local/bin/eris-db > ${REPO}/target/docker/eris-db.dockerartefact | ||
docker run --rm --entrypoint cat ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} /usr/local/bin/eris-client > ${REPO}/target/docker/eris-client.dockerartefact | ||
docker build -t ${DOCKER_NAMESPACE}/db:${VERSION} -f Dockerfile.deploy ${REPO} | ||
|
||
@rm ${REPO}/target/docker/eris-db.dockerartefact | ||
@rm ${REPO}/target/docker/eris-client.dockerartefact | ||
docker rmi ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} | ||
|
||
### Test docker images for github.com/eris-ltd/eris-db | ||
|
||
# test docker image for eris-db | ||
.PHONY: test_docker_db | ||
test_docker_db: check | ||
docker build -t ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} ${REPO} | ||
docker run ${DOCKER_NAMESPACE}/db:build-${COMMIT_SHA} glide nv | xargs go test -tags integration | ||
|
||
### Clean up | ||
|
||
# clean removes the target folder containing build artefacts | ||
.PHONY: clean | ||
clean: | ||
-rm -r ./target |
Oops, something went wrong.