Avoid Cloning When Creating a New Gossip Message#14201
Merged
Merged
Conversation
terencechain
approved these changes
Jul 10, 2024
saolyn
pushed a commit
that referenced
this pull request
Jul 17, 2024
* Add Current Changes * add back check * Avoid a Panic
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 19, 2024
* add http endpoint * add tests * Gaz * Add pointers * add endpoint to test * Electra: EIP-7251 Update `process_voluntary_exit` (#14176) * Electra: EIP-7251 Update `process_voluntary_exit` * Add unit test for VerifyExitAndSignature EIP-7251 * @potuz peer feedback * Avoid Cloning When Creating a New Gossip Message (#14201) * Add Current Changes * add back check * Avoid a Panic * fix: Multiple network flags should prevent the BN to start (#14169) * Implement Initial Logic * Include check in main.go * Add tests for multiple flags * remove usage of append * remove config/features dependency * Move ValidateNetworkFlags to config/features * Nit * removed NetworkFlags from cmd * remove usage of empty string literal * add comment * add flag validation to prysctl validator-exit --------- Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com> * fix tests * Radek' review + tests * fix tests * Radek' review * forgot one * almost forgot the tests --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: kira <shyampkira@gmail.com> Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Optimization
What does this PR do? Why is it needed?
Instead of performing a protobuf clone operation from our base message map, we simply replace it with a method which generates a new message each time. Doing this is significantly cheaper rather than an expensive clone operation on an empty message each time.
Which issues(s) does this PR fix?
N.A
Other notes for review