-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_os: pointer args wrap Vec<MaybeRelocatable> #7743
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
starknet_os: pointer args wrap Vec<MaybeRelocatable> #7743
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
42f2e3c to
414735b
Compare
amosStarkware
left a comment
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
#[derive(Clone, Debug, Eq, PartialEq)] pub enum PointerArg { Array(Vec<MaybeRelocatable>),
it's confusing that this is MaybeRelocatable and the rest are Felts - can you make them all MaybeRelocatable?
if t his will cause conflicts in your stack - you can add a TODO and do it in a later PR
Code quote:
Array(Vec<MaybeRelocatable>),crates/starknet_os/src/test_utils/cairo_runner.rs line 436 at r1 (raw file):
PointerArg::Array(array) => { let array_pointer = vm.get_relocatable(address)?; let felt_array = load_sequence_of_felts(array.len(), array_pointer, vm)?;
non blocking - it's still a felt array, no need to rename
Code quote:
let felt_array = load_sequence_of_felts(array.len(), array_pointer, vm)?;414735b to
c51a852
Compare
nimrod-starkware
left a comment
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
Previously, amosStarkware wrote…
it's confusing that this is
MaybeRelocatableand the rest areFelts - can you make them allMaybeRelocatable?
if t his will cause conflicts in your stack - you can add a TODO and do it in a later PR
WDYM?
You suggest that ValueArg::Array will also wrap Vec<MaybeRelocatable>?
crates/starknet_os/src/test_utils/cairo_runner.rs line 436 at r1 (raw file):
Previously, amosStarkware wrote…
non blocking - it's still a felt array, no need to rename
reverted.
amosStarkware
left a comment
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
Previously, nimrod-starkware wrote…
WDYM?
You suggest thatValueArg::Arraywill also wrapVec<MaybeRelocatable>?
also Single. maybe we can use CairoAg instead of ValueArg?
if we do that, maybe we also don't need PointerArg?
need to think about this
nimrod-starkware
left a comment
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
Previously, amosStarkware wrote…
also
Single. maybe we can use CairoAg instead of ValueArg?
if we do that, maybe we also don't need PointerArg?
need to think about this
I'll add a todo to consider this, can i put the todo on your name?
amosStarkware
left a comment
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
Previously, nimrod-starkware wrote…
I'll add a todo to consider this, can i put the todo on your name?
I thought about it, and changing Single(Felt), Array(Vec<Felt>), to Single(MaybeRelocatable), Array(Vec<MaybeRelocatable>), should be enough.
can you do that / add a TODO?
c51a852 to
92c0134
Compare
nimrod-starkware
left a comment
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 47 at r1 (raw file):
Previously, amosStarkware wrote…
I thought about it, and changing
Single(Felt), Array(Vec<Felt>),toSingle(MaybeRelocatable), Array(Vec<MaybeRelocatable>),should be enough.
can you do that / add a TODO?
Done
amosStarkware
left a comment
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.
Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 389 at r3 (raw file):
vm: &VirtualMachine, ) -> Result<Vec<MaybeRelocatable>, LoadReturnValueError> { let mut felt_array = vec![];
let mut felt_array = vec![];
may not be felt
92c0134 to
fb900d4
Compare
nimrod-starkware
left a comment
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
crates/starknet_os/src/test_utils/cairo_runner.rs line 389 at r3 (raw file):
Previously, amosStarkware wrote…
let mut felt_array = vec![];
may not be felt
Done
amosStarkware
left a comment
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)

No description provided.