Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit query contract depth #655

Closed
alpe opened this issue Oct 19, 2021 · 2 comments
Closed

Limit query contract depth #655

alpe opened this issue Oct 19, 2021 · 2 comments

Comments

@alpe
Copy link
Contributor

alpe commented Oct 19, 2021

Inspired by https://github.com/terra-money/core/pull/584

We want to prevent from recursive smart queries that consume a lot of resources but may not cost much fees.
Options we have:

a) allow level n depth of queries where each contract that runs a smart query increases the depth by 1.

example:  
  A(0) -calls-> B, B(1) -calls -> C(2) -calls->D 
  A(0) -calls-> B, A(0) -calls -> C(1) -calls->D

b) allow n number of total smart queries in total

example:  
  A(0) -calls-> B, B(1) -calls -> C(2) -calls->D 
  A(0) -calls-> B, A(1) -calls -> C(2) -calls->D

@alpe alpe added this to the v1.x.0 milestone Oct 19, 2021
@ethanfrey
Copy link
Member

This would be breaking. Best to do by 1.0 if you don't want to wait til 2.0, right?

Seems fine with me

@alpe alpe modified the milestones: v1.x.0, v1.0.0 Oct 22, 2021
@alpe
Copy link
Contributor Author

alpe commented Nov 9, 2021

Replaced by #670

@alpe alpe closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants