Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/buffer reallocation #4306

Merged
merged 2 commits into from
Jul 25, 2022
Merged

Conversation

tanishqjasoria
Copy link
Contributor

Fixes
Reallocation of buffer in NettyDiscoveryHandler

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • No

@tanishqjasoria tanishqjasoria changed the base branch from master to fix/message-serializer July 22, 2022 16:42
@tanishqjasoria tanishqjasoria marked this pull request as ready for review July 22, 2022 16:44
@tanishqjasoria tanishqjasoria merged commit b52682a into fix/message-serializer Jul 25, 2022
@tanishqjasoria tanishqjasoria deleted the fix/buffer-reallocation branch July 25, 2022 09:20
tanishqjasoria added a commit that referenced this pull request Aug 3, 2022
* serialization

* reuse buffer
LukaszRozmej added a commit that referenced this pull request Aug 4, 2022
#4292)

* change to zero serializer

* fix get length

* temp change

* change to zero intializer

* update message pad

* add and use zero serializer

* use zero serializer

* update messgae serialization service

* rewrite functions to use byte buffer

* update P2P messages serializer

* update serializers

* update tests

* remove zero message serializer

* fix failing tests

* fix netty rlp has been read

* fix length calc

* fix serializers

* update

* optimize byte array allocations

* fix span creation

* remove redundant to array

* fix block body serializer

* fix receipts serializer

* Fix/buffer reallocation (#4306)

* serialization

* reuse buffer

* Fix reciepts decoder

* fix reciepts serializer

* fix zero packet splitter

* implement func to use stream encoder

* Clean up

* fix ChainLevelDecoder

* add comment

* add GetLength private to reduce length calculations

* convert all to inner serializer to use get length to allocate buffer

* Kill more allocations

* kill bit more allocations

* less allocs

* fix build

* use rlp stream

* remove rlp.encode from zeroPacketSplitter

* restore WriteAdaptivePacketType(in IByteBuffer buffer) and fix tests

* fix length calc

* Remove test console outputs

Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>
tanishqjasoria added a commit that referenced this pull request Aug 16, 2022
* serialization

* reuse buffer
tanishqjasoria added a commit that referenced this pull request Sep 16, 2022
* serialization

* reuse buffer
tanishqjasoria added a commit that referenced this pull request Oct 10, 2022
* serialization

* reuse buffer
tanishqjasoria added a commit that referenced this pull request Oct 14, 2022
* serialization

* reuse buffer
tanishqjasoria added a commit that referenced this pull request Oct 17, 2022
* serialization

* reuse buffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant