flow-cli icon indicating copy to clipboard operation
flow-cli copied to clipboard

Staking-info command returns a ResourceExhausted error

Open vishalchangrani opened this issue 1 year ago • 2 comments

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.

vishalchangrani avatar Nov 23 '23 03:11 vishalchangrani