Ethan Buchman
91acc51cd1
fix test
7 years ago
Ethan Buchman
35521b553a
save historical consensus params
7 years ago
Ethan Buchman
70a744558c
types: params.Update()
7 years ago
Ethan Buchman
b5857da877
forgot file
7 years ago
Ethan Buchman
3d00c477fc
separate block vs state based validation
7 years ago
Ethan Buchman
f81025631e
update comment [ci skip]
7 years ago
Ethan Buchman
9c03c58de2
priv validator checks if only difference is timestamp; else error
7 years ago
Anton Kaliaev
0ffd60b8cf
ValidatorSetUpdates -> ValidatorUpdates
7 years ago
Ricardo Domingos
d5baa6601c
types: Add test for IsVoteTypeValid
7 years ago
Ricardo Domingos
19eeef0aad
types: Rename exampleVote to examplePrecommit on vote_test
exampleVote doesn't express the type of the vote.
7 years ago
Jae Kwon
e4b9f1abe7
Id -> ID using gogo
7 years ago
Ricardo Domingos
e76392e330
types: Update String() test to assert Prevote type
7 years ago
Anton Kaliaev
a1cc9ac642
priv validator returns last sign bytes if h/r/s matches
since now we have time in the msgs and we might crash between writing
the priv val and writing to wal.
Refs #984
7 years ago
Jae Kwon
3798f9fa8e
Reorder README
7 years ago
Jae Kwon
c14d3982ac
ValidatorSetUpdates -> ValidatorUpdates
7 years ago
Anton Kaliaev
843e1ed400
Updates -> ValidatoSetUpdates
7 years ago
Emmanuel T Odeke
811dc071aa
protoc: "//nolint: gas" directive after pb generation ( #164 )
* protoc: "//nolint: gas" directive after pb generation
Fixes #138
Since we can't add package directives through the protoc
compiler, yet we need to "//nolint: gas" the Go generated
protobuf file, added a script whose purpose is to
go find the "package (\w+)$" declaration after go fmt
was run by protoc.
The competing solutions were more complex and can be
examined by visiting
https://github.com/tendermint/abci/issues/138#issuecomment-352226217
* simplify script
* rewrite script to work on Mac
7 years ago
Anton Kaliaev
66296fe11a
updates -> validator_set_updates
ConsensusParamChanges -> ConsensusParamUpdates
7 years ago
Ethan Frey
960b25408f
Store LastConsensusHash in State as well
Update all BlockValidation that it matches the last state
7 years ago
Ethan Frey
d151e36ea8
Add ConsensusHash to header
7 years ago
Ethan Frey
a0b2d77bef
Add hash to ConsensusParams
7 years ago
Ethan Frey
030fd00232
Added tests for applying consensus param changes
7 years ago
Ethan Frey
d21f39160f
Apply ConsensusParamChanges to state/State
7 years ago
Ethan Frey
eb6d412a82
Add tests to protobuf objects for pr coverage
7 years ago
Ethan Frey
9c5e1a824d
Updated naming of EndBlock parameters
* Changes -> Updates for validators
* ConsensusParams.XXXParams -> ConsensusParams.XXX
* As per feedback from Jae on PR
7 years ago
Anton Kaliaev
72da553ed9
add missing Timestamp to Vote
Fixes #974
7 years ago
Ethan Frey
a6f719a402
Add tests for block validation
7 years ago
Ethan Frey
25f6f6518c
Update the ResponseEndBlock values
* Rename diffs -> changes
* Add consensus_param_changes
For context, see:
https://github.com/tendermint/tendermint/issues/924
https://github.com/tendermint/tendermint/issues/952
7 years ago
Ethan Frey
dedf03bb81
Add TotalTx to block header, issue #952
Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
7 years ago
Emmanuel Odeke
bbc3b807c6
all: fix vet issues with build tags, formatting
* Build tags need to come before the package name
and have at least a blank line, between them and
the package, please see
https://golang.org/pkg/go/build/#hdr-Build_Constraints
* fmt.Println doesn't take formatting verbs
* Fix a missing formatting argument to fmt.Printf
7 years ago
Ethan Buchman
310beae63c
types: check ResponseCheckTx too
7 years ago
Ethan Frey
5ffb5f01cc
Add more tests for Proposal/Vote serialization
String() and Proposal valid after serializing.
To be safe, but mainly to increase test coverage for the PR
7 years ago
Ethan Frey
8576ad58bd
Cleanup canonical json
7 years ago
Ethan Frey
c4860f6c29
Force CanonicalTime to UTC
fixes issue with vote serialization breaking the signatures
7 years ago
Ethan Frey
850310b034
Add test to isolate precommit failure
types/vote_test.go now checks signature on a serialized and
then deserialized vote. Turns out go-wire time encoding doesn't
respect timezones, and the signatures don't check out.
7 years ago
Ethan Frey
a29c781295
Add default timestamp to all instances of *types.Vote
7 years ago
Ethan Frey
599673690c
Add timestamp to vote canonical encoding
7 years ago
Ethan Frey
7deda53b7c
Add Timestamp to Proposal for issue #929
Store it as time.Timestamp locally, encode it as RFC3339 with milliseconds
before signing the canonical form.
7 years ago
Emmanuel Odeke
7167d4e4c7
types: compile type assertions to avoid sneaky runtime surprises
Ensure that the types in result.go implement both
json.Marshaler and json.Unmarshaler
and thus avoid any accidental deletions of their respective
methods which would then cause surprises at runtime.
7 years ago
Anton Kaliaev
950a64f756
bring back transparent websocket (Refs #945 )
7 years ago
Ethan Buchman
47216538fd
types: add UnmarshalJSON funcs for Response types
7 years ago
Ethan Buchman
e1ee4d6bf5
types: add MarshalJSON funcs for Response types with a Code
7 years ago
Ethan Buchman
1b2c383205
ResponseSetOption includes a response Code. Closes #64"
7 years ago
Ethan Buchman
898ae53672
types: fix for broken customtype int in gogo
7 years ago
Ethan Buchman
2b804bb5a1
remove custom type int https://github.com/gogo/protobuf/issues/359
7 years ago
Ethan Buchman
82d56571b5
types: int32 with gogo int
7 years ago
Ethan Buchman
3890a2058f
types: IsOK()
7 years ago
Ethan Buchman
388f66c9b3
types: drop uint64 from protobuf.go
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