Skip to content

Oracles: unbounded feed values vector #924

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

Closed
lemunozm opened this issue Jun 14, 2023 · 1 comment · Fixed by #925
Closed

Oracles: unbounded feed values vector #924

lemunozm opened this issue Jun 14, 2023 · 1 comment · Fixed by #925

Comments

@lemunozm
Copy link
Contributor

The current oracle's extrinsic feed_values() allows an unbounded Vec as an input parameter. This would allow a member to act badly generating a huge list of values that fill the block computation time for free, because the member is not paying fees under success.

Even if all OracleKey possible values are limited, the vector can still contain duplicates that must be iterated, consuming, in the worst case, the entire block available time.

We think the solution to this is as simple as making this Vec bounded. If you agree, I can add a PR with this change.

@xlc
Copy link
Member

xlc commented Jun 14, 2023

I agree. It is usually a good idea to make vec bounded anyway.

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