Alessio Treglia
|
8bd3d5105f
|
libs/os: remove unused aliases, add test cases (#5654)
Remove unused ReadFile (unused) and
WriteFile (almost unused, alias of ioutil.WriteFile).
Add testcases for Must{Read,Write}File.
|
4 years ago |
Marko
|
346aa14db5
|
fix lint failures with 1.31 (#5489)
|
4 years ago |
Marko
|
3e2751d274
|
lint: Enable Golint (#4212)
* Fix many golint errors
* Fix golint errors in the 'lite' package
* Don't export Pool.store
* Fix typo
* Revert unwanted changes
* Fix errors in counter package
* Fix linter errors in kvstore package
* Fix linter error in example package
* Fix error in tests package
* Fix linter errors in v2 package
* Fix linter errors in consensus package
* Fix linter errors in evidence package
* Fix linter error in fail package
* Fix linter errors in query package
* Fix linter errors in core package
* Fix linter errors in node package
* Fix linter errors in mempool package
* Fix linter error in conn package
* Fix linter errors in pex package
* Rename PEXReactor export to Reactor
* Fix linter errors in trust package
* Fix linter errors in upnp package
* Fix linter errors in p2p package
* Fix linter errors in proxy package
* Fix linter errors in mock_test package
* Fix linter error in client_test package
* Fix linter errors in coretypes package
* Fix linter errors in coregrpc package
* Fix linter errors in rpcserver package
* Fix linter errors in rpctypes package
* Fix linter errors in rpctest package
* Fix linter error in json2wal script
* Fix linter error in wal2json script
* Fix linter errors in kv package
* Fix linter error in state package
* Fix linter error in grpc_client
* Fix linter errors in types package
* Fix linter error in version package
* Fix remaining errors
* Address review comments
* Fix broken tests
* Reconcile package coregrpc
* Fix golangci bot error
* Fix new golint errors
* Fix broken reference
* Enable golint linter
* minor changes to bring golint into line
* fix failing test
* fix pex reactor naming
* address PR comments
|
5 years ago |
Marko
|
5d1459b584
|
libs/fail: clean up `fail.go` (#3785)
* Clean up `fail.go`
- Clean up fail.go
- Remove unneeded Func `FailRand()`
closes #2729
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* add in commented lines
|
5 years ago |
Ethan Buchman
|
39eba4e154
|
WAL: better errors and new fail point (#3246)
* privval: more info in errors
* wal: change Debug logs to Info
* wal: log and return error on corrupted wal instead of panicing
* fail: Exit right away instead of sending interupt
* consensus: FAIL before handling our own vote
allows to replicate #3089:
- run using `FAIL_TEST_INDEX=0`
- delete some bytes from the end of the WAL
- start normally
Results in logs like:
```
I[2019-02-03|18:12:58.225] Searching for height module=consensus wal=/Users/ethanbuchman/.tendermint/data/cs.wal/wal height=1 min=0 max=0
E[2019-02-03|18:12:58.225] Error on catchup replay. Proceeding to start ConsensusState anyway module=consensus err="failed to read data: EOF"
I[2019-02-03|18:12:58.225] Started node module=main nodeInfo="{ProtocolVersion:{P2P:6 Block:9 App:1} ID_:35e87e93f2e31f305b65a5517fd2102331b56002 ListenAddr:tcp://0.0.0.0:26656 Network:test-chain-J8JvJH Version:0.29.1 Channels:4020212223303800 Moniker:Ethans-MacBook-Pro.local Other:{TxIndex:on RPCAddress:tcp://0.0.0.0:26657}}"
E[2019-02-03|18:12:58.226] Couldn't connect to any seeds module=p2p
I[2019-02-03|18:12:59.229] Timed out module=consensus dur=998.568ms height=1 round=0 step=RoundStepNewHeight
I[2019-02-03|18:12:59.230] enterNewRound(1/0). Current: 1/0/RoundStepNewHeight module=consensus height=1 round=0
I[2019-02-03|18:12:59.230] enterPropose(1/0). Current: 1/0/RoundStepNewRound module=consensus height=1 round=0
I[2019-02-03|18:12:59.230] enterPropose: Our turn to propose module=consensus height=1 round=0 proposer=AD278B7767B05D7FBEB76207024C650988FA77D5 privValidator="PrivValidator{AD278B7767B05D7FBEB76207024C650988FA77D5 LH:1, LR:0, LS:2}"
E[2019-02-03|18:12:59.230] enterPropose: Error signing proposal module=consensus height=1 round=0 err="Error signing proposal: Step regression at height 1 round 0. Got 1, last step 2"
I[2019-02-03|18:13:02.233] Timed out module=consensus dur=3s height=1 round=0 step=RoundStepPropose
I[2019-02-03|18:13:02.233] enterPrevote(1/0). Current: 1/0/RoundStepPropose module=consensus
I[2019-02-03|18:13:02.233] enterPrevote: ProposalBlock is nil module=consensus height=1 round=0
E[2019-02-03|18:13:02.234] Error signing vote module=consensus height=1 round=0 vote="Vote{0:AD278B7767B0 1/00/1(Prevote) 000000000000 000000000000 @ 2019-02-04T02:13:02.233897Z}" err="Error signing vote: Conflicting data"
```
Notice the EOF, the step regression, and the conflicting data.
* wal: change errors to be DataCorruptionError
* exit on corrupt WAL
* fix log
* fix new line
|
6 years ago |
Zach
|
cdc252b818
|
add fail-test file instead of dep, closes #2638 (#2728)
original author of this file is @ebuchman:
https://github.com/ebuchman/fail-test
|
6 years ago |