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

Which network I should connect to for tests? #8

Open
livingrockrises opened this issue Dec 8, 2022 · 8 comments
Open

Which network I should connect to for tests? #8

livingrockrises opened this issue Dec 8, 2022 · 8 comments

Comments

@livingrockrises
Copy link

It mentions, Hardhat does not support EIP-3074 at the moment. All testing is done on a live network.

Does any live network support invokers (AUTH and AUTHCALL)
I remember trying out puxi testnet many months ago. Do I need a specific setup?

@ankitchiplunkar
Copy link

same question as ⬆️

@wschwab
Copy link

wschwab commented Dec 8, 2022

I am not currently aware of a public testnet with 3074 activated, though there is hope that there might some in the future...

In order to get a local network running, you'll need a modified version of the EVM. EthereumJS has an implementation accessible behind a flag (link), alternatively you might be able to use Quilt's Geth fork (link). If you're looking to go the serious route, Ansgar has a workshop on how to implement the EVM changes here.

Hardhat does not yet implement an easier way to do this, though it is on their roadmap. Foundry is unlikely to have support soon, as their EVM implementation as already expressed that they have no plans to add 3074 support unless there is more serious interest shown about it in the Ethereum community. (link

I hope that helps - lmk if there's something I can add

@alcuadrado
Copy link

This is a quick hack that should get EIP-3074 activated in Hardhat. I'm not sure how to test it, so let me know if doesn't work.

Add this to your Hardhat config.

const { Common } = require("@nomicfoundation/ethereumjs-common");
const originalCustom = Common.custom;
Common.custom = (params, opts) => {
  return originalCustom.call(Common, params, {
    ...opts,
    eips: [...(opts.eips ?? []), 3074],
  });
};

@wschwab
Copy link

wschwab commented Dec 8, 2022

thanks @alcuadrado ! We'll try this out on our end too, if it works, we'll merge it in.

@alcuadrado
Copy link

Forgot to mention this here, but we will move away from ethereumjs vm soon. We'll be using REVM, which is the same vm that foundry uses, so this hack will stop working in ~1-2 months.

@wschwab
Copy link

wschwab commented Dec 9, 2022

Initial tests with @alcuadrado work on our end - note that if you're using the tests in the repo that they assume a private key in a .env, and you'll need to fund the account with test ETH if you want to use it.

We're working on adding some functionality to make using this with a local network easier.

@wschwab
Copy link

wschwab commented Dec 9, 2022

Okay, it looks like the snippet works (the opcode doesn't revert as unrecognized), but auth is giving us out-of-gas errors even from funded accounts. We're looking into it.

@wschwab
Copy link

wschwab commented Jan 31, 2023

just wanted to mention that we have not forgotten about this, this issue has spawned a rather ridiculous rabbit hole of exploration and debugging, but it looks like we're getting closer to the source

s/o to the Hardhat, EthereumJS, and Quilt teams for their support

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

No branches or pull requests

4 participants