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

4844: blob encoding version 2 #8827

Merged

Conversation

angel-ding-cb
Copy link
Contributor

Description

This is the implementation based on the 2nd version of blob encoding spec.

Tests

Tested small and large data inputs, as well as edge cases.

Metadata

@roberto-bayardo roberto-bayardo force-pushed the blob_encoding_2 branch 18 times, most recently from bbacb98 to a58011d Compare January 4, 2024 05:19
@roberto-bayardo roberto-bayardo force-pushed the blob_encoding_2 branch 3 times, most recently from 7871335 to 7ae1140 Compare January 4, 2024 20:58
op-service/eth/blob.go Outdated Show resolved Hide resolved
op-service/eth/blob.go Outdated Show resolved Hide resolved
op-service/eth/blob.go Outdated Show resolved Hide resolved
op-service/Makefile Outdated Show resolved Hide resolved
@tynes tynes changed the title blob encoding version 2 4844: blob encoding version 2 Jan 4, 2024
Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

The parsing looks pretty good to me & I like the round trip tests. One class of tests I'd like to see is a one way test or test vectors. i.e. Given a known input data, we should expect it to yield a known output. We should check both ways (i.e. given some data, expect a blob output & given a blob, expect some data), but it's nice to have the specific output which can manually be verified.

@roberto-bayardo
Copy link
Collaborator

roberto-bayardo commented Jan 6, 2024

One class of tests I'd like to see is a one way test or test vectors. i.e. Given a known input data, we should expect it to yield a known output. We should check both ways (i.e. given some data, expect a blob output & given a blob, expect some data), but it's nice to have the specific output which can manually be verified.

OK to add test vectors as a followup PR? I created an issue for it to make sure it doesn't get dropped and added a TODO referencing it in blob_test.go.

- use testify/require for testing
- improve big blob test case
- some performance improvements
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5dcab86) 34.85% compared to head (bd58910) 34.81%.
Report is 14 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8827      +/-   ##
===========================================
- Coverage    34.85%   34.81%   -0.05%     
===========================================
  Files          165      165              
  Lines         7106     7106              
  Branches      1198     1198              
===========================================
- Hits          2477     2474       -3     
- Misses        4477     4482       +5     
+ Partials       152      150       -2     
Flag Coverage Δ
cannon-go-tests 63.48% <ø> (ø)
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests 26.74% <ø> (ø)
contracts-bedrock-tests 20.67% <ø> (-0.15%) ⬇️
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-next-tests 42.08% <ø> (ø)
sdk-tests 42.08% <ø> (ø)

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

see 3 files with indirect coverage changes

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

Doing 1 way tests is ok as a follow up

op-service/eth/blob.go Outdated Show resolved Hide resolved
@protolambda protolambda added this pull request to the merge queue Jan 8, 2024
Merged via the queue into ethereum-optimism:develop with commit 721a24d Jan 8, 2024
64 checks passed
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

5 participants