-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add missing field to ExecutionResources #1301
Add missing field to ExecutionResources #1301
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development #1301 +/- ##
===============================================
+ Coverage 97.96% 97.99% +0.02%
===============================================
Files 93 93
Lines 4580 4582 +2
===============================================
+ Hits 4487 4490 +3
+ Misses 93 92 -1
|
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.
PR name seems a bit misleading, otherwise LGTM
assert receipt.execution_resources is not None | ||
assert receipt.execution_resources.steps is not None | ||
assert receipt.execution_resources.segment_arena_builtin is not None | ||
assert receipt.execution_resources.bitwise_builtin_applications is not None | ||
assert receipt.execution_resources.ec_op_builtin_applications is not None | ||
assert receipt.execution_resources.memory_holes is not None | ||
assert receipt.execution_resources.pedersen_builtin_applications is not None | ||
assert receipt.execution_resources.range_check_builtin_applications is not None |
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.
nitpick: since this is a hardcoded transaction, it should be possible to just assert specific values that we expect (and not just asserting that it is not None), which would give us another layer of testing (I mean serialization).
if you agree, I'd suggest we open an issue and deal with it in a separate PR, at later date.
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.
In an ideal scenario, we should probably have unit tests for out RPC schemas 😅 However the check that you suggest can definitely improve this test. Let's discuss it further in #1219
Closes #1300
Missing field: https://github.com/starkware-libs/starknet-specs/blob/v0.6.0/api/starknet_api_openrpc.json#L3848
Introduced changes
segment_arena_builtin
field toExecutionResources
fields.Integer
instead ofFelt
for serializing/deserializingExecutionResources
fields to align with RPC specification