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

Introduce a burn address for cdk_erigon #463

Merged
merged 18 commits into from
Aug 30, 2024
Merged

Introduce a burn address for cdk_erigon #463

merged 18 commits into from
Aug 30, 2024

Conversation

LindaGuiga
Copy link
Contributor

This PR closes #92.

This PR introduce a burn address BurnAddr when the cdk_erigon feature is activated. The BurnAddr receives the burnt fees when the feature is activated. This is achieved similarly to the fee payment for the sender: first, we add the maximum fee to the burn address, then we deduct the fee corresponding to the remaining gas.

For now, the default value (0x0) is set in the trace decoder.

@github-actions github-actions bot added crate: trace_decoder Anything related to the trace_decoder crate. crate: evm_arithmetization Anything related to the evm_arithmetization crate. labels Aug 5, 2024
@Nashtare Nashtare added this to the Type 2 - Q3 2024 milestone Aug 6, 2024
@Nashtare Nashtare requested a review from hratoanina August 8, 2024 13:26
@Nashtare
Copy link
Collaborator

Nashtare commented Aug 8, 2024

@LindaGuiga If you merge latest develop the clippy errors will go away.

Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

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

I'm mostly good with it, but left some comments to discuss / address.

evm_arithmetization/src/fixed_recursive_verifier.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/cpu/kernel/tests/add11.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/cpu/kernel/aggregator.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/mod.rs Outdated Show resolved Hide resolved
@Nashtare
Copy link
Collaborator

I'm good with this once rebased + revert the changes linked to macro -> global label post #492

@LindaGuiga LindaGuiga requested a review from 0xaatif as a code owner August 15, 2024 18:15
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 don't want to feature-gate fields in a public struct.

I support features when they add to the public API in ways that don't require code changes from users.

This is fine

pub fn foo(p: &str) {
    #[cfg(feature = "str")] // implementation detail
    ...
}

This is not

#[cfg(feature ="str")]
pub fn foo(p: &str);
#[cfg(feature ="bytes")]
pub fn foo(p: &[u8]);

As you've added it, the feature is viral - now trace_decoder needs conditional compilation too, but I don't think it should.

Can you think of a way of phrasing the public API such that it doesn't need conditional compilation? Perhaps an enum that's always present?

evm_arithmetization/src/fixed_recursive_verifier.rs Outdated Show resolved Hide resolved
trace_decoder/Cargo.toml Outdated Show resolved Hide resolved
trace_decoder/src/decoding.rs Outdated Show resolved Hide resolved
@LindaGuiga LindaGuiga requested a review from atanmarko as a code owner August 22, 2024 15:47
@github-actions github-actions bot added the crate: zero_bin Anything related to the zero-bin subcrates. label Aug 22, 2024
@Nashtare Nashtare requested a review from 0xaatif August 26, 2024 17:33
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

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

I'm broadly good with this, mostly light comments. @0xaatif could you tell us if you're satisfied with how the decoder looks now, following your latest discussions with Linda.

evm_arithmetization/src/cpu/kernel/aggregator.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/fixed_recursive_verifier.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/mod.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/proof.rs Show resolved Hide resolved
evm_arithmetization/src/recursive_verifier.rs Outdated Show resolved Hide resolved
evm_arithmetization/tests/add11_yml.rs Outdated Show resolved Hide resolved
evm_arithmetization/tests/two_to_one_block.rs Outdated Show resolved Hide resolved
zero_bin/leader/Cargo.toml Show resolved Hide resolved
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.

The TODOs are a blocker, and the inversion of control is a strong suggestion.

trace_decoder/src/decoding.rs Outdated Show resolved Hide resolved
trace_decoder/tests/trace_decoder_tests.rs Outdated Show resolved Hide resolved
trace_decoder/src/decoding.rs Show resolved Hide resolved
@Nashtare
Copy link
Collaborator

@0xaatif will you review the latest changes following resolved discussions or defer to other code owners? (what your latest comment seems to imply)
Just to clarify so that @LindaGuiga knows what to do once last comments are addressed

@LindaGuiga LindaGuiga merged commit 51ecfb4 into develop Aug 30, 2024
15 checks passed
@LindaGuiga LindaGuiga deleted the burn-target branch August 30, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. crate: trace_decoder Anything related to the trace_decoder crate. crate: zero_bin Anything related to the zero-bin subcrates.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

CDK-Erigon: Support for L2 EIP-1559: "Burn Target"
3 participants