metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
203 stars 116 forks source link

[Feature]: Rate limit settings #468

Open loompact opened 10 months ago

loompact commented 10 months ago

Feature

Issue: when using 'sugar' it sends its requests/calls to the RPC endpoints in bursts, as quickly as possible. That let's it run into rate limit issues quite frequently, not only in the very limited Solana's own RPC but also in e.g. the lower end limits of paid RPC provider plans (like Quicknode Discover/Discover+). In turn this results in blockings or 429 errors, so you need to re-run the 'sugar' commands a couple of times until all requests got through, e.g. with the 'deploy' or 'airdrop' commands.

Ideal solution or implementation

Solution: to prevent 'sugar' to trigger the rate limits of the RPC endpoint it would be good to have a configurable rate-limit setting. If this would be available, commands would take longer, but would not end up being blocked or needed to re-run multiple times until the instruction succeeds fully.

Alternative solutions or implementations

No response

Other context

No response