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

perf(provider): add metadata provider using SSTORE2 #275

Closed
wants to merge 9 commits into from

Conversation

0xble
Copy link
Collaborator

@0xble 0xble commented Aug 23, 2023

Link T-3200

After writing 32 bytes using SSTORE2 vs SSTORE becomes the cheaper option.

Size (bytes) SSTORE SSTORE2 Savings
0 2,660 35,323 0.08x
2 22,607 35,819 0.63x
32 44,810 41,891 1.07x
33 66,980 42,187 1.59x
64 66,980 48,459 1.38x
96 89,150 55,027 1.62x
128 111,320 61,595 1.81x
256 200,000 87,869 2.28x
512 377,360 140,417 2.69x
1024 732,080 245,522 2.98x
24576 13,878,890 4,148,020 3.35x

@height
Copy link

height bot commented Aug 23, 2023

This pull request has been linked to 1 task:

💡Tip: Add "Close T-3200" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

@0xble 0xble marked this pull request as draft August 23, 2023 20:39
@arr00
Copy link
Contributor

arr00 commented Aug 24, 2023

This metadata provider won't be compatible with the factory in it's current state. Would result in some overhead for frontend to migrate support.

@0xble
Copy link
Collaborator Author

0xble commented Aug 24, 2023

This metadata provider won't be compatible with the factory in it's current state. Would result in some overhead for frontend to migrate support.

Good point. Fixed.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Patch coverage: 80.95% and project coverage change: +0.16% 🎉

Comparison is base (174806d) 60.66% compared to head (6b135aa) 60.83%.
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #275      +/-   ##
==========================================
+ Coverage   60.66%   60.83%   +0.16%     
==========================================
  Files          63       64       +1     
  Lines        2489     2510      +21     
  Branches      580      583       +3     
==========================================
+ Hits         1510     1527      +17     
- Misses        779      783       +4     
  Partials      200      200              
Files Changed Coverage Δ
contracts/renderers/SSTORE2MetadataProvider.sol 80.95% <80.95%> (ø)

... and 1 file with indirect coverage changes

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

@0xble 0xble marked this pull request as ready for review August 29, 2023 20:07
@arr00
Copy link
Contributor

arr00 commented Sep 10, 2023

Closed in favor of #283

@arr00 arr00 closed this Sep 10, 2023
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.

3 participants