-
Notifications
You must be signed in to change notification settings - Fork 651
Add resource constraints to arbos storage and precompiles for resource constraints #3804
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
base: master
Are you sure you want to change the base?
Conversation
❌ 7 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
5d85d4f to
534792d
Compare
|
|
||
| // Load decodes ResourceConstraints from storage using RLP. | ||
| // If storage is empty, returns an empty ResourceConstraints. | ||
| func (src *StorageResourceConstraints) Load() (*ResourceConstraints, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should add a field with a version number, in case we want to change this in the future.
89cca35 to
dfaec7c
Compare
dfaec7c to
11dc0da
Compare
7fe4a4d to
83e865f
Compare
53edd6f to
e1d876d
Compare
e1d876d to
e2bfb52
Compare
| } | ||
| } | ||
|
|
||
| type rlpResourceConstraint struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the multi single-dimensional constraints, we decided to store each field directly to storage. I wonder whether we should do the same for the multi-dimensional constraints. We should check with the team before proceeding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should. But, I also think we should talk with @tsahee and @hkalodner about the tradeoffs here to understand the historical context for using this tree of storage objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to revisit this PR and rethink it after completing work on Multi-Constraint Pricer. It will definitely be possible to reuse it.
Closes NIT-3963, closes NIT-3978 and closes NIT-3488
Depends on:
Implemented: