-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate block hashes instead of full blocks (network breaking)
- Nodes propagate a block hash (`NewBlock` message = 33 bytes) instead of the full block. This will significantly reduce network bandwidth usage for block propagation. - On receipt of a block hash a node checks if it has the block. If so, it simply ignores the message. Otherwise, it requests the full block from the peer that sent the `NewBlock` message. If the block is valid and has been added to the node's blockchain db, the node propagates the block hash message to other peers. - Change block propagate test to tests a few block hashes being propagated rather than a single block. - Changed invalid block test to check that an invalid block is not proagated. - New test to check that an invalid block hash is not propagated - Cleaned up some unecessary generics on structs
- Loading branch information
Showing
28 changed files
with
476 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.