[blockchain] respond with nil on block request to indicate no block (…#540
[blockchain] respond with nil on block request to indicate no block (…#540
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #540 +/- ##
==========================================
+ Coverage 53.84% 54.2% +0.35%
==========================================
Files 76 76
Lines 7941 7940 -1
==========================================
+ Hits 4276 4304 +28
+ Misses 3306 3278 -28
+ Partials 359 358 -1 |
|
I'm not sure about this, since I think the reactor is designed so this doesn't happen. If it does happen, it might be a sign of a malicious peer. @jaekwon ? |
|
This can help with debugging. But lets also add information about the block, so bcBlockResponseMessage includes a height, and nil means we don't have it yet. Or, we can maybe create a new message, like bcNoBlockMessage |
|
Lets also add a comment to note that according to Tendermint spec, if all nodes are honest, it shouldn't happen. |
|
what's this blocking on? Looks like only addressing jae's last comment (of adding a comment). @melekes can you add the comment? |
|
lets add the @odeke-em want to take a stab at this ? |
|
@ebuchman for sure, I can take a stab at it, thanks for the tag. |
|
Closing in favour of #648 |
Fixes tendermint#514 Replaces tendermint#540 If a peer requests a block with a height that we don't have respond with a bcNoBlockResponseMessage. However, according to the Tendermint spec, if all nodes are honest this condition shouldn't occur, so this is a possible hint of an dishonest node.
* proto changes, first version * Fix usage of `SignedLastBlock` * make proto-gen * Update proto/tendermint/abci/types.proto Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com> --------- Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
…Refs #514)