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

VecEntry contract cost parameters are zero #1051

Closed
jayz22 opened this issue Sep 9, 2023 · 2 comments
Closed

VecEntry contract cost parameters are zero #1051

jayz22 opened this issue Sep 9, 2023 · 2 comments
Assignees

Comments

@jayz22
Copy link
Contributor

jayz22 commented Sep 9, 2023

The VecEntry is a cheap operation which just indexes into a fixed sized vector. The calibration code did not pick up the cost signal and produced zeros. While it's not vulnerable (one cannot index into a vector without creating it or doing something else that does cost non-trivial cpu), we need to fix it and add some cost. Probably just need to tweak the calibration setup a bit or increase the run iterations.

@anupsdf
Copy link
Contributor

anupsdf commented Sep 29, 2023

Putting prior information from Jay here,

With this issue the indexing into the MeteredVector is free, but the usage of MeteredVector is not free. Usage is dominated by memcpy and memalloc. Indexing into host object from the user also requires the user calling a host function which has non-trivial cost.

@jayz22
Copy link
Contributor Author

jayz22 commented Oct 12, 2023

Resolved by #1105. Both VecEntry and MapEntry has been consolidated into MemCpy.

@jayz22 jayz22 closed this as completed Oct 12, 2023
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

No branches or pull requests

2 participants