Commit Graph

6692 Commits

Author SHA1 Message Date
Ethan Buchman 8bd514d9fb update changelog 2018-08-05 15:55:48 -04:00
ValarDragon f903947ff3 crypto: Remove interface from crypto.Signature
Signatures are now []byte, which saves on the number of bytes after
amino encoding

(squash this) address Ismail's comment
2018-08-05 15:46:57 -04:00
Ethan Buchman ea67fb55eb
Merge pull request #2106 from tendermint/1134-add-proposer-to-the-block
add proposer address to block's Header
2018-08-05 15:18:42 -04:00
Ethan Buchman e1062a657f fixes for ProposerAddress
- state.MakeBlock takes a proposerAddr
- validateBlock only checks that the ProposerAddress is in the validator
  set
- fix raceyness from bad proposer test:
  - use privValidator to get the proposer address (instead of racy
    state)
  - note we had to remove the test that checked the correct proposer was
    included for higher rounds because we don't have a good way to test
    this with multiple consensus states and not using the
    privValidator.Address while calling createProposalBlock was a hack!
2018-08-05 15:19:21 -04:00
Ethan Buchman 4d998b7c03 consensus: failing test for ProposerAddress 2018-08-05 15:17:43 -04:00
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 06a157ad06
Merge pull request #1815 from tendermint/jae/literefactor4
ValidatorSet change delayed by 1 block, and lite refactor (#2)
2018-08-05 14:54:07 -04:00
Dev Ojha d6a666b445 p2p/pex: Fix mismatch between dialseeds and checkseeds. (#2151) 2018-08-05 14:47:01 -04:00
Ethan Buchman c5c2b9601f update changelog and version 2018-08-05 14:14:56 -04:00
Ethan Buchman 7538864c15
Merge branch 'develop' into jae/literefactor4 2018-08-05 13:51:41 -04:00
Ethan Buchman 279259ec8e adr-018: abci validators 2018-08-05 12:45:27 -04:00
Ethan Buchman ca9d07e5e4 update deps for amaino v0.12.0-rc0 2018-08-05 12:39:08 -04:00
Dev Ojha 6e3c5e8033 p2p/pex: Allow configured seed nodes to not be resolvable over DNS (#2129)
* p2p/pex: Allow configured seed nodes to be offline

Previously you couldn't startup tendermint if a seed node was offline.
This now allows you to startup tendermint, as long as all seed node addresses
are formatted correctly. In the event that all seed nodes are down,
and the address book is empty, then it crashes with an informative error msg.
(This case doesn't occur if no seeds were specified)

Closes #1716

* (Squash this) Address melekes' comments

* (squash this) fix package imports

* (squash this) fix pex_reactor comment

* (squash this) add a test case
2018-08-04 20:35:08 -04:00
Ethan Buchman 8073e51b04
Merge pull request #2096 from tendermint/dev/adr_symmetric
[ADR] Proposal for encoding symmetric cryptography
2018-08-04 20:27:24 -04:00
Ethan Buchman 3161ebbc2f
Merge pull request #2091 from tendermint/dev/adr_secp_signatures
[ADR] Fix malleability problems in Secp256k1 signatures
2018-08-04 20:22:56 -04:00
Ethan Buchman 4cbeb30da2
Merge pull request #2136 from tendermint/1944-update-grpc
update genproto
2018-08-03 23:40:21 -04:00
Ethan Buchman d5b5e5a2e4
Merge pull request #2135 from tendermint/2072-unresponsive-tm-after-cs-failure
consensus: non-responsive to CTRL-C if consensus state panics
2018-08-03 23:39:25 -04:00
ValarDragon 6691492540 (squash this) indicate what Ethereum does 2018-08-03 17:49:46 -07:00
Ethan Buchman 0f80a7da82 adr: chain-versions 2018-08-03 20:23:37 -04:00
Ethan Buchman ae2238efe6 adr: protocol versioning 2018-08-03 20:21:40 -04:00
Anton Kaliaev 2878c7523f
update github bug report template (#2131) 2018-08-03 11:39:57 +04:00
Anton Kaliaev b1cff0f9bf
[libs/autofile] create a Group ticker on Start
1) no need to stop the ticker in createTestGroup() method
2) now there is a symmetry - we start the ticker in OnStart(), we stop it
in OnStop()

Refs #2072
2018-08-03 11:34:58 +04:00
Anton Kaliaev d09a3a6d3a
stop gracefully instead of trying to resume ops
Refs #2072

We most probably shouldn't be running any further when there is some
unexpected panic. Some unknown error happened, and so we don't know if
that will result in the validator signing an invalid thing. It might be
worthwhile to explore a mechanism for manual resuming via some console
or secure RPC system, but for now, halting the chain upon unexpected
consensus bugs sounds like the better option.
2018-08-03 11:24:55 +04:00
ValarDragon 87f09adeec (Squash this) Be more explicit about the exact encoding of the secp signature 2018-08-02 23:27:16 -07:00
ValarDragon b3a3c8a192 Merge remote-tracking branch 'origin/develop' into dev/adr_secp_signatures 2018-08-02 23:25:14 -07:00
ValarDragon 96fdec0fca crypto: Add compact bit array for intended usage in the multisig
This is in a separate PR for ease of review.
2018-08-02 23:18:09 -07:00
Ethan Buchman fe5e7808f2 fix Gopkg.lock 2018-08-02 19:15:32 -04:00
Ethan Buchman 2d1c5a1ce6 Merge remote-tracking branch 'origin/develop' into jae/literefactor4 2018-08-02 19:12:22 -04:00
Ethan Buchman 00ebdcd581 update pending changelog 2018-08-02 19:06:29 -04:00
Ethan Buchman 2487210414
Merge pull request #2097 from tendermint/1772-revert
revert "make `/status` RPC endpoint resistant to consensus halt"
2018-08-02 17:31:07 -04:00
ValarDragon a040c36dfb (squash this) change adr number, remove redundancy in function names 2018-08-02 10:43:47 -07:00
Anton Kaliaev d579f4c610
update genproto
Closes #1944
2018-08-02 17:54:55 +04:00
Anton Kaliaev b82138b002
update changelog 2018-08-02 16:48:12 +04:00
Anton Kaliaev 8ed99c2c13
exit from initSighupWatcher child goroutine
also, remove excessive log message

Refs #2072
2018-08-02 16:42:25 +04:00
Anton Kaliaev 4c5a143a70
respawn receiveRoutine so we can properly exit
Closes #2072
2018-08-02 16:36:28 +04:00
Anton Kaliaev b33f73eaf1
stop autofile and autogroup properly
NOTE: from the ticker#Stop documentation:

```
Stop does not close the channel, to prevent a read from the channel
succeeding incorrectly.
https://golang.org/src/time/tick.go?s=1318:1341#L35
```

Refs #2072
2018-08-02 16:33:34 +04:00
Jae Kwon e719a93d1d Addressed review for #1815 except those marked as 'TODO make issue' 2018-08-02 03:10:50 -07:00
Jae Kwon eb9b37e196 Pull out consensus liveness fix, which went to #1815 2018-08-02 01:59:46 -07:00
Dev Ojha eaa137512c adr: Encoding for cryptography at launch (#2121) 2018-08-01 18:19:21 -04:00
Dev Ojha 023bb99eb0 p2p: Add test vectors for deriving secrets (#2120)
These test vectors are needed for comparison with the Rust implementation.
To implement this effectively, a "RandBool" method was added to cmn.Rand.
2018-08-01 15:06:29 -04:00
Anton Kaliaev f2f53442c6
reorder `BaseConfig` according to generated version
also, add `priv_validator_laddr` to the template
2018-08-01 16:20:59 +04:00
Ismail Khoffi 24ae878b9f update encoding test to how amino skips empty pointers 2018-08-01 13:29:41 +02:00
Jae Kwon 619bb3b2d7 Merge remote-tracking branch 'remotes/origin/jae/literefactor5' into jae/literefactor6 2018-08-01 03:06:00 -07:00
Dev Ojha dde96b75ce abci: Update readme for building protoc (#2124) 2018-08-01 13:57:31 +04:00
Dev Ojha 6fb2f44cc3 p2p: Connect to peers from a seed node immediately (#2115)
This is to reduce wait times when initially connecting. This still runs checks
such as whether you still want additional peers.

A test case has been created, which fails if this change is not included.
2018-07-31 22:09:01 +02:00
Zarko Milosevic 08ad162daa docs: Modify blockchain spec to reflect validator set changes (#2107) 2018-07-31 20:19:57 +02:00
ValarDragon a83eed104c libs/cmn: Remove Tempfile, Tempdir, switch to ioutil variants (#2114)
Our Tempfile was just a wrapper on ioutil that panicked instead of error.

Our Tempdir was a less safe variant of ioutil's Tempdir.
2018-07-31 19:43:36 +02:00
ValarDragon be642754f5 libs/cmn/writefileatomic: Handle file already exists gracefully (#2113)
This uses the stdlib's method of creating a tempfile in our write
file atomimc method, with a few modifications. We use a 64 bit number
rather than 32 bit, and therefore a corresponding LCG. This is to
reduce collision probability. (Note we currently used 32 bytes previously,
so this is likely a concern)

We handle reseeding the LCG in such a way that multiple threads are
even less likely to reuse the same seed.
2018-07-31 19:43:36 +02:00
ValarDragon 2608249e5b libs/common: Refactor tempfile code into its own file 2018-07-31 19:43:36 +02:00
Anton Kaliaev 62b8ee270d [docs] Validator's address can be skipped (#2117)
Refs #1712
2018-07-31 18:28:19 +02:00