Hello there!
I'm trying to understand why MAX_LIMIT is defined for limiting the querying of accounts: https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw20-base/src/enumerable.rs#L8
There's basically two possibilities when you set MAX_LIMIT
- You set
MAX_LIMIT too low (meaning you could have set a higher limit without running out of gas) which means you are unnecessarily restricting the rate at which you can read data
- You set MAX_LIMIT too high (meaning you run out of gas at the max limit) which means you might as well not set any MAX_LIMIT at all
There is technically a third option where you perfectly calibrate MAX_LIMIT but doesn't work in practice because the gas costs may fluctuate.
So what is the point of setting a MAX_LIMIT; why not let the querier decide the limit for themselves? Is it to intentionally throttle the data throughput? Thanks!
Hello there!
I'm trying to understand why
MAX_LIMITis defined for limiting the querying of accounts: https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw20-base/src/enumerable.rs#L8There's basically two possibilities when you set
MAX_LIMITMAX_LIMITtoo low (meaning you could have set a higher limit without running out of gas) which means you are unnecessarily restricting the rate at which you can read dataThere is technically a third option where you perfectly calibrate
MAX_LIMITbut doesn't work in practice because the gas costs may fluctuate.So what is the point of setting a
MAX_LIMIT; why not let the querier decide the limit for themselves? Is it to intentionally throttle the data throughput? Thanks!