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

build: CompressedDataSubmitter #331

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

antoncoding
Copy link
Contributor

@antoncoding antoncoding commented Dec 29, 2023

Summary

  • Submitter contract that use compressed managerData.
  • We can either use it directly or as part of submitTransfer with the IDataReceiver interface.
  • This contract decode the compressed managerData bytes, encode it into array of FeedData -> encode as bytes, and update a list of "feeds" with the data.
  • Use a IDecoder interface to allow different feeds to further encode feed data differently

Details

  • Feed and signer addresses are replaces with ids to save space
  • VolFeedDecoder is an example of how we can use the decoder

Todo

  • Replace ManagerData array with manual encoding: (1408 bytes -> 1099 bytes)
  • Replace FeedData with manual encoding (1099 bytes -> 351 bytes)
  • benchmark: 1 signer, updating 2 spot feeds
  • VolFeed: using vol feed decoder => further decode from 288 bytes of "vol feed info" into 86 bytes

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Add natspec for all functions / parameters
  • Ran forge snapshot
  • Ran forge fmt
  • Ran forge test
  • 100% test coverage on code changes

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fbd3701) 97.94% compared to head (1df382c) 97.96%.

Files Patch % Lines
src/periphery/CompressedSubmitter.sol 97.72% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
+ Coverage   97.94%   97.96%   +0.01%     
==========================================
  Files          31       33       +2     
  Lines        1512     1575      +63     
  Branches      278      279       +1     
==========================================
+ Hits         1481     1543      +62     
  Misses          3        3              
- Partials       28       29       +1     

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

@antoncoding antoncoding changed the title Fix/data compressor build: CompressedDataSubmitter Dec 29, 2023
Base automatically changed from chore/lint to master January 3, 2024 06:03
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.

None yet

1 participant