Jae Kwon
e719a93d1d
Addressed review for #1815 except those marked as 'TODO make issue'
2018-08-02 03:10:50 -07:00
Ethan Buchman
ea31c4836a
Merge branch 'develop' into jae/literefactor4
2018-07-23 23:28:14 -04:00
Anton Kaliaev
6a85aecfb7
fix linter issues
2018-07-12 22:40:07 +04:00
Anton Kaliaev
17e1df0cbd
test validator set more thoroughly
...
Refs #693
2018-07-12 22:40:06 +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
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
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
94c016a04e
use MarshalJSONIndent for init files. closes #1506
2018-04-26 21:32:18 -04:00
Ethan Buchman
c170800fbd
Merge branch 'develop' into jae/aminoify
2018-04-07 16:16:53 +03:00
Anton Kaliaev
ed782e7508
include validator's voting power in /status
...
Refs #581
2018-04-04 11:34:59 +02:00
Anton Kaliaev
0732526465
use more relaxing < and >= ops instead of !=
...
an example of Search from godocs:
```
package main
import (
"fmt"
"sort"
)
func main() {
a := []int{1, 3, 6, 10, 15, 21, 28, 36, 45, 55}
x := 6
i := sort.Search(len(a), func(i int) bool { return a[i] >= x })
if i < len(a) && a[i] == x {
fmt.Printf("found %d at index %d in %v\n", x, i, a)
} else {
fmt.Printf("%d not found in %v\n", x, a)
}
}
```
2018-04-04 10:42:35 +02:00
Anton Kaliaev
39a4963782
document funcs in validator_set.go
2018-04-04 10:42:35 +02:00
Anton Kaliaev
37ce6b195a
ValidatorSet#GetByAddress: return -1 if no validator was found
2018-04-04 10:42:34 +02: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
Jae Kwon
34974e3932
Make types use Amino; Refactor PrivValidator* to FilePV/SocketPV
2018-03-31 00:18:43 +02:00
Eugene Chung
34f5d439ee
remove Heap.Update() call when setting Proposer field
...
In for loop of IncrementAccum(), Heap.Update() call is unnecessary when i == times - 1.
2018-03-28 12:58:53 +09:00
Ethan Buchman
ff8c648c23
types: uncomment some tests
2018-03-02 09:26:37 -05:00
Ethan Buchman
c394eef7b8
types: TestValidatorSetVerifyCommit
2018-03-02 04:21:23 -05:00
Ethan Buchman
200787ede2
types: update for new go-wire. WriteSignBytes -> SignBytes
2018-03-02 01:25:54 -05:00
Ethan Buchman
4e3488c677
update types
2018-02-03 03:23:10 -05:00
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
2018-01-21 13:32:04 -05:00
Anton Kaliaev
1339a44402
add safe*Clip funcs
2017-12-26 14:13:12 -06:00
Anton Kaliaev
69c3a7640b
add safeAdd & safeSub plus quickcheck tests
2017-12-25 18:39:14 -06:00
Anton Kaliaev
e8b0458f16
check for overflow and underflow while choosing proposer
...
Refs #919
2017-12-25 18:39:14 -06:00
Anton Kaliaev
10f7858453
use rand.Int63n, remove underflow check, remove unnecessary cast
2017-12-01 19:22:18 -06:00
Anton Kaliaev
922af7c405
int64 height
...
uint64 is considered dangerous. the details will follow in a blog post.
2017-12-01 19:04:53 -06:00
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
2017-12-01 17:17:22 -05:00
Ethan Buchman
5466720d75
minor changes from @odeke-em PR #725
2017-10-31 15:32:07 -04:00
Ethan Buchman
e76ef2a8a1
types: unexpose valset.To/FromBytes
2017-10-26 00:27:02 -04:00
Ethan Frey
94b36bb65e
Move VerifyCommitAny into the types package
2017-10-25 16:13:04 +02:00
Ethan Buchman
97e9802255
fix out of range error in VoteSet.addVote
2017-10-02 23:34:06 -04:00
Ethan Buchman
d1a00c684e
types: comments
2017-09-22 12:00:37 -04:00
Ethan Buchman
944ebccfe9
more PrivValidator interface
2017-09-21 15:51:20 -04:00
Ethan Buchman
fd1b0b997a
PrivValidator interface
2017-09-21 15:51:20 -04:00
zramsay
cf31f8d06f
core: apply megacheck vet tool (unused, gosimple, staticcheck)
2017-05-29 23:11:40 -04:00
Ethan Buchman
6d83c60c40
[types] dont hash validator.Accum
2017-05-17 00:16:38 +02:00
Ethan Frey
926fb83e33
Re-added comment
2017-05-14 19:10:58 +02:00
Ethan Frey
157ec8af2d
Add json tags to validator set
2017-05-14 19:06:33 +02: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
b1cd677711
types: valSet LastProposer->Proposer and Proposer()->GetProposer()
2017-03-05 23:28:42 -05:00
Ethan Buchman
0fa34f7f67
fix ProposerSelection by persisting proposer
2017-03-05 19:45:24 -05:00
Ethan Buchman
de0153a1c4
consensus: some more informative logging
2017-03-05 02:15:46 -05:00
Jae Kwon
67ab574e98
Cleanup, add stub for VerifyCommitAny
2017-01-29 13:50:53 -08:00