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

Attempt to replace HH Node with Anvil to allow upgrade to Node 20 #2023

Draft
wants to merge 5 commits into
base: dcroote/issue1918
Choose a base branch
from

Conversation

aquarat
Copy link
Contributor

@aquarat aquarat commented Sep 20, 2024

No description provided.

@aquarat aquarat changed the base branch from master to dcroote/issue1918 September 20, 2024 10:42
@aquarat aquarat changed the title Aquarat/issue1918 experiments Attempt to replace HH Node with Anvil to allow upgrade to Node 20 Sep 20, 2024
@@ -34,7 +34,7 @@
"@types/mocha": "^10.0.6",
"chai": "^4.4.1",
"ethereum-waffle": "^4.0.10",
"hardhat": "^2.19.5",
"hardhat": "^2.23.0-dev.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This didn't help.

@@ -6,7 +6,7 @@ describe('buildingRequest', () => {
const options = fixtures.buildRequestOptions();
const res = build.buildRequest(options);
expect(res).toEqual({
baseUrl: 'http://localhost:5000',
baseUrl: 'http://localhost:5005',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mac OS runs an Airdrop service on this port.

@@ -75,7 +75,7 @@ describe('SDK', () => {

it('uses transaction overrides', async () => {
await expect(sdk.sponsorRequester(wallet.address, { gasLimit: 1 })).rejects.toThrow(
'Transaction requires at least 21572 gas but got 1'
expect.objectContaining({name: expect.stringContaining('Error'), message: expect.stringContaining('gas')})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anvil returns a different error message for gas compared to HH Node.

@@ -103,6 +104,11 @@ const processBlockData = async (
}
};

const resetAnvil = async () => {
spawn("bash", ["-c", 'killall anvil;']);
await new Promise(f => setTimeout(f, 1000));
Copy link
Contributor Author

@aquarat aquarat Sep 20, 2024

Choose a reason for hiding this comment

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

Ideally starting and stopping Anvil could be managed in code or handled more intelligently.

A more comprehensive approach can be found here: https://github.com/api3dao/oev-searcher-poc/blob/main/src/simulation.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant