Author | SHA1 | Message | Date |
---|---|---|---|
Marko | 41ab199378 |
blockchain/v1: add noBlockResponse handling (#5401)
## Description Add simple `NoBlockResponse` handling to blockchain reactor v1. I tested before and after with erik's e2e testing and was not able to reproduce the inability to sync after the changes were applied Closes: #5394 |
4 years ago |
Marko |
044f1bf288
|
format: add format cmd & goimport repo (#4586)
* format: add format cmd & goimport repo - replaced format command - added goimports to format command - ran goimports Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * fix outliers & undo proto file changes |
5 years ago |
Marko |
9bd0f9e634
|
lint: golint issue fixes (#4258)
* lint: golint issue fixes - on my local machine golint is a lot stricter than the bot so slowly going through and fixing things. Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * more fixes from golint * remove isPeerPersistentFn * add changelog entry |
5 years ago |
Marko |
7b52f51700
|
libs/common: Refactor libs/common 5 (#4240)
* libs/common: Refactor libs/common 5 - move mathematical functions and types out of `libs/common` to math pkg - move net functions out of `libs/common` to net pkg - move string functions out of `libs/common` to strings pkg - move async functions out of `libs/common` to async pkg - move bit functions out of `libs/common` to bits pkg - move cmap functions out of `libs/common` to cmap pkg - move os functions out of `libs/common` to os pkg Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * fix testing issues * fix tests closes #41417 woooooooooooooooooo kill the cmn pkg Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * add changelog entry * fix goimport issues * run gofmt |
5 years ago |
Marko |
afc4d7a61f
|
libs/common: refactor libs/common 2 (#4231)
* libs/common: refactor libs/common 2 - move random function to there own pkg Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * change imports and usage throughout repo * fix goimports * add changelog entry |
5 years ago |
Phil Salant | d1d517a9b7 |
linters: enable scopelint (#3963)
* Pin range scope vars * Don't disable scopelint This PR repairs linter errors seen when running the following commands: golangci-lint run --no-config --disable-all=true --enable=scopelint Contributes to #3262 |
5 years ago |
Phil Salant | 04d13d9945 |
fix linter errors thrown by `unconvert`, `goconst`, and `nakedret` (#3960)
* Remove unnecessary type conversions * Consolidate repeated strings into consts * Clothe return statements * Update blockchain/v1/reactor_fsm_test.go Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> This PR repairs linter errors seen when running the following commands: golangci-lint run --no-config --disable-all=true --enable=unconvert golangci-lint run --no-config --disable-all=true --enable=goconst golangci-lint run --no-config --disable-all=true --enable=nakedret Contributes to #3262 |
5 years ago |
Anca Zamfir | 4d7cd8055b |
blockchain: Reorg reactor (#3561)
* go routines in blockchain reactor * Added reference to the go routine diagram * Initial commit * cleanup * Undo testing_logger change, committed by mistake * Fix the test loggers * pulled some fsm code into pool.go * added pool tests * changes to the design added block requests under peer moved the request trigger in the reactor poolRoutine, triggered now by a ticker in general moved everything required for making block requests smarter in the poolRoutine added a simple map of heights to keep track of what will need to be requested next added a few more tests * send errors to FSM in a different channel than blocks send errors (RemovePeer) from switch on a different channel than the one receiving blocks renamed channels added more pool tests * more pool tests * lint errors * more tests * more tests * switch fast sync to new implementation * fixed data race in tests * cleanup * finished fsm tests * address golangci comments :) * address golangci comments :) * Added timeout on next block needed to advance * updating docs and cleanup * fix issue in test from previous cleanup * cleanup * Added termination scenarios, tests and more cleanup * small fixes to adr, comments and cleanup * Fix bug in sendRequest() If we tried to send a request to a peer not present in the switch, a missing continue statement caused the request to be blackholed in a peer that was removed and never retried. While this bug was manifesting, the reactor kept asking for other blocks that would be stored and never consumed. Added the number of unconsumed blocks in the math for requesting blocks ahead of current processing height so eventually there will be no more blocks requested until the already received ones are consumed. * remove bpPeer's didTimeout field * Use distinct err codes for peer timeout and FSM timeouts * Don't allow peers to update with lower height * review comments from Ethan and Zarko * some cleanup, renaming, comments * Move block execution in separate goroutine * Remove pool's numPending * review comments * fix lint, remove old blockchain reactor and duplicates in fsm tests * small reorg around peer after review comments * add the reactor spec * verify block only once * review comments * change to int for max number of pending requests * cleanup and godoc * Add configuration flag fast sync version * golangci fixes * fix config template * move both reactor versions under blockchain * cleanup, golint, renaming stuff * updated documentation, fixed more golint warnings * integrate with behavior package * sync with master * gofmt * add changelog_pending entry * move to improvments * suggestion to changelog entry |
6 years ago |