Commit Graph

6372 Commits

Author SHA1 Message Date
Ethan Buchman 18acd77e40
Merge pull request #2076 from tendermint/hotfix/0.22.7
Hotfix/0.22.7
2018-07-26 19:00:50 -04:00
Hendrik Hofstadt 49b52ee3c7 Add test for MakePartSet with evidence 2018-07-26 19:00:07 -04:00
Ethan Buchman e4dfab6349 changelog and version 2018-07-26 18:54:15 -04:00
Ethan Buchman 0e127562bf register evidence interface wherever its used 2018-07-26 18:53:19 -04:00
Ethan Buchman 5fdbcd70df
Merge pull request #2056 from tendermint/hotfix/v0.22.6
Hotfix/v0.22.6
2018-07-25 11:18:00 -04:00
Ethan Buchman 6046b99197 consensus: include evidence in proposed block parts. fixes #2050 2018-07-24 21:58:39 -04:00
Ethan Buchman 359898dcac p2p: fix conn leak. part of #2046 2018-07-24 21:53:37 -04:00
Ethan Buchman 5768b67162 changelog and version 2018-07-24 21:26:41 -04:00
Ethan Buchman 082557b7d4 rpc: validate height in abci_query 2018-07-24 21:25:47 -04:00
Ethan Buchman 8dc655dad2 rpc: fix /blockchain OOM #2049 2018-07-24 21:18:20 -04:00
Ethan Buchman 70d3783747 dep: revert updates
- leave protobuf on 1.1.1 for grpc import fixes
- amino v0.11 breaks tendermint - revert to v0.10.1
2018-07-24 21:01:14 -04:00
Ethan Buchman 05a76fb517
Merge pull request #2029 from tendermint/release/0.22.5
Release/0.22.5
2018-07-23 21:57:43 -04:00
Ethan Buchman 15b112e669 mempool: chan bool -> chan struct{} 2018-07-23 21:06:47 -04:00
Ethan Buchman 2aef80bcff
Merge pull request #2034 from tendermint/dev/fix_pkg_names
crypto: Fix package imports from the refactor
2018-07-23 20:34:34 -04:00
ValarDragon f3d519c966 crypto: Fix package imports from the refactor 2018-07-23 16:14:21 -07:00
Anton Kaliaev 9962e598a0
reconnect to self-reported address if persistent peer is inbound (#2031)
* reconnect to self-reported address if persistent peer is inbound

* add a fixme
2018-07-23 21:15:08 +04:00
Anton Kaliaev 948b91e62e
add missing changelog entries 2018-07-23 17:16:43 +04:00
Anton Kaliaev 1e05242297
update changelog and bump version to 0.22.5 2018-07-23 17:07:14 +04:00
Anton Kaliaev 94e8252607
#2021 follow up (#2028)
* update changelog

* txAvailable is always true

Refs #2021, #1920

* remove debug message

No additional value. `enterPropose` log message should be enough.

Refs #2021, #1920
2018-07-23 16:47:15 +04:00
Dev Ojha eb7dea1b0d crypto/ed25519: Remove privkey.Generate method (#2022)
The privkey.Generate method here was a custom-made method for deriving
a private key from another private key. This function is currently
not used anywhere in our codebase, and has not been reviewed enough
that it would be secure to use. This removes that method. We should
adopt the official ed25519 HD derivation once that has been standardized,
in order to fulfill this need.

closes #2000
2018-07-23 15:35:13 +04:00
srmo e36ce6f893 fix race condition on proposal height for published txs (#2021)
* #1920 try to fix race condition on proposal height for published txs

- related to create_empty_blocks=false
- published height for accepted tx can be wrong (too low)
- use the actual mempool height + 1 for the proposal
- expose Height() on mempool

* #1920 add initial test for mempool.Height()

- not sure how to test the lock
- can the mutex reference be of type Locker?
-- this way, we can use a "mock" of the mutex to test triggering

* #1920 use the ConsensusState height in favor of mempool

- gets rid of indirections
- doesn't need any "+1" magic

* #1920 cosmetic

- if we use cs.Height, it's enough to evaluate right before propose

* #1920 cleanup TODO and non-needed code

* #1920 add changelog entry
2018-07-23 15:34:45 +04:00
Dev Ojha c5c1689591 crypto/secp256k1: Add godocs, remove indirection in privkeys (#2017)
* crypto/secp256k1: Add godocs, remove indirection in privkeys

The following was previously done for creating secp256k1 private keys:

First obtain privkey bytes. Then create a private key in the
underlying library, with scalar exponent equal to privKeyBytes.
(The method called was secp256k1.PrivKeyFromBytes,
fb90c334df/btcec/privkey.go (L21))

Then the private key was serialized using the underlying library, which just
returns back the bytes that comprised the scalar exponent, but padded to be
exactly 32 bytes.
fb90c334df/btcec/privkey.go (L70)

Thus the entire indirection of calling the underlying library can be avoided
by just ensuring that we pass in a 32 byte value. A test case has even be written
to show this more clearly in review.

* crypto/secp256k1: Address PR comments

Squash this commit

* crypto: Remove note about re-registering amino paths when unnecessary.

This commit should be squashed.
2018-07-21 08:52:04 +04:00
Anton Kaliaev 5e96421d44
Merge pull request #1966 from tendermint/dev/refactor_crypto
crypto: Refactor to move files out of the top level directory
2018-07-20 22:48:41 +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
Alexander Simmerl 6017d817e5
Merge pull request #2008 from tendermint/1772-rwmutex-cs
use RWMutex for consensus state
2018-07-20 17:24:55 +02:00
Alexander Simmerl 63835c0360
Merge pull request #2009 from tendermint/1772-call-validators-with-timeout
make `/status` RPC endpoint resistant to consensus halt
2018-07-20 17:22:16 +02:00
Alexander Simmerl c82c60df11
rpc: Test Validator retrevial timeout 2018-07-20 17:08:55 +02:00
Dev Ojha 67762aec73 crypto/ed25519: Update the godocs (#2002)
This commit updates the godocs for the package, and adds an optimization
to the privkey.Pubkey() method.

The optimization is that in golang, the private key (due to interface
compatibility reasons) has a copy of the public key stored inside of it.
Therefore if this copy has already been computed, there is no need to
recompute it.
2018-07-20 10:09:30 +04:00
Anton Kaliaev 0fbb465b8f add protoc_all and protoc_grpc to .PHONY 2018-07-20 01:27:41 +04:00
Anton Kaliaev 2e75214316 update gogo to 1.1.1 and other misc. updates
Refs #1883
2018-07-20 01:27:41 +04:00
Anton Kaliaev 5be456e5b1 update grpc version to 1.13.0
Refs #1883
2018-07-20 01:27:41 +04:00
Anton Kaliaev 1bd5476854
make `/status` RPC endpoint resistant to consensus halt
Refs #1772
2018-07-19 11:26:50 +04:00
Anton Kaliaev 5037dd40c5
use RWMutex for consensus state
allows multiple RPC requests to query consensus state

Refs #1772
2018-07-19 10:49:12 +04: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
Zach 40342bfa4a Update DOCS_README.md (#1985) 2018-07-18 13:32:17 +04:00
Anton Kaliaev 912fe477a4
Merge pull request #1987 from silasdavis/static-marshaler
Generate static marshalling methods for ABCI types to make compatible with downstream GRPC usage
2018-07-18 13:26:44 +04:00
Anton Kaliaev b31ee798bd
preserve original address and dial it instead of self-reported address (#1994)
Refs #1720
2018-07-18 13:23:29 +04:00
Jeremiah Andrews 6c4ca140ed Add private peer ID tracking to AddrBook (#1989)
* Add private peer ID tracking to AddrBook

* Remove private peer tracking/blocking from pex

* debug level msg when we fail to add private address
2018-07-18 13:22:09 +04:00