Anton Kaliaev
5f3048bd09
call FlushSync before calling CommitSync
if we call it after, we might receive a "fresh" transaction from
`broadcast_tx_sync` before old transactions (which were not
committed).
Refs #1091
```
Commit is called with a lock on the mempool, meaning no calls to CheckTx
can start. However, since CheckTx is called async in the mempool
connection, some CheckTx might have already "sailed", when the lock is
released in the mempool and Commit proceeds.
Then, that spurious CheckTx has not yet "begun" in the ABCI app (stuck
in transport?). Instead, ABCI app manages to start to process the
Commit. Next, the spurious, "sailed" CheckTx happens in the wrong place.
```
7 years ago
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
7 years ago
Adrian Brink
32311acd01
Vulnerability in light client proxy ( #1081 )
* Vulnerability in light client proxy
When calling GetCertifiedCommit the light client proxy would call
Certify and even on error return the Commit as if it had been correctly
certified.
Now it returns the error correctly and returns an empty Commit on error.
* Improve names for clarity
The lite package now contains StaticCertifier, DynamicCertifier and
InqueringCertifier. This also changes the method receivers from one
letter to two letter names, which will make future refactoring easier
and follows the coding standards.
* Fix test failures
* Rename files
* remove dead code
7 years ago
Ethan Buchman
b9cbaf8f10
priv-val: fix timestamp for signing things that only differ by timestamp
7 years ago
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
7 years ago
Ethan Buchman
28bbeac763
state: send byzantine validators in BeginBlock
7 years ago
Ethan Buchman
cb845ebff5
fix EvidencePool and VerifyEvidence
7 years ago
Ethan Buchman
ae68fcb78a
move fireEvents to ApplyBlock
7 years ago
Ethan Buchman
f55135578c
state: move methods to funcs
7 years ago
Ethan Buchman
d0e0ac5fac
types: better error messages for votes
7 years ago
Ethan Buchman
6a4fd46479
fixes from rebase
7 years ago
Ethan Buchman
0f293bfc2b
remove some TODOs
7 years ago
Ethan Buchman
c13e93d63e
evidence: store tests and fixes
7 years ago
Ethan Buchman
cc418e5dab
state.VerifyEvidence enforces EvidenceParams.MaxAge
7 years ago
Ethan Buchman
869d873d5c
state.ApplyBlock takes evpool and calls MarkEvidenceAsCommitted
7 years ago
Ethan Buchman
3271634e7a
types: evidence cleanup
7 years ago
Ethan Buchman
7a18fa887d
evidence linked with consensus/node. compiles
7 years ago
Ethan Buchman
6c4a0f9363
cleanup evidence pkg. state.VerifyEvidence
7 years ago
Ethan Buchman
df3f4de7c3
check evidence is from validator; some cleanup
7 years ago
Ethan Buchman
10c43c9edc
introduce evidence store
7 years ago
Ethan Buchman
48d778c4b3
types/params: introduce EvidenceParams
7 years ago
Ethan Buchman
7d086e9524
check if we already have evidence
7 years ago
Ethan Buchman
6e9433c7a8
post rebase fix
7 years ago
Ethan Buchman
eeab0efa56
types: tx.go comments
7 years ago
Ethan Buchman
77e45756f2
types: Evidences for merkle hashing; Evidence.String()
7 years ago
Ethan Buchman
9cdcffbe4b
types: comments; compiles; evidence test
7 years ago
Ethan Buchman
50850cf8a2
verify sigs on both votes; note about indices
7 years ago
Ethan Buchman
35587658cd
verify evidence in block
8 years ago
Ethan Buchman
4661c98c17
add pubkey to conflicting vote evidence
8 years ago
Ethan Buchman
7928659f70
track evidence, include in block
8 years ago
Ethan Buchman
028ee58580
call it LastResultsHash
7 years ago
Ethan Buchman
73fb1c3a17
consolidate saveResults/SaveABCIResponses
7 years ago
Ethan Frey
d65234ed51
Add /block_results?height=H as rpc endpoint
Expose it in rpc client
Move ABCIResults into tendermint/types from tendermint/state
7 years ago
Ethan Frey
58c5df729b
Add ResultHash to header
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
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
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
Anton Kaliaev
843e1ed400
Updates -> ValidatoSetUpdates
7 years ago