forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use bytes representation for Certificate::aggregate_signature (Mysten…
…Labs#9697) ## Description Profiling has shown that validators spend a significant amount of CPU resources deserialising the `aggregate_signature` field in NW's `Certificate` object when read from disk. This is because signatures by default are stored as compressed points, so deserialisation needs to decompress points which is a non-trivial computation. However, in most cases the signature does not need to be verified, and in these cases the binary representation suffices. This PR replaces the `aggregate_signature` field in NW's `Certificate` object with its `AsBytes` representation, and the signature is only decompressed when the signature actually have to be verified. According to recently produced perf flame graphs, this could save ~2% CPU usage for validators. ## Test Plan Unit tests. ### Type of Change (Check all that apply) - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [X] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [X] necessitate either a data wipe or data migration
- Loading branch information
Showing
6 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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