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

fold the account abstraction launch logic into roll.py #55

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Conversation

norswap
Copy link
Member

@norswap norswap commented Sep 27, 2023

Running into a few issues:

  1. The deployment of the 4337 contracts fail the first few times because of "insufficient funds".
| Error: insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"name":"ProviderError","_stack":"ProviderError: HttpProviderError\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)
|     at processTicksAndRejections (node:internal/process/task_queues:96:5)

If you keep running the command it works 🤔

Either Hardhat doing something bogus, or it's actually deploying one contract at a time, failing each time on the next thing?

  1. The paymaster signer service doesn't run because:

ELIFECYCLE  Command failed.

Yeah right. Running manually works.

I'm suspecting the problem might be the way lib.run in libroll.py uses subprocess.PIPE to pipe the output, which is known to cause problems.

We should replace that with a system that supplies a stream abstraction (an object with a write and flush method IIRC) and spin up a thread that simply writes whatever comes in to a file. Unfortunate, but is is what it is.


Beyond all that, I need to better separate out setup from deployment from running. Ideally, just like the rest there would be separate commands for the setup (can't keep adding all extension to the global setup command), deployment, and running, and one "easy" command that does everything for you (what's implemented now).

As an optimization, we should skip the setup when it's already been done... but then also probably supply an equivalent to clean-build to remove builds that might be borked somehow.

Also:

  • Try using GOBIN instead of GOPATH so that we put stackup-bundler in ./bin and avoid installing things globally. This also means we only need to care about that variable when we go install and not each time we run like we do now.

  • We should add a configuration for the 4337 deployment name (currently "opstack") and default it to be the same name as the L2 deployment name.

"""

self.bundler_key = None
self.bundler_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
Copy link
Contributor

Choose a reason for hiding this comment

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

So the issue with stackup bundler is that it can't recognized private key with 0x. So we should put this as self.bundler_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"

Copy link
Contributor

@eerkaijun eerkaijun left a comment

Choose a reason for hiding this comment

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

So the paymaster is running fine, it's an issue of the stackup bundler not running correctly, basically because of the

  1. private key (as above comment)
  2. go path not set correctly (which I've fixed)

@norswap
Copy link
Member Author

norswap commented Sep 29, 2023

Merging, remaining issue: #58

@norswap norswap merged commit 969eabc into master Sep 29, 2023
2 checks passed
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.

2 participants