This repository has been archived by the owner on May 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assert continuity when reassmbling blocks, transactions, and events from
StreamEvents. When serialising BlockExecutions into StreamEvents it is possible that we do not detect dropped SteamEvents when deserialising (consuming) the SteamEvents later. This PR makes the StreamEvent consumers, namely: ConsumeBlockExecutions, BlockAccumulator, and TxStack throw errors if there is an incorrect number of events streamed within each container (BlockExecution or TxExecution). To do this a checksum NumTxs and NumEvents is added to BeginBlock and BeginTx respectively. This allows Vent to crash if it sees an invalid stream (for example due to messages being dropped due to load on Burrow's event emitter) or a transport issue. Vent can then restart from its previous good offset. Annoyance: I had to add in Predecessor to the BlockExecution and BeginBlock messages in order to track the previous _expected_ block since we do not store empty blocks in state to avoid changing the AppHash (which itself is just a workaround for an outstanding issue in tendermint tendermint/tendermint#1909) This PR was in response to suspected event drops in Vent in production. Signed-off-by: Silas Davis <silas@monax.io>
- Loading branch information
1 parent
69b2160
commit 1395263
Showing
34 changed files
with
834 additions
and
314 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
Large diffs are not rendered by default.
Oops, something went wrong.
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.