Skip to content

Conversation

@jmg-duarte
Copy link
Contributor

@jmg-duarte jmg-duarte commented Dec 18, 2025

Description

Migrates the solver ethcountract::Account's to alloy

Changes

  • Removes the now unused with_signer function
  • Adds an Account abstraction that avoids boxing and unifies AwsSigner + PrivateKeySigner
  • Migrates mempool tx submission to alloy
  • Removes the now unused Address kind of account
  • Adds access list conversions to alloy

How to test

Existing tests

@jmg-duarte jmg-duarte changed the base branch from main to jmgd/alloy/account December 19, 2025 07:29
@jmg-duarte jmg-duarte force-pushed the jmgd/alloy/solver-account branch from a265d81 to c2518d8 Compare December 19, 2025 07:39
@jmg-duarte jmg-duarte force-pushed the jmgd/alloy/solver-account branch from c2518d8 to 0e6210e Compare December 19, 2025 07:43
@jmg-duarte jmg-duarte marked this pull request as ready for review December 19, 2025 10:01
@jmg-duarte jmg-duarte requested a review from a team as a code owner December 19, 2025 10:01
@jmg-duarte jmg-duarte changed the title [WIP] Migrate solver's ethcontract::Account to alloy Migrate solver's ethcontract::Account to alloy Dec 19, 2025
Base automatically changed from jmgd/alloy/account to main December 19, 2025 10:12
Comment on lines 346 to 349
/// An address is used to identify the account for signing, relying on the
/// connected node's account management features. This can also be used to
/// start the driver in a dry-run mode.
Address(eth::Address),
Copy link
Contributor

@MartinquaXD MartinquaXD Dec 19, 2025

Choose a reason for hiding this comment

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

This is a breaking change. For testing purposes it's really nice to be able to plug in a public address. This ensures that the driver will not be able to submit a transaction while you are experimenting (avoid loss of money).
Additionally this allows you to role play as an already allow listed account to bypass the authentication contract.
This should be easy to address with your new Account enum. We just need a PublicAddress(Address) variant that always errors out when it's supposed to sign something. Also we don't add those accounts to the wallet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, will add one then. It will error out anyway on the alloy side because node-side signing goes through a different path in alloy

Copy link
Contributor

Choose a reason for hiding this comment

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

It will error out anyway on the alloy side because node-side signing goes through a different path in alloy

Without the new variant you'll not be able to construct an Account instance from a public Address since it can't be used to construct a PrivateKeySigner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@m-sz m-sz left a comment

Choose a reason for hiding this comment

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

LGTM except for @MartinquaXD 's comment. Will approve then.

@jmg-duarte jmg-duarte added this pull request to the merge queue Dec 19, 2025
Merged via the queue into main with commit 760b024 Dec 19, 2025
19 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/alloy/solver-account branch December 19, 2025 11:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants