Jae Kwon
e719a93d1d
Addressed review for #1815 except those marked as 'TODO make issue'
6 years ago
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
6 years ago
Anton Kaliaev
6a85aecfb7
fix linter issues
6 years ago
Anton Kaliaev
17e1df0cbd
test validator set more thoroughly
Refs #693
6 years ago
Zach Ramsay
44dad6d70b
Revert "detele everything"
This reverts commit d02c5d1e30
.
6 years ago
Zach Ramsay
d02c5d1e30
detele everything
6 years ago
Ethan Buchman
ec710395b7
RIPEMD160 -> SHA256
6 years ago
Ethan Buchman
d55243f0e6
fix import paths
6 years ago
Jae Kwon
8524a8da7f
Try to fix circle...
6 years ago
Jae Kwon
bf0ff212b9
Refactor "lite" to handle delayed validator set changes.
Also, fix consensus liveness issue.
6 years ago
Jae Kwon
a5b7ea93c4
Delay validator set changes by 1 block.
6 years ago
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
6 years ago
Liamsi
96a3502126
delete everything
6 years ago
Ethan Buchman
94c016a04e
use MarshalJSONIndent for init files. closes #1506
6 years ago
Anton Kaliaev
ed782e7508
include validator's voting power in /status
Refs #581
6 years ago
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)
}
}
```
6 years ago
Anton Kaliaev
39a4963782
document funcs in validator_set.go
6 years ago
Anton Kaliaev
37ce6b195a
ValidatorSet#GetByAddress: return -1 if no validator was found
6 years ago
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.
6 years ago
Jae Kwon
34974e3932
Make types use Amino; Refactor PrivValidator* to FilePV/SocketPV
6 years ago
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.
6 years ago
Ethan Buchman
ff8c648c23
types: uncomment some tests
6 years ago
Ethan Buchman
c394eef7b8
types: TestValidatorSetVerifyCommit
6 years ago
Ethan Buchman
200787ede2
types: update for new go-wire. WriteSignBytes -> SignBytes
7 years ago
Ethan Buchman
4e3488c677
update types
6 years ago
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
7 years ago
Anton Kaliaev
1339a44402
add safe*Clip funcs
7 years ago
Anton Kaliaev
69c3a7640b
add safeAdd & safeSub plus quickcheck tests
7 years ago
Anton Kaliaev
e8b0458f16
check for overflow and underflow while choosing proposer
Refs #919
7 years ago
Anton Kaliaev
10f7858453
use rand.Int63n, remove underflow check, remove unnecessary cast
7 years ago
Anton Kaliaev
922af7c405
int64 height
uint64 is considered dangerous. the details will follow in a blog post.
7 years ago
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
7 years ago
Ethan Buchman
5466720d75
minor changes from @odeke-em PR #725
7 years ago
Ethan Buchman
e76ef2a8a1
types: unexpose valset.To/FromBytes
7 years ago
Ethan Frey
94b36bb65e
Move VerifyCommitAny into the types package
7 years ago
Ethan Buchman
97e9802255
fix out of range error in VoteSet.addVote
7 years ago
Ethan Buchman
d1a00c684e
types: comments
7 years ago
Ethan Buchman
944ebccfe9
more PrivValidator interface
7 years ago
Ethan Buchman
fd1b0b997a
PrivValidator interface
7 years ago
zramsay
cf31f8d06f
core: apply megacheck vet tool (unused, gosimple, staticcheck)
7 years ago
Ethan Buchman
6d83c60c40
[types] dont hash validator.Accum
7 years ago
Ethan Frey
926fb83e33
Re-added comment
7 years ago
Ethan Frey
157ec8af2d
Add json tags to validator set
7 years ago
Ethan Buchman
d5b524e309
go-merkle -> merkleeyes/iavl and tmlibs/merkle
7 years ago
Ethan Buchman
d1926bcad1
use tmlibs
7 years ago
Ethan Buchman
5da9b3a803
postmerge
7 years ago
Ethan Buchman
0017fb7ffe
premerge
7 years ago
Ethan Buchman
b1cd677711
types: valSet LastProposer->Proposer and Proposer()->GetProposer()
7 years ago
Ethan Buchman
0fa34f7f67
fix ProposerSelection by persisting proposer
7 years ago
Ethan Buchman
de0153a1c4
consensus: some more informative logging
7 years ago