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

CoW AMM: Implement archive node URL as an option to build CoW AMM Web3 #3044

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

m-lord-renkse
Copy link
Contributor

Description

CoW AMM currently relies on archive nodes. Add the possibility to build web3 for CoW AMM from an archive node URL.

Changes

  • Add new config for autopilot and driver in order to configure the archive node URL
  • If the archive node URL is present, build web3 for CoW AMM from the given URL

How to test

  1. Regression tests

@m-lord-renkse m-lord-renkse force-pushed the build-cow-amm-from-archive-node branch from c94923a to f65d3c8 Compare October 9, 2024 09:37
@m-lord-renkse m-lord-renkse marked this pull request as ready for review October 9, 2024 09:39
@m-lord-renkse m-lord-renkse requested a review from a team as a code owner October 9, 2024 09:39
Comment on lines 376 to 378
let cow_amm_web3 = args.archive_node_url.as_ref().map_or(web3.clone(), |url| {
boundary::web3_client(url, &args.shared.ethrpc)
});
Copy link
Contributor

Choose a reason for hiding this comment

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

General question: will cow amm support work properly without an archive node being provided?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I've worked on that for a while but it turned out a bit ugly so I didn't open a PR for that yet. Should resurrect the work soon. 🤞

crates/autopilot/src/run.rs Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse enabled auto-merge (squash) October 10, 2024 15:11
@m-lord-renkse m-lord-renkse merged commit 42e4fe2 into main Oct 10, 2024
11 checks passed
@m-lord-renkse m-lord-renkse deleted the build-cow-amm-from-archive-node branch October 10, 2024 15:14
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2024
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.

3 participants