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

Add RPC call concurrency restrictions to deploy command options #2236

Closed
0x-shanks opened this issue Feb 6, 2024 · 5 comments · Fixed by #2322
Closed

Add RPC call concurrency restrictions to deploy command options #2236

0x-shanks opened this issue Feb 6, 2024 · 5 comments · Fixed by #2322

Comments

@0x-shanks
Copy link
Contributor

Errors often occur in RPC call quotes while executing mud deploy command, so I want to limit the number of calls at a time to suppress errors.

For example

  • Option: --rpcConcurrency
  • Meaning: Limit the concurrency of RPC calls
  • Type: number
  • Default value: 1000

https://mud.dev/cli/deploy

@holic
Copy link
Member

holic commented Feb 6, 2024

great suggestion!

prob best to do this at the viem client level, maybe with a custom transport, and could lean on something like p-queue for it

@0x-shanks
Copy link
Contributor Author

Thanks, it does indeed look like a good idea to use custom transport. I already have one implemented in a naive way, can I submit it to PR once I have it? If it is not a good implementation, I will re-implement it with custom transport.

@holic
Copy link
Member

holic commented Feb 6, 2024

Thanks for taking a stab at this! And sorry to jostle you around, but I do think a custom transport with throttling built in would be better and general purpose for ~any viem user!

@0x-shanks
Copy link
Contributor Author

Understood.
I made it once because I needed it right at hand, but I'll fix the PR later when I have more time👍

@holic
Copy link
Member

holic commented Feb 6, 2024

@hourglasshoro A question for you: https://twitter.com/indexsupply/status/1754924224375095349

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