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

Add Payload.Address() to allow migrations, etc. to reduce overhead #5948

Merged
merged 3 commits into from
May 17, 2024

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented May 17, 2024

This PR adds Payload.Address() to extract and return payload address. This can be used (e.g. by migrations) to reduce overhead of extracting address from payload key.

Discussion 🧵 #5942 (comment)

@fxamacker fxamacker added the enhancement New feature or request label May 17, 2024
@fxamacker fxamacker requested review from a team May 17, 2024 19:22
@fxamacker fxamacker self-assigned this May 17, 2024
This commit adds Payload.Address(). It can be used by programs
to reduce overhead of extracting address from payload key.
@fxamacker fxamacker force-pushed the fxamacker/add-payload-address-func branch from 056cbc8 to eaac808 Compare May 17, 2024 19:23
@fxamacker fxamacker changed the title Add Payload.Address() to allow migrations, etc. to avoid overhead Add Payload.Address() to allow migrations, etc. to reduce overhead May 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 71.15385% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 55.80%. Comparing base (77de1a5) to head (53c94b2).
Report is 3 commits behind head on master.

Files Patch % Lines
ledger/trie_encoder.go 63.88% 8 Missing and 5 partials ⚠️
ledger/trie.go 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5948      +/-   ##
==========================================
+ Coverage   55.78%   55.80%   +0.01%     
==========================================
  Files        1128     1128              
  Lines       88977    88996      +19     
==========================================
+ Hits        49636    49662      +26     
+ Misses      34599    34591       -8     
- Partials     4742     4743       +1     
Flag Coverage Δ
unittests 55.80% <71.15%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This reduces overhead of decoding and creating payload key.
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great refactor and improvement! 👏

@fxamacker fxamacker requested a review from peterargue as a code owner May 17, 2024 19:49
@fxamacker fxamacker force-pushed the fxamacker/add-payload-address-func branch from bd91739 to 53c94b2 Compare May 17, 2024 20:02
@turbolent turbolent enabled auto-merge May 17, 2024 20:04
@turbolent turbolent added this pull request to the merge queue May 17, 2024
Merged via the queue into master with commit 55f862b May 17, 2024
55 checks passed
@turbolent turbolent deleted the fxamacker/add-payload-address-func branch May 17, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants