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

feat: re-export c-kzg types and impl rlp traits #4084

Merged
merged 5 commits into from
Aug 7, 2023
Merged

feat: re-export c-kzg types and impl rlp traits #4084

merged 5 commits into from
Aug 7, 2023

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Aug 5, 2023

This re-exports the c-kzg crate in reth-primitives in the kzg module, also implementing Encodable and Decodable

@Rjected Rjected added C-enhancement New feature or request M-eip This change relates to the implementation of an EIP E-cancun Related to the Cancun network upgrade labels Aug 5, 2023
@Rjected Rjected requested a review from gakonst as a code owner August 5, 2023 18:59
@Rjected Rjected requested a review from mattsse August 5, 2023 18:59
@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #4084 (970cc3c) into main (64c8dd2) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/primitives/src/lib.rs 100.00% <ø> (ø)
crates/rlp/src/encode.rs 89.62% <0.00%> (-7.57%) ⬇️

... and 6 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.56% <0.00%> (-0.01%) ⬇️
unit-tests 64.00% <0.00%> (-0.04%) ⬇️

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

Components Coverage Δ
reth binary 25.52% <ø> (ø)
blockchain tree 83.04% <ø> (ø)
pipeline 90.07% <ø> (ø)
storage (db) 74.59% <ø> (ø)
trie 94.70% <ø> (ø)
txpool 48.24% <ø> (ø)
networking 77.40% <ø> (-0.04%) ⬇️
rpc 57.54% <ø> (ø)
consensus 63.97% <ø> (ø)
revm 32.53% <ø> (ø)
payload builder 6.57% <ø> (ø)
primitives 87.79% <0.00%> (-0.26%) ⬇️

Comment on lines 21 to 22
# for eip-4844
c-kzg = { git = "https://github.com/ethereum/c-kzg-4844", optional = true }
Copy link
Collaborator

Choose a reason for hiding this comment

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

@DaniPopes wdyt here, how would this affect migration to alloy-rlp?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's just wrappers for byte arrays so it should be fine, but in general i don't think it's the rlp's crate job to provide implementations for external types

Copy link
Collaborator

Choose a reason for hiding this comment

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

the only other feasible solution would be to use wrapper types in reth which I think is messier

we could try to add it to the c-kzg repo itself eventually

Comment on lines 34 to 35
# for eip-4844
c-kzg = { git = "https://github.com/ethereum/c-kzg-4844" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's move to workspace dep

Copy link
Member Author

Choose a reason for hiding this comment

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

makes sense, changed

@Rjected Rjected added this pull request to the merge queue Aug 7, 2023
Merged via the queue into main with commit 310179a Aug 7, 2023
25 checks passed
@Rjected Rjected deleted the dan/kzg-rlp branch August 7, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request E-cancun Related to the Cancun network upgrade M-eip This change relates to the implementation of an EIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants