Staking-info command returns a ResourceExhausted error
@chasefleming is already working on this.
Since Nov 23, 2023.
- Dominant language
- Go
- Stars
- 209
- Forks
- 87
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 3
Description
Instructions
Problem
flow accounts staking-info 0xbf91cf149c03a3b3 -n mainnet
❌ Command Error: error getting total stake for node: client: rpc error: code = ResourceExhausted desc = request is rate limited
Acceptance Criteria
This command should return the staking info.
Context
The error is incorrect. The rate limits are definitely high enough to accommodate to one request per second.
The command however works against a different access node -
$ flow accounts staking-info 0xbf91cf149c03a3b3 --host="access-001.mainnet24.nodes.onflow.org:9000"
If a 50ms sleep is added here https://github.com/onflow/flow-cli/blob/master/internal/accounts/staking-info.go#L120 then the command works against the public access node (access.mainnet.nodes.onflow.org:9000) as well. This indicates that the flow cli times out prematurely and throws an incorrect error after that.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.