6910 Commits

Author SHA1 Message Date
Dev Ojha
0bd4fb96f0 crypto: Add benchmarking code for signature schemes (#2061)
* crypto: Add benchmarking code for signature schemes

This does a slight refactor for the key generation code. It now calls a
seperate unexported method to allow generation from a reader. I think this
will actually reduce time in generation, due to no longer initializing an
extra slice. This was needed in order to enable benchmarking.

This uses an internal package for the benchmarking code, so that this can
be standardized without being exported in the public API. The benchmarking
code is derived from agl/ed25519's benchmarking code, and has copied the
license over.

Closes #1984
2018-07-25 23:07:47 +02:00
Dev Ojha
9cfc47a93b makefile: Add make check_dep and remove make ensure_deps (#2055)
This adds a new makefile command, which is used in CI linting, `make check_dep`.
This ensures the toml is in sync with the lock, and that were not pinning to a
branch in any repository.

This also adapts `make get_vendor_deps` to check the lock, in addition to
populating the vendor directory. This removes the need for `make ensure_deps`.

This makes `make get_vendor_deps` consistent between tendermint and the sdk.
2018-07-25 18:09:52 +02:00
Alexander Simmerl
d212292f86
Merge pull request #2066 from tendermint/bucky/merge-master
Bucky/merge master
2018-07-25 17:36:39 +02:00
Ethan Buchman
7ad92c44cb Merge branch 'master' into bucky/merge-master 2018-07-25 11:34:32 -04:00
Ethan Buchman
5fdbcd70df
Merge pull request #2056 from tendermint/hotfix/v0.22.6
Hotfix/v0.22.6
v0.22.6
2018-07-25 11:18:00 -04:00
Dev Ojha
d149d8f96d github: update PR template to indicate changing pending changelog. (#2059) 2018-07-25 11:34:51 +04:00
Ethan Buchman
74b6cc9057 rpc: log error when we timeout getting validators from consensus (#2045) 2018-07-25 10:56:00 +04:00
Ethan Buchman
6046b99197 consensus: include evidence in proposed block parts. fixes #2050 v0.22.6-rc0 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
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
Anton Kaliaev
c248ce5ef6 p2p: Reject addrs coming from private peers (#2032)
Refs #1706
2018-07-24 17:10:58 +02:00
Anton Kaliaev
059a03a66a tools: clean up Makefile and remove LICENSE file (#2042)
* lean up Makefile and remove LICENSE file
* remove k8s and build LICENSE files
* remove non-existing target
2018-07-24 16:02:32 +02:00
Alexander Simmerl
abe5b63059
Merge pull request #2040 from tendermint/2027-socket-pv
fix acceptDeadline
2018-07-24 15:52:45 +02:00
Ethan Buchman
a657870b3d update dockerfile 2018-07-24 09:42:08 -04:00
Alexander Simmerl
7e7473ad41
Merge pull request #2044 from tendermint/2019-prometheus
do not overwrite metrics provider in node#NewNode
2018-07-24 15:41:44 +02:00
Anton Kaliaev
75a26ebd6d
do not overwrite metrics provider in node#NewNode
also, make running Prometheus server optional.

Closes #2019
2018-07-24 16:01:11 +04:00
Anton Kaliaev
ad580e2734
fix acceptDeadline
before: 1.000000003s
after: 3.000000000s

Refs #2027
2018-07-24 10:51:12 +04: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
f1093edbe2 remove accidental files 2018-07-23 23:11:53 -04:00
Ethan Buchman
b92860b6c4
Merge pull request #1805 from tendermint/jae/optimize_blockchain
Optimizing blockchain reactor.
2018-07-23 22:46:51 -04:00
Ethan Buchman
54d753e64e fix Gopkg, add changelog 2018-07-23 22:48:38 -04:00
Ethan Buchman
e1b48b16c4
Merge branch 'develop' into jae/optimize_blockchain 2018-07-23 22:16:34 -04:00
Ethan Buchman
7c07235649
Merge pull request #2036 from tendermint/master
Merge master to develop
2018-07-23 22:05:44 -04:00
Ethan Buchman
05a76fb517
Merge pull request #2029 from tendermint/release/0.22.5
Release/0.22.5
v0.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
Jae Kwon
b41b89732d
Update store.go
Revert to SetSync for saveABCIResponses() as per Ethan's feedback
2018-07-20 14:38:27 -07: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