-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(consensus): simplify
IngressPayload
implementation (#3444)
Currently the payload is one big bytes buffer which contains all ingress messages in a packed representation. This makes it a big hard to work with. In this PR we simplify the structure by replacing the buffer with a map from `IngressMessageId`s to a _serialized_ ingress messages. The following two important properties are preserved: 1. The individual ingress messages deserialization is delayed until it's actually needed 2. We preserve the original byte representation of the ingress messages I've ran multiple benchmarks and didn't notice a _big_ change: 1. `consensus-performance` system test showed the same throughput / block rates with both implementations 2. the [serialization/deserialization ](https://github.com/dfinity/ic/blob/master/rs/consensus/benches/validate_payload.rs#L374-L404) of ingress payload gets about 2x slower, but it's still in sub 1ms territory --------- Co-authored-by: Leon Tan <[email protected]>
- Loading branch information
1 parent
2828131
commit f491f84
Showing
13 changed files
with
174 additions
and
180 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
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.
Comment in line 83 may need tweaking.