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

Use CCF encoding when requesting events from AccessAPI #501

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

peterargue
Copy link
Contributor

@peterargue peterargue commented Oct 30, 2023

Closes: #500

Description

The AccessAPI recently added support for specifying the encoding for events returned in the request. CCF encoding is significantly more compact and includes additional information that can't be included in JSON-CDC format.

This PR updates all gRPC calls to endpoints that support CCF encoding to use the new format, and handles conversion to the original cadence object. The change should be transparent to the caller, except that less data is transported over the web.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link
Contributor

@sideninja sideninja left a comment

Choose a reason for hiding this comment

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

nice

@codecov-commenter
Copy link

Codecov Report

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

Comparison is base (79491cf) 61.23% compared to head (2176c78) 61.25%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
+ Coverage   61.23%   61.25%   +0.01%     
==========================================
  Files          26       26              
  Lines        3312     3324      +12     
==========================================
+ Hits         2028     2036       +8     
- Misses       1112     1115       +3     
- Partials      172      173       +1     
Flag Coverage Δ
unittests 61.25% <66.66%> (+0.01%) ⬆️

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

Files Coverage Δ
access/grpc/grpc.go 79.79% <78.57%> (+<0.01%) ⬆️
access/grpc/convert.go 83.82% <50.00%> (-0.47%) ⬇️

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

@peterargue
Copy link
Contributor Author

I tried this out against the mainnet today after the spork and seems to be working as expected

@peterargue peterargue merged commit 362ca2c into master Nov 9, 2023
1 check passed
@peterargue peterargue deleted the petera/support-ccf-encoded-events branch November 9, 2023 00:21
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.

Add support for CCF encoded events
4 participants