Skip to content
This repository was archived by the owner on Jul 15, 2018. It is now read-only.

Commit cd24e92

Browse files
authored
Merge pull request #235 from tendermint/develop
Develop
2 parents 78a8905 + e132e78 commit cd24e92

File tree

4 files changed

+130
-23
lines changed

4 files changed

+130
-23
lines changed

.circleci/config.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: /go/src/github.com/tendermint/abci
5+
docker:
6+
- image: circleci/golang:1.10.0
7+
environment:
8+
GOBIN: /tmp/workspace/bin
9+
10+
jobs:
11+
setup_dependencies:
12+
<<: *defaults
13+
steps:
14+
- run: mkdir -p /tmp/workspace/bin
15+
- run: mkdir -p /tmp/workspace/profiles
16+
- checkout
17+
- restore_cache:
18+
keys:
19+
- v1-pkg-cache
20+
- run:
21+
name: tools
22+
command: |
23+
export PATH="$GOBIN:$PATH"
24+
make get_tools
25+
- run:
26+
name: dependencies
27+
command: |
28+
export PATH="$GOBIN:$PATH"
29+
make get_vendor_deps
30+
- run:
31+
name: binaries
32+
command: |
33+
export PATH="$GOBIN:$PATH"
34+
make install
35+
- persist_to_workspace:
36+
root: /tmp/workspace
37+
paths:
38+
- bin
39+
- profiles
40+
- save_cache:
41+
key: v1-pkg-cache
42+
paths:
43+
- /go/pkg
44+
- save_cache:
45+
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
46+
paths:
47+
- /go/src/github.com/tendermint/abci
48+
49+
test_integration:
50+
<<: *defaults
51+
steps:
52+
- attach_workspace:
53+
at: /tmp/workspace
54+
- restore_cache:
55+
key: v1-pkg-cache
56+
- restore_cache:
57+
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
58+
- run:
59+
name: Run integration tests
60+
command: |
61+
find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
62+
bash tests/test.sh
63+
64+
test_cover:
65+
<<: *defaults
66+
parallelism: 4
67+
steps:
68+
- attach_workspace:
69+
at: /tmp/workspace
70+
- restore_cache:
71+
key: v1-pkg-cache
72+
- restore_cache:
73+
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
74+
- run:
75+
name: Run test cover
76+
command: |
77+
for pkg in $(go list github.com/tendermint/abci/... | grep -v /vendor/ | circleci tests split --split-by=timings); do
78+
id=$(basename "$pkg")
79+
go test -timeout 5m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg"
80+
done
81+
- persist_to_workspace:
82+
root: /tmp/workspace
83+
paths:
84+
- "profiles/*"
85+
86+
upload_coverage:
87+
<<: *defaults
88+
steps:
89+
- attach_workspace:
90+
at: /tmp/workspace
91+
- restore_cache:
92+
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
93+
- run:
94+
name: gather
95+
command: |
96+
set -ex
97+
98+
echo "mode: atomic" > coverage.txt
99+
for prof in $(ls /tmp/workspace/profiles/); do
100+
tail -n +2 /tmp/workspace/profiles/"$prof" >> coverage.txt
101+
done
102+
- run:
103+
name: upload
104+
command: bash <(curl -s https://codecov.io/bash) -f coverage.txt
105+
106+
workflows:
107+
version: 2
108+
test-suite:
109+
jobs:
110+
- setup_dependencies
111+
- test_cover:
112+
requires:
113+
- setup_dependencies
114+
- test_integration:
115+
requires:
116+
- setup_dependencies
117+
- upload_coverage:
118+
requires:
119+
- test_integrations
120+
121+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ vendor
33
types/types.pb.go
44
*.sw[op]
55
abci-cli
6+
coverage.txt

circle.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

specification.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Specification
2-
=============
1+
ABCI Specification
2+
==================
33

44
Message Types
55
~~~~~~~~~~~~~
@@ -228,6 +228,8 @@ CheckTx
228228
After ``Commit``, the mempool will rerun CheckTx on all remaining
229229
transactions, throwing out any that are no longer valid.
230230

231+
Keys and values in Tags must be UTF-8 encoded strings (e.g. "account.owner": "Bob", "balance": "100.0", "date": "2018-01-02")
232+
231233

232234
DeliverTx
233235
^^^^^^^^^
@@ -251,6 +253,7 @@ DeliverTx
251253

252254
- Deliver a transaction to be executed in full by the application. If the transaction is valid,
253255
returns CodeType.OK.
256+
- Keys and values in Tags must be UTF-8 encoded strings (e.g. "account.owner": "Bob", "balance": "100.0", "time": "2018-01-02T12:30:00Z")
254257

255258
EndBlock
256259
^^^^^^^^
@@ -284,3 +287,6 @@ Commit
284287

285288
- Persist the application state.
286289
- Return a Merkle root hash of the application state.
290+
- It's critical that all application instances return the same hash. If not,
291+
they will not be able to agree on the next block, because the hash is
292+
included in the next block!

0 commit comments

Comments
 (0)