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

debt(anvil): migrate to use op-alloy optimism types #6860

Closed
Tracked by #8269
Evalir opened this issue Jan 19, 2024 · 7 comments
Closed
Tracked by #8269

debt(anvil): migrate to use op-alloy optimism types #6860

Evalir opened this issue Jan 19, 2024 · 7 comments
Assignees
Labels
A-internals Area: internals C-anvil Command: anvil first issue A good way to start contributing T-debt Type: code debt
Milestone

Comments

@Evalir
Copy link
Member

Evalir commented Jan 19, 2024

TBD yet if this should go on alloy—but we should refactor out the Optimism types as the network abstraction comes together. #6808 (comment)

Edit: Optimism types have since moved to https://github.com/alloy-rs/op-alloy

Updated the ticket to reflect that we should use those types in Foundry instead of the local implementation

@Evalir Evalir added the C-anvil Command: anvil label Jan 19, 2024
@gakonst gakonst added this to Foundry Jan 19, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 19, 2024
@zerosnacks zerosnacks changed the title chore(anvil-core): Refactor out optimism types to a separate crate chore(anvil-core): migrate to use op-alloy optimism types Jul 10, 2024
@zerosnacks zerosnacks added A-compatibility Area: compatibility T-debt Type: code debt labels Jul 10, 2024
@zerosnacks zerosnacks self-assigned this Jul 10, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@zerosnacks zerosnacks added first issue A good way to start contributing A-internals Area: internals and removed A-compatibility Area: compatibility labels Jul 30, 2024
@zerosnacks zerosnacks removed their assignment Jul 30, 2024
@leovct
Copy link
Contributor

leovct commented Sep 20, 2024

Hi, I'd like to tackle this issue if it is still relevant!

@zerosnacks
Copy link
Member

zerosnacks commented Sep 20, 2024

Hi, I'd like to tackle this issue if it is still relevant!

Awesome thanks, yes this is still relevant:

See:

@leovct
Copy link
Contributor

leovct commented Sep 20, 2024

I've noticed that there are also references to revm::primitives::OptimismFields, is it in the scope of this PR also?

https://github.com/foundry-rs/foundry/blob/master/crates/anvil/src/eth/backend/mem/mod.rs#L92

@zerosnacks
Copy link
Member

I've noticed that there are also references to revm::primitives::OptimismFields, is it in the scope of this PR also?

https://github.com/foundry-rs/foundry/blob/master/crates/anvil/src/eth/backend/mem/mod.rs#L92

Possibly not but worth looking into, I think Reth still uses its own Optimism types

@zerosnacks zerosnacks changed the title chore(anvil-core): migrate to use op-alloy optimism types debt(anvil): migrate to use op-alloy optimism types Sep 24, 2024
@zerosnacks
Copy link
Member

zerosnacks commented Sep 24, 2024

Related: #8943

use TxDeposit from op-alloy-consensus

Replace the existing DepositTransaction

pub struct DepositTransaction {
with TxDeposit from op-alloy: https://github.com/alloy-rs/op-alloy/blob/f6d9d723fff605c8b87a95548d4eb56338dc2c1e/crates/consensus/src/transaction/deposit.rs#L15

@zerosnacks
Copy link
Member

zerosnacks commented Sep 24, 2024

Related PR: #8595 + ticket #8575

this anvil type

pub struct DepositTransactionRequest {

should be equivalent to

https://github.com/alloy-rs/op-alloy/blob/2ecb2e50ec705df6615596b6c5bde879c6f7dee1/crates/consensus/src/transaction/deposit.rs#L12

and could be replaced

@leovct
Copy link
Contributor

leovct commented Oct 9, 2024

I think this issue can be closed, #9047 just got merged :)

@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-internals Area: internals C-anvil Command: anvil first issue A good way to start contributing T-debt Type: code debt
Projects
Status: Done
Development

No branches or pull requests

3 participants