51 Commits

Author SHA1 Message Date
JamesRay
fe3b97fd66 It's better read from genDoc than from state.validators when appHeight==0 in replay (#2893)
* optimize addProposalBlockPart

* optimize addProposalBlockPart

* if ProposalBlockParts and LockedBlockParts both exist,let LockedBlockParts overwrite ProposalBlockParts.

* fix tryAddBlock

* broadcast lockedBlockParts in higher priority

* when appHeight==0, it's better fetch genDoc than state.validators.
2018-11-26 08:03:08 -05:00
Anton Kaliaev
fb91ef7462 validate reactor messages (#2711)
* validate reactor messages

Refs #2683

* validate blockchain messages

Refs #2683

* validate evidence messages

Refs #2683

* todo

* check ProposalPOL and signature sizes

* add a changelog entry

* check addr is valid when we add it to the addrbook

* validate incoming netAddr (not just nil check!)

* fixes after Bucky's review

* check timestamps

* beef up block#ValidateBasic

* move some checks into bcBlockResponseMessage

* update Gopkg.lock

Fix

```
grouped write of manifest, lock and vendor: failed to export github.com/tendermint/go-amino: fatal: failed to unpack tree object 6dcc6ddc143e116455c94b25c1004c99e0d0ca12
```

by running `dep ensure -update`

* bump year since now we check it

* generate test/p2p/data on the fly using tendermint testnet

* allow sync chains older than 1 year

* use full path when creating a testnet

* move testnet gen to test/docker/Dockerfile

* relax LastCommitRound check

Refs #2737

* fix conflicts after merge

* add small comment

* some ValidateBasic updates

* fixes

* AppHash length is not fixed
2018-11-01 02:07:18 -04:00
Dev Ojha
12fa9d1cab crypto/merkle: Remove byter in favor of plain byte slices (#2595)
* crypto/merkle: Remove byter in favor of plain byte slices

This PR is fully backwards compatible in terms of function output!
(The Go API differs though) The only test case changes was to refactor
it to be table driven.

* Update godocs per review comments
2018-10-10 12:46:09 -04:00
Joon
71a34adfe5 General Merkle Proof (#2298)
* first commit

finalize rebase

add protoc_merkle to Makefile

* in progress

* fix kvstore

* fix tests

* remove iavl dependency

* fix tx_test

* fix test_abci_cli

fix test_apps

* fix test_apps

* fix test_cover

* rm rebase residue

* address comment in progress

* finalize rebase
2018-09-28 20:03:19 -04:00
Ethan Buchman
ec710395b7 RIPEMD160 -> SHA256 2018-07-02 14:27:43 -04:00
Ethan Buchman
d55243f0e6 fix import paths 2018-07-01 22:36:49 -04:00
Ethan Buchman
e5220360c5 AddPart always verifies 2018-05-17 13:17:50 -04:00
Ethan Buchman
c45ba2967a fixes from review 2018-04-27 10:29:05 -04:00
Ethan Buchman
a2d77cbe4e add MarshalJSON methods to fix dump_consensus_state 2018-04-26 23:43:48 -04:00
Thomas Corbière
2644a529f0 Fix lint errors (#1390)
* use increment and decrement operators.

* remove unnecessary else branches.

* fix package comment with leading space.

* fix receiver names.

* fix error strings.

* remove omittable code.

* remove redundant return statement.

* Revert changes (code is generated.)

* use cfg as receiver name for all config-related types.

* use lsi as the receiver name for the LastSignedInfo type.
2018-04-02 10:21:17 +02:00
Ethan Buchman
200787ede2 types: update for new go-wire. WriteSignBytes -> SignBytes 2018-03-02 01:25:54 -05:00
Ethan Buchman
7a5060dc52 replace data.Bytes with cmn.HexBytes 2018-02-03 03:47:01 -05:00
Ethan Buchman
4e3488c677 update types 2018-02-03 03:23:10 -05:00
Ethan Buchman
9529f12c28 more linting 2017-11-27 22:39:12 +00:00
Zach Ramsay
478a10aa41 Write doesn't need error checked 2017-11-27 22:39:12 +00:00
Zach Ramsay
d7cb291fb2 errcheck; sort some stuff out 2017-11-27 22:39:11 +00:00
Zach Ramsay
68e7983c70 linting errors: afew more 2017-11-27 22:39:11 +00:00
Zach Ramsay
8f0237610e linting errors: clean it all up 2017-11-27 22:39:11 +00:00
Zach Ramsay
b75d4f73e7 errcheck: PR comment fixes 2017-11-27 22:39:11 +00:00
Zach Ramsay
57ea4987f7 linting: apply errcheck part1 2017-11-27 22:39:11 +00:00
Ethan Buchman
bdb34f9f4e types: []byte -> data.Bytes 2017-04-27 19:01:18 -04:00
Ethan Buchman
d5b524e309 go-merkle -> merkleeyes/iavl and tmlibs/merkle 2017-04-21 18:16:05 -04:00
Ethan Buchman
d1926bcad1 use tmlibs 2017-04-21 18:12:54 -04:00
Ethan Buchman
5da9b3a803 postmerge 2017-04-21 18:09:47 -04:00
Ethan Buchman
0017fb7ffe premerge 2017-04-21 17:38:40 -04:00
Ethan Buchman
8ba79252c8 types: use mtx on PartSet.String() 2017-03-02 23:50:59 -05:00
Ethan Buchman
1b3766d802 types: canonical_json.go 2016-12-17 21:21:27 -05:00
zachary balder
da8b043612 sign bytes w struct literals 2016-12-17 21:21:27 -05:00
Jae Kwon
d83fc02597 MakePartSet takes partSize from config. fix replay test 2016-11-16 01:23:16 -05:00
Jae Kwon
1173a85c85 Use BlockID everywhere 2016-11-15 18:34:58 -05:00
Ethan Buchman
501c4e4bac fixes from review 2016-04-26 22:17:13 -04:00
Ethan Buchman
922f720cf6 cswal_light logs own votes; fix tests 2016-04-19 20:45:33 -04:00
Ethan Buchman
a34f9e082e lazy part_set reader 2016-04-19 20:45:33 -04:00
Ethan Buchman
79c9a9f03a don't verify own block parts 2016-04-19 20:45:33 -04:00
Ethan Buchman
5e42c96267 crank the part size; prioritize data channel 2016-04-19 20:45:33 -04:00
Jae Kwon
0316dfc6f2 Update code.google.com to use golang.org 2015-12-17 13:27:30 -08:00
Jae Kwon
34f6f50a07 Conform to go-merkle SimpleProof.Aunts 2015-12-10 11:09:25 -08:00
Jae Kwon
ab1e8a35c6 Shorten consensus log events 2015-12-09 17:09:06 -08:00
Jae Kwon
d69b5c5ab6 Conform to go-wire 1.0 2015-11-10 13:10:43 -08:00
Jae Kwon
c4ed55d801 Refactor to move common libraries out of project 2015-10-22 17:39:06 -07:00
Jae Kwon
3be3647dc8 tendermint/binary -> tendermint/wire 2015-07-28 12:18:17 -07:00
Ethan Buchman
8e50bf15de panic wrapper functions 2015-07-21 10:46:05 -04:00
Jae Kwon
2e1d8ba054 Make Ripemd160 the default 2015-07-10 12:15:46 -07:00
Jae Kwon
9965dd5de6 uint* to int* whereever appropriate; https://www.reddit.com/r/golang/comments/2q5vdu/int_vs_uint/ 2015-06-25 20:28:34 -07:00
Jae Kwon
1a652a1cbb Fix usage of SimpleProof for PartSet 2015-06-18 22:08:22 -07:00
Jae Kwon
da73e001ad BitArray takes a pointer receiver. More logging 2015-05-05 23:01:19 -07:00
Jae Kwon
b92c0401e6 Made all JSON fields lower_case 2015-05-01 17:26:49 -07:00
Jae Kwon
5366d808ba Proposal WriteSignBytes is JSON 2015-04-27 21:06:36 -07:00
Jae Kwon
13b6508ecd Package import path change 2015-04-01 17:30:16 -07:00
Ethan Buchman
60f166e823 tendermint2 2015-03-31 15:33:31 -07:00