Commit Graph

430 Commits

Author SHA1 Message Date
Anton Kaliaev bec9d5cba9 add proposer address to block's Header
Refs #1134

Validation:

- ignored in block.ValidateBasic since it's stateful information
- checked in blockExec.ValidateBlock
2018-08-05 15:16:49 -04:00
Ethan Buchman 2d1c5a1ce6 Merge remote-tracking branch 'origin/develop' into jae/literefactor4 2018-08-02 19:12:22 -04:00
Jae Kwon e719a93d1d Addressed review for #1815 except those marked as 'TODO make issue' 2018-08-02 03:10:50 -07:00
Ismail Khoffi 24ae878b9f update encoding test to how amino skips empty pointers 2018-08-01 13:29:41 +02:00
Anton Kaliaev 0c7338c5f0 abci: Change validators to last_commit_info in RequestBeginBlock (#2074)
* change validators to last_commit_info in RequestBeginBlock
* do not send pubkeys with RequestBeginBlock

Refs #1856
2018-07-30 17:29:40 +02:00
Anton Kaliaev 96ae535fb8 proto3 timestamp (#2064)
This PR changes ABCI time format from int64 (Unix seconds) to WKT (WellKnownType) google.protobuf.Timestamp.

Refs #1857

Reasons:

better precision
standard DT for proto

* update Gopkg.lock
* [makefile] remove extra grep
    - go list excludes vendor by default now
* proto3 timestamp
* [docs/abci-spec] note about serialisation format
* make time non-nullable
2018-07-27 04:23:19 +02:00
Alexander Simmerl 4be6395ee0
Merge pull request #2085 from tendermint/master
Merge 0.23.8 back into develop
2018-07-27 04:21:34 +02:00
Jae Kwon d542d2c394 Fix 0.22.7, bump to 0.22.8 2018-07-26 18:08:09 -07:00
Hendrik Hofstadt 49b52ee3c7 Add test for MakePartSet with evidence 2018-07-26 19:00:07 -04:00
Ethan Buchman 0e127562bf register evidence interface wherever its used 2018-07-26 18:53:19 -04:00
Ethan Buchman 7ad92c44cb Merge branch 'master' into bucky/merge-master 2018-07-25 11:34:32 -04:00
Ethan Buchman 6046b99197 consensus: include evidence in proposed block parts. fixes #2050 2018-07-24 21:58:39 -04:00
Anton Kaliaev 60378fd7f9 abci: remove fee (#2043)
Refs #1861

We don't use the fee field and its likely just confusing.

We can add backwards compatible priority (instead of fee) later.

Note priority is better than fee because it lets the app do the math on how to rank order transactions, rather than forcing that into tendermint (ie. if we return fee, priority would be fee/gas)
2018-07-24 17:28:26 +02:00
Ethan Buchman f6705f02c7 fixes post merge 2018-07-23 23:39:22 -04:00
Ethan Buchman ea31c4836a Merge branch 'develop' into jae/literefactor4 2018-07-23 23:28:14 -04:00
Ethan Buchman e1b48b16c4
Merge branch 'develop' into jae/optimize_blockchain 2018-07-23 22:16:34 -04:00
ValarDragon c798702764 crypto: Remove Ed25519 and Secp256k1 suffix on GenPrivKey 2018-07-20 10:44:21 -07:00
ValarDragon 17c0029233 Merge remote-tracking branch 'origin/develop' into dev/refactor_crypto 2018-07-20 08:59:41 -07:00
Alexander Simmerl 0f2d97dffe
Merge pull request #1742 from Liamsi/proto_files
Add Proto files for types.Header (incl. BlockId, Time, PartsSetHeader)
2018-07-20 17:43:25 +02:00
Alexander Simmerl ed8714e40c
Merge pull request #1965 from tendermint/693-part-2
make Block Header and Data non-pointers
2018-07-20 17:42:42 +02:00
Liamsi 96818af9d5 fix protos to make all tests pass, document differences 2018-07-18 19:06:38 +02:00
ValarDragon 571e602f07 Merge remote-tracking branch 'origin/develop' into dev/refactor_crypto 2018-07-18 08:54:51 -07:00
ValarDragon 99e582d79a crypto: Refactor to move files out of the top level directory
Currently the top level directory contains basically all of the code
for the crypto package. This PR moves the crypto code into submodules
in a similar manner to what `golang/x/crypto` does. This improves code
organization.

Ref discussion: https://github.com/tendermint/tendermint/pull/1966

Closes #1956
2018-07-18 08:38:44 -07:00
Liamsi a81ca93139 update to new (timestamp & empty structs) encoding in amino
- timestamps no longer have fixed length encoding
-
2018-07-18 16:37:15 +02:00
Liamsi 2744682e77 update to latest amino (pre) release v0.11.1
- also reformat code and order imports
2018-07-18 15:53:53 +02:00
Liamsi d665c79cc9 WIP: more empty struct examples 2018-07-18 15:18:10 +02:00
Liamsi 3c38a25bbb add empty struct examples 2018-07-18 15:17:51 +02:00
Liamsi 0cd82fa166 add empty struct examples 2018-07-18 15:14:41 +02:00
Liamsi 99fa7f8132 everything works with https://github.com/tendermint/go-amino/pull/178 2018-07-18 15:14:41 +02:00
Liamsi 82104c9329 almost 2018-07-18 15:14:41 +02:00
Dev Ojha dae7dc30e0 Switch usage of math/rand to cmn's rand (#1980)
This commit switches all usage of math/rand to cmn's rand. The only
exceptions are within the random file itself, the tools package, and the
crypto package. In tools you don't want it to lock between the go-routines.
The crypto package doesn't use it so the crypto package have no other
dependencies within tendermint/tendermint for easier portability.

Crypto/rand usage is unadjusted.

Closes #1343
2018-07-16 11:20:37 +04:00
Ethan Buchman d903057011 fix stopping pubsub 2018-07-14 14:50:56 +01:00
Anton Kaliaev 270659f03f
make Block Header and Data non-pointers
make BlockMeta Header a non-pointer

Refs #693
2018-07-13 12:05:54 +04:00
Anton Kaliaev 3ffda994c2
Revert "rename privval#GetAddress and GetPubKey to Address and PubKey"
This reverts commit 58d0c8de89bcc6c081c5b33683c2d0a4e1f83eef.
2018-07-12 22:40:07 +04:00
Anton Kaliaev 6a85aecfb7
fix linter issues 2018-07-12 22:40:07 +04:00
Anton Kaliaev d103aaf53f
add test for Vote#Verify
remove test for String (very brittle)
2018-07-12 22:40:06 +04:00
Anton Kaliaev 17e1df0cbd
test validator set more thoroughly
Refs #693
2018-07-12 22:40:06 +04:00
Anton Kaliaev ff8ddee708
rename privval#GetAddress and GetPubKey to Address and PubKey 2018-07-12 22:40:06 +04:00
Anton Kaliaev 20bb522592
add tests for ABCIResults#Bytes and tx#IndexByHash 2018-07-12 22:40:06 +04:00
Anton Kaliaev 715ec19c96
add tests for protobuf
Refs #693
2018-07-12 22:40:06 +04:00
Anton Kaliaev d51b196992
improve part set tests
Refs #693
2018-07-12 22:40:06 +04:00
Anton Kaliaev 5a4459935b
add a test for ConsensusParams#Update
Refs #693
2018-07-12 22:40:06 +04:00
Anton Kaliaev 3132f7fad4
add tests for genesis
Refs #693
2018-07-12 22:40:06 +04:00
Anton Kaliaev 80399e60fb
add tests for events public funcs
Refs #693
2018-07-12 22:40:05 +04:00
Anton Kaliaev b271c40783
remove deprecated `app_options` field from genesis 2018-07-12 22:40:05 +04:00
Anton Kaliaev 37ce4e549e
add more tests for evidence
Refs #693
2018-07-12 22:40:05 +04:00
Anton Kaliaev e4db5f8dcd
test event bus
Refs #693
2018-07-12 22:40:05 +04:00
Anton Kaliaev 6fe8ea966a
remove events we do not emit 2018-07-12 22:40:05 +04:00
Anton Kaliaev 1377ef1e1f
remove unused TxEventBuffer 2018-07-12 22:40:05 +04:00
Anton Kaliaev 95980d944b
[types] add tests for Block and Commit
Refs #693
2018-07-12 22:40:05 +04:00
Ethan Buchman 5453aa6169 Merge branch 'develop' into jae/literefactor4 2018-07-02 14:57:30 -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
Anton Kaliaev 2d98899b9b
set MaxTxs to 10000 (the same that was used in the config before) 2018-07-01 09:44:12 +04:00
Anton Kaliaev 297cd4cfe8
limit HTTP request body and WS read msg size to 1MB 2018-06-29 12:40:32 +04:00
Anton Kaliaev 9563927bbd
print only tx's hash and size when logging blocks
Closes #1799
2018-06-29 12:40:32 +04:00
Jae Kwon 8524a8da7f Try to fix circle... 2018-06-27 04:22:30 -07:00
Jae Kwon bf0ff212b9 Refactor "lite" to handle delayed validator set changes.
Also, fix consensus liveness issue.
2018-06-25 17:12:25 -07:00
Jae Kwon a5b7ea93c4 Delay validator set changes by 1 block. 2018-06-25 16:59:00 -07:00
Jae Kwon 8128627f08 Optimizing blockchain reactor.
Should be paired with https://github.com/tendermint/iavl/pull/65.
2018-06-22 21:47:48 -07:00
Alexander Simmerl e39e43f86f
Merge pull request #1790 from tendermint/xla/merge-abci-tmlibs
Merge abci
2018-06-23 00:55:31 +02:00
Alexander Simmerl a605b66c5a
Move abci imports 2018-06-22 07:28:07 +02:00
Alexander Simmerl 3e1baf68f8 crypto: Rename last traces of go-crypto (#1786)
Follow-up to #1782
2018-06-22 08:24:36 +04:00
Ethan Buchman 2b5229dd5e
Merge pull request #1782 from Liamsi/merge-city
Merge go-crypto into tendermint
2018-06-21 15:53:02 -07:00
Ethan Buchman 9cd9f3338b Merge branch 'master' into develop 2018-06-21 12:57:09 -07:00
Liamsi a39b2522d5 review comments:
- re-add test
- add TODO
- err instead of panic where possible
2018-06-21 11:51:46 -07:00
Liamsi c96b27136f remove go-crypto from go-crypto:
use tendermint/crypto :-)
2018-06-20 21:05:38 -07:00
Liamsi d2c05bc5b9 Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
2018-06-20 17:35:30 -07:00
Liamsi 96a3502126 delete everything 2018-06-20 15:19:08 -07:00
Anton Kaliaev 489d9b9184
more metrics 2018-06-20 12:38:45 +04:00
Ethan Buchman 43745c83db Merge branch 'release/v0.20.1' into develop 2018-06-20 00:08:51 -07:00
Anton Kaliaev aaddf5d32f
set pubsub default capacity to 0
Refs #951

Jae: I don't know a good way to catch these errors in general, but
forcing pubsub's internal channel to have a capacity of 0 will reveal
bugs sooner, if the subscriber also has a 0 or small capacity ch to pull
from.
2018-06-19 17:07:21 +04:00
Ethan Buchman a519825bf8 consensus: fixes #1754
* updateToState exits early if the state isn't new, which happens after
* fast syncing. This results in not sending a NewRoundStep message. The mempool
* reactor depends on PeerState, which is updated by NewRoundStep
* messages. If the peer never sends a NewRoundStep, the mempool reactor
* will think they're behind, and never forward transactions. Note this
* only happens when `create_empty_blocks = false`, because otherwise
* peers will move through the consensus state and send a NewRoundStep
* for a new step soon anyways. Simple fix is just to send the
* NewRoundStep message during updateToState even if exit early
2018-06-18 17:08:09 -07:00
ia b5775b56c6 all: gofmt (#1743)
* all: gofmt

Run 'gofmt -w .' from project root.

* Update changelog to say that I ran gofmt

* Revert "Update changelog to say that I ran gofmt"

This reverts commit 956f133ff0354fd7338e7df7c823e6f98b655da6.
2018-06-15 02:03:50 +02:00
Ethan Buchman 76c82fd433 add more tests 2018-06-06 20:49:00 -07:00
Ethan Buchman 9481cabd50 fixes from review 2018-06-06 20:45:20 -07:00
Ethan Buchman fcf61b8088 check addrs match pubkeys in abci Validator. version bump 2018-06-06 16:35:35 -07:00
Ethan Buchman 8e45348737 update for abci v0.11.0 release. let InitChain update validators 2018-06-06 15:47:04 -07:00
Ethan Buchman 2edc68c59b use all fields in abci types 2018-06-06 13:07:17 -07:00
Ethan Buchman 2897685c57 abci header takes ValidatorsHash 2018-06-06 00:28:12 -07:00
Ethan Buchman 54e61468d4 fixes from review 2018-06-05 22:04:38 -07:00
Ethan Buchman 5c7ccbd4a7 use const for abci type strings 2018-06-05 22:04:38 -07:00
Ethan Buchman aa8be33da1 fix fmt 2018-06-05 22:04:27 -07:00
Ethan Buchman 3d2c4fd309 update Evidence type - requires pubkey and valset to verify and convert to abci.Evidence 2018-06-05 22:04:26 -07:00
Ethan Buchman e1e6878a4d fix state tests 2018-06-05 22:00:25 -07:00
Ethan Buchman e4147b6f1a state test runs 2018-06-05 22:00:25 -07:00
Ethan Buchman 7606b7595f compiles 2018-06-05 22:00:25 -07:00
Ethan Buchman 485b4a0c6f revert gogo 2018-06-05 21:59:52 -07:00
Ethan Buchman ebd2fe7a68 more types 2018-06-05 21:59:52 -07:00
Ethan Buchman f28eae7816 update types 2018-06-05 21:59:52 -07:00
Ethan Buchman 3d33226e80 move types/services.go to state pkg. pass State to evpool.Update 2018-06-04 21:20:23 -07:00
Alexander Simmerl bf370d36c2
Extract priv_validator into first class package
This is a maintenance change to move the private validator package out
of the types and to a top-level location. There is no good reason to
keep it under the types and it will more clearly coommunicate where
additions related to the privval belong. It leaves the interface and the
mock in types for now as it would introduce circular dependency between
privval and types, this should be resolved eventually.

* mv priv_validator to privval pkg
* use consistent `privval` as import

Follow-up to #1255
2018-06-03 13:51:58 +02:00
Anton Kaliaev 6004587347
expect all tags to be strings (#1498)
* expect all tags to be strings

Refs #1369

* port changes from https://github.com/tendermint/tmlibs/pull/204

Refs #1369
2018-05-28 14:37:11 +04:00
Anton Kaliaev bb9aa85d22
copy events and pubsub packages from tmlibs
Refs #847
2018-05-21 10:51:47 +04:00
Ethan Buchman bf6527fc59
Merge pull request #1382 from EugeneChung/develop
remove Heap.Update() call when setting Proposer field
2018-05-20 19:32:13 -04:00
Ethan Buchman e5220360c5 AddPart always verifies 2018-05-17 13:17:50 -04:00
Ethan Buchman 162811476a update some comments 2018-05-14 16:32:19 -04:00
Zarko Milosevic 2c125b6c78 Fix validValue rule 2018-05-14 16:17:21 -04:00
Ethan Buchman e9804d76cf fixes from review 2018-05-14 10:33:31 -04:00
Ethan Buchman 658060150c rpc: add voting power totals to vote bitarrays 2018-05-13 19:22:23 -04:00