Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP re-documentation + etc. #120

Merged
merged 6 commits into from
Jun 19, 2017
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ BREAKING CHANGES:
- enhanced relay subcommand
- relay start did what relay used to do
- relay init registers both chains on one another (to set it up so relay start just works)
- docs
- removed `example-plugin`, put `counter` inside `docs/guide`

ENHANCEMENTS:
- intergrates tendermint 0.10.0 (not the rc-2, but the real thing)
- commands return error code (1) on failure for easier script testing
- add `reset_all` to basecli, and never delete keys on `init`
- new shutil based unit tests, with better coverage of the cli actions
- just `make fresh` when things are getting stale ;)

BUG FIXES:
- no longer panics on missing app_options in genesis (thanks, anton)
- updated all docs... again


## 0.5.2 (June 2, 2017)
Expand Down
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
GOTOOLS = github.com/mitchellh/gox \
github.com/Masterminds/glide
PACKAGES=$(shell go list ./... | grep -v '/vendor/')

all: get_vendor_deps install test

Expand All @@ -9,6 +8,7 @@ build:

install:
go install ./cmd/...
go install ./docs/guide/counter/cmd/...

dist:
@bash scripts/dist.sh
Expand All @@ -17,7 +17,7 @@ dist:
test: test_unit test_cli

test_unit:
go test $(PACKAGES)
go test `glide novendor`
#go run tests/tendermint/*.go

test_cli: tests/cli/shunit2
Expand All @@ -42,6 +42,14 @@ tools:
go get -u -v $(GOTOOLS)

clean:
@rm -f ./basecoin
# maybe cleaning up cache and vendor is overkill, but sometimes
# you don't get the most recent versions with lots of branches, changes, rebases...
@rm -rf ~/.glide/cache/src/https-git.luolix.top-tendermint-*
@rm -rf ./vendor
@rm -f $GOPATH/bin/{basecoin,basecli,counter,countercli}

.PHONY: all build install test test_cli test_unit get_vendor_deps build-docker clean
# when your repo is getting a little stale... just make fresh
fresh: clean get_vendor_deps install
@if [[ `git status -s` ]]; then echo; echo "Warning: uncommited changes"; git status -s; fi

.PHONY: all build install test test_cli test_unit get_vendor_deps build-docker clean fresh
5 changes: 1 addition & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@ dependencies:

test:
override:
- "cd $REPO && glide install && go install ./cmd/..."
- "cd $REPO && make all"
- ls $GOPATH/bin
- "cd $REPO && make test"


2 changes: 1 addition & 1 deletion cmd/basecli/commands/apptx.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (a *AppTx) AddSigner(pk crypto.PubKey) {
// but that code is too ugly now, needs refactor..
func (a *AppTx) ValidateBasic() error {
if a.chainID == "" {
return errors.New("No chainId specified")
return errors.New("No chain-id specified")
}
in := a.Tx.Input
if len(in.Address) != 20 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/basecli/commands/sendtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s *SendTx) AddSigner(pk crypto.PubKey) {
// but that code is too ugly now, needs refactor..
func (s *SendTx) ValidateBasic() error {
if s.chainID == "" {
return errors.New("No chainId specified")
return errors.New("No chain-id specified")
}
for _, in := range s.Tx.Inputs {
if len(in.Address) != 20 {
Expand Down
11 changes: 0 additions & 11 deletions cmd/counter/cmd.go

This file was deleted.

10 changes: 5 additions & 5 deletions docs/go_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ make test

Great! Now when I run `tendermint` I have the newest of the new, the develop branch! But please note that this branch is not considered production ready and may have issues. This should only be done if you want to develop code for the future and run locally.

But wait, I want to mix and match. There is a bugfix in `go-p2p:persistent_peer` that I want to use with tendermint. How to compile this. I will show with a simple example, please update the repo and commit numbers for your usecase. Also, make sure these branches are compatible, so if `persistent_peer` is close to `master` it should work. But if it is 15 commits ahead, you will probably need the `develop` branch of tendermint to compile with it. But I assume you know your way around git and can figure that out.
But wait, I want to mix and match. There is a bugfix in `go-crypto:unstable` that I want to use with tendermint. How to compile this. I will show with a simple example, please update the repo and commit numbers for your usecase. Also, make sure these branches are compatible, so if `unstable` is close to `master` it should work. But if it is 15 commits ahead, you will probably need the `develop` branch of tendermint to compile with it. But I assume you know your way around git and can figure that out.

In the dependent repo:
```
cd $GOPATH/src/github.com/tendermint/go-p2p
git checkout persistent_peer
cd $GOPATH/src/github.com/tendermint/go-crypto
git checkout unstable
git pull
# double-check this makes sense or if it is too far off
git log --oneline --decorate --graph
Expand All @@ -115,10 +115,10 @@ git log | head -1

In the main repo (tendermint, basecoin, ...) where the binary will be built:
```
cd $GOPATH/src/github.com/tendermint/tendermin
cd $GOPATH/src/github.com/tendermint/tendermint
git checkout master
git pull
# -> edit glide.lock, set the version of go-p2p (for example)
# -> edit glide.lock, set the version of go-crypto (for example)
# to the commit number you got above (the 40 char version)
make get_vendor_deps
make install
Expand Down
Loading