Skip to content

Avoid Cloning When Creating a New Gossip Message#14201

Merged
nisdas merged 3 commits into
developfrom
avoidProtoCloning
Jul 10, 2024
Merged

Avoid Cloning When Creating a New Gossip Message#14201
nisdas merged 3 commits into
developfrom
avoidProtoCloning

Conversation

@nisdas
Copy link
Copy Markdown
Contributor

@nisdas nisdas commented Jul 10, 2024

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

@nisdas nisdas requested a review from a team as a code owner July 10, 2024 05:09
@nisdas nisdas changed the title Avoid Cloning When Creating a New Gossip Object Avoid Cloning When Creating a New Gossip Message Jul 10, 2024
@nisdas nisdas enabled auto-merge July 10, 2024 05:44
@nisdas nisdas added this pull request to the merge queue Jul 10, 2024
Merged via the queue into develop with commit f8950c8 Jul 10, 2024
@nisdas nisdas deleted the avoidProtoCloning branch July 10, 2024 05:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants