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

chore: add common crate for project wide definitions #500

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

atanmarko
Copy link
Member

Resolves #261

@atanmarko atanmarko self-assigned this Aug 15, 2024
@atanmarko atanmarko marked this pull request as draft August 15, 2024 13:29
@github-actions github-actions bot added crate: trace_decoder Anything related to the trace_decoder crate. crate: mpt_trie Anything related to the mpt_trie crate. labels Aug 15, 2024
Copy link
Contributor

@0xaatif 0xaatif left a comment

Choose a reason for hiding this comment

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

I'd love some tests to show the semantic meaning of each of these constants,
and some better documentation
"we expect these cases to be common enough that it's worth inlining".

Though I should state my preference that we don't hard-code anything anyway and eat any perf impact as I suspect it's negligible

#[test]
fn test() {
    assert_eq!(EMPTY_CODE_HASH, keccak_hash::keccak([]));
}

@atanmarko atanmarko force-pushed the chore/common-definitions branch from 0003fc7 to 56ce331 Compare August 15, 2024 14:13
@atanmarko atanmarko marked this pull request as ready for review August 15, 2024 14:13
@atanmarko atanmarko force-pushed the chore/common-definitions branch from 56ce331 to 5f24cc0 Compare August 15, 2024 14:14
@atanmarko atanmarko force-pushed the chore/common-definitions branch from dc83faa to e31c351 Compare August 15, 2024 14:24
@atanmarko atanmarko added this to the x Misc. milestone Aug 15, 2024
@atanmarko atanmarko merged commit cdd0824 into develop Aug 15, 2024
16 checks passed
@atanmarko atanmarko deleted the chore/common-definitions branch August 15, 2024 14:39
@BGluth
Copy link
Contributor

BGluth commented Aug 15, 2024

Yeah this was needed and something I was thinking about for a bit. Thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: mpt_trie Anything related to the mpt_trie crate. crate: trace_decoder Anything related to the trace_decoder crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unify shared constants into a common public module
4 participants