-
Notifications
You must be signed in to change notification settings - Fork 150
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
Update StackOutputs
fields
#1268
Conversation
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.
LGTM
4f7f8ca
to
7dec536
Compare
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.
Looks good! Thank you! I left a couple of small nits inline - after these, we can merge.
miden/src/examples/mod.rs
Outdated
@@ -170,7 +170,7 @@ where | |||
let program_info = ProgramInfo::new(program.hash(), kernel); | |||
|
|||
if fail { | |||
outputs.stack_mut()[0] += 1; | |||
outputs.stack_mut()[0] += Felt::new(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.
We can use just ONE
here.
test-utils/src/lib.rs
Outdated
@@ -252,7 +252,7 @@ impl Test { | |||
|
|||
let program_info = ProgramInfo::from(program); | |||
if test_fail { | |||
stack_outputs.stack_mut()[0] += 1; | |||
stack_outputs.stack_mut()[0] += Felt::new(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.
Same comment as above.
core/src/stack/outputs.rs
Outdated
/// Returns an error if: | ||
/// - Any of the provided stack elements are invalid field elements. | ||
/// - Any of the provided overflow addresses are invalid field elements. | ||
pub fn try_from_values(stack: Vec<u64>, overflow_addrs: Vec<u64>) -> Result<Self, OutputError> { |
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.
nit: I would rename this to try_from_ints
.
Oh - and also, let's update the changelog. |
50e2e09
to
3677c75
Compare
3677c75
to
8c66eb0
Compare
@@ -4,6 +4,7 @@ | |||
|
|||
#### VM Internals | |||
- Removed unused `find_lone_leaf()` function from the Advice Provider (#1262). | |||
- Changed fields type of the `StackOutputs` struct from `Vec<u64>` to `Vec<Felt>` (#1268). |
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.
This is a breaking change (i.e., it changes the public interface). We should mark it as such.
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.
Ah, Indeed, I merged this PR too early. Will it be OK if I make this change in the #1266 PR?
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.
Yep - that's fine.
This PR updates the fields of
StackOutputs
struct.It changes them from
Vec<u64>
toVec<Felt>
to make them consistent with the stack values.