Skip to content
Discussion options

You must be logged in to vote

Normally, execution gas applied to submitted transactions. There is a max gas limit default for view functions to prevent DoS attacks. It's useful to ensure users don't make full nodes spend all their time running long view functions. But since you're running a private blockchain you can just adjust max_gas_view_function in the config to increase the limit. Similarly if you were running your own full node for the public networks, you can adjust this field to allow you to make more complex view functions.

https://github.com/aptos-labs/aptos-core/blob/main/config/src/config/api_config.rs

Other option is to optimize the function

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@byron1st
Comment options

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