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

Ohadn/qm31 operations #1938

Open
wants to merge 1 commit into
base: ohadn/qm31_arithmetics-in-math_utils
Choose a base branch
from

Conversation

ohad-nir-starkware
Copy link
Collaborator

@ohad-nir-starkware ohad-nir-starkware commented Feb 9, 2025

QM31Operations

Description

add packed reduced qm31 add, mul, sub, div via OpcodeExtension::QM31Operations.

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

This change is Reviewable

Copy link

github-actions bot commented Feb 9, 2025

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     32.429 s ±  0.198 s    [User: 31.652 s, System: 0.775 s]
  Range (min … max):   32.289 s … 32.569 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.967 s ±  0.064 s    [User: 26.195 s, System: 0.771 s]
  Range (min … max):   26.922 s … 27.012 s    2 runs
 
Summary
  hyper_threading_pr threads: 1 ran
    1.20 ± 0.01 times faster than hyper_threading_main threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     18.087 s ±  0.061 s    [User: 31.547 s, System: 0.782 s]
  Range (min … max):   18.044 s … 18.130 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.955 s ±  0.063 s    [User: 26.302 s, System: 0.806 s]
  Range (min … max):   14.911 s … 15.000 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.21 ± 0.01 times faster than hyper_threading_main threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     12.651 s ±  0.305 s    [User: 44.151 s, System: 0.950 s]
  Range (min … max):   12.435 s … 12.867 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.975 s ±  0.555 s    [User: 39.528 s, System: 0.997 s]
  Range (min … max):   10.583 s … 11.367 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.15 ± 0.06 times faster than hyper_threading_main threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     12.156 s ±  0.302 s    [User: 44.754 s, System: 0.933 s]
  Range (min … max):   11.943 s … 12.370 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.098 s ±  0.005 s    [User: 39.360 s, System: 0.977 s]
  Range (min … max):   11.095 s … 11.102 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.10 ± 0.03 times faster than hyper_threading_main threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     11.969 s ±  0.055 s    [User: 44.627 s, System: 1.007 s]
  Range (min … max):   11.929 s … 12.008 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.639 s ±  0.001 s    [User: 40.056 s, System: 0.991 s]
  Range (min … max):   10.639 s … 10.640 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.12 ± 0.01 times faster than hyper_threading_main threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     12.368 s ±  0.060 s    [User: 44.776 s, System: 1.110 s]
  Range (min … max):   12.325 s … 12.410 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.801 s ±  0.172 s    [User: 40.147 s, System: 1.108 s]
  Range (min … max):   10.680 s … 10.923 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.15 ± 0.02 times faster than hyper_threading_main threads: 16


@ohad-nir-starkware ohad-nir-starkware changed the base branch from main to ohadn/opcode_extension February 9, 2025 19:17
Copy link

github-actions bot commented Feb 9, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.215 ± 0.012 2.202 2.237 1.03 ± 0.01
head big_factorial 2.145 ± 0.006 2.138 2.159 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.163 ± 0.018 2.143 2.204 1.03 ± 0.01
head big_fibonacci 2.091 ± 0.013 2.078 2.122 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.134 ± 0.050 8.047 8.204 1.04 ± 0.01
head blake2s_integration_benchmark 7.812 ± 0.057 7.710 7.861 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.292 ± 0.016 2.266 2.310 1.04 ± 0.01
head compare_arrays_200000 2.207 ± 0.012 2.190 2.229 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.509 ± 0.017 1.495 1.554 1.03 ± 0.01
head dict_integration_benchmark 1.466 ± 0.013 1.454 1.493 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.285 ± 0.014 1.272 1.319 1.04 ± 0.01
head field_arithmetic_get_square_benchmark 1.241 ± 0.006 1.230 1.247 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.198 ± 0.062 8.102 8.274 1.05 ± 0.03
head integration_builtins 7.835 ± 0.210 7.701 8.411 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.462 ± 0.089 8.342 8.616 1.04 ± 0.01
head keccak_integration_benchmark 8.156 ± 0.028 8.098 8.189 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.262 ± 0.009 2.246 2.273 1.02 ± 0.01
head linear_search 2.208 ± 0.019 2.190 2.258 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.575 ± 0.009 1.566 1.597 1.03 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.532 ± 0.005 1.525 1.541 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.533 ± 0.005 1.527 1.544 1.03 ± 0.01
head math_integration_benchmark 1.495 ± 0.009 1.486 1.514 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.268 ± 0.007 1.259 1.286 1.03 ± 0.01
head memory_integration_benchmark 1.230 ± 0.004 1.226 1.241 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.651 ± 0.020 1.639 1.707 1.03 ± 0.01
head operations_with_data_structures_benchmarks 1.603 ± 0.003 1.598 1.607 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 546.4 ± 1.9 544.2 549.7 1.01 ± 0.02
head pedersen 539.7 ± 11.4 533.9 571.8 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 648.2 ± 5.9 640.3 658.2 1.02 ± 0.01
head poseidon_integration_benchmark 633.3 ± 4.8 626.7 643.9 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.918 ± 0.018 1.902 1.964 1.02 ± 0.01
head secp_integration_benchmark 1.880 ± 0.008 1.871 1.893 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 671.8 ± 5.3 667.6 685.9 1.01 ± 0.01
head set_integration_benchmark 665.2 ± 4.9 660.4 678.0 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.459 ± 0.041 4.387 4.538 1.04 ± 0.01
head uint256_integration_benchmark 4.305 ± 0.040 4.274 4.412 1.00

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 99.77974% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.45%. Comparing base (d733ade) to head (5c6cd9b).

Files with missing lines Patch % Lines
vm/src/vm/decoding/decoder.rs 97.91% 1 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           ohadn/qm31_arithmetics-in-math_utils    #1938      +/-   ##
========================================================================
+ Coverage                                 96.41%   96.45%   +0.03%     
========================================================================
  Files                                       102      103       +1     
  Lines                                     41858    42282     +424     
========================================================================
+ Hits                                      40358    40781     +423     
- Misses                                     1500     1501       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 2 times, most recently from efdb5e3 to 6dd3870 Compare February 10, 2025 17:30
@ohad-nir-starkware ohad-nir-starkware changed the base branch from ohadn/opcode_extension to ohadn/u128_encoded_instr February 10, 2025 17:38
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 3 times, most recently from b4da427 to eb339d8 Compare February 10, 2025 18:50
@ohad-nir-starkware ohad-nir-starkware changed the base branch from ohadn/u128_encoded_instr to ohadn/qm31_arithmetics-in-math_utils February 10, 2025 18:51
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from d6d9a96 to d1f230b Compare February 10, 2025 21:47
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from d1f230b to 4bca3db Compare February 11, 2025 11:50
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from 4bca3db to ea9f93f Compare February 12, 2025 08:07
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 3 times, most recently from c9356e0 to c13233c Compare February 12, 2025 13:42
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from ea9f93f to ef1aa46 Compare February 12, 2025 17:42
Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 6 files at r4.
Reviewable status: 9 of 16 files reviewed, 2 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @ohad-nir-starkware, @Oppen, @pefontana, and @yuvalsw)

@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 2 times, most recently from 3ef056d to 286ffff Compare February 18, 2025 21:29
Copy link
Collaborator Author

@ohad-nir-starkware ohad-nir-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 8 of 17 files reviewed, 2 unresolved discussions (waiting on @DavidLevitGurevich, @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)


vm/src/vm/vm_core.rs line 504 at r3 (raw file):

Previously, DavidLevitGurevich wrote…

why did this make sense but with the QM31 we need a totally different approach? @JulianGCalderon

I refactored deduce_op0, deduce_op1, compute_res, the flow is now more uniform for Stone and QM31Operation.
However, it did import OpcodeExtension to relocatable.rs which is something I feel unsure about.

Also, in deduce_op0 and deduce_op1 for Res::Mul the flows of Stone and QM31Operation do diverge within the function itself because it already deconstructs Felts out of MaybeRelocatable making it unsuitable to be computed inside relocatable.rs.
I could place the computation inside math_utils but it will introduce OpcodeExtension to math_utils and also separate the computation of div from that of add, sub, mul.
Another option is to open another utils file specifically for those 4 functions or to place them inside vm_core.rs.

let me know what you think.


vm/src/vm/decoding/decoder.rs line 121 at r3 (raw file):

Previously, DavidLevitGurevich wrote…

ap_update

Done.

@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from 9cdce6f to 57521d5 Compare February 19, 2025 10:03
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 2 times, most recently from 9238c0c to afc8d8f Compare February 19, 2025 12:36
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from 57521d5 to 29ce31e Compare February 19, 2025 12:40
Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 6 files at r4, 1 of 6 files at r5.
Reviewable status: 10 of 17 files reviewed, 1 unresolved discussion (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @Oppen, @pefontana, and @yuvalsw)

@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 5 times, most recently from c768e1e to ea5d726 Compare February 19, 2025 19:27
Comment on lines 108 to 116
if (res != Res::Add && res != Res::Mul)
|| op1_addr == Op1Addr::Op0
|| pc_update != PcUpdate::Regular
|| opcode != Opcode::AssertEq
|| (ap_update_num != 0 && ap_update_num != 2)
{
return Err(VirtualMachineError::InvalidQM31AddMulFlags(flags & 0x7FFF));
}
OpcodeExtension::QM31Operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this check logic down, to be more consistent with what is done with the Blake checks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +499 to +511
#[test]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
fn decode_qm31_operation_invalid_flags() {
// opcode_extension| opcode|ap_update|pc_update|res_logic|op1_src|op0_reg|dst_reg
// 79 ... 17 16 15| 14 13 12| 11 10| 9 8 7| 6 5|4 3 2| 1| 0
// QM31Operation| CALL| REGULAR| JumpRel| Op1| FP| AP| AP
// 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0
// 1 1001 0001 0000 1000 = 0x19108; off0 = 1, off1 = 1
let error = decode_instruction(0x19108800180018001);
assert_matches!(
error,
Err(VirtualMachineError::InvalidQM31AddMulFlags(0x1108))
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an additional test for the non-error path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_arithmetics-in-math_utils branch from 29ce31e to d733ade Compare February 19, 2025 22:24
@ohad-nir-starkware ohad-nir-starkware force-pushed the ohadn/qm31_operations branch 3 times, most recently from 7a9ae5a to 7925df2 Compare February 19, 2025 23:10
Copy link
Collaborator Author

@ohad-nir-starkware ohad-nir-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 19 files reviewed, 3 unresolved discussions (waiting on @DavidLevitGurevich, @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)

Comment on lines 108 to 116
if (res != Res::Add && res != Res::Mul)
|| op1_addr == Op1Addr::Op0
|| pc_update != PcUpdate::Regular
|| opcode != Opcode::AssertEq
|| (ap_update_num != 0 && ap_update_num != 2)
{
return Err(VirtualMachineError::InvalidQM31AddMulFlags(flags & 0x7FFF));
}
OpcodeExtension::QM31Operation
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +499 to +511
#[test]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
fn decode_qm31_operation_invalid_flags() {
// opcode_extension| opcode|ap_update|pc_update|res_logic|op1_src|op0_reg|dst_reg
// 79 ... 17 16 15| 14 13 12| 11 10| 9 8 7| 6 5|4 3 2| 1| 0
// QM31Operation| CALL| REGULAR| JumpRel| Op1| FP| AP| AP
// 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0
// 1 1001 0001 0000 1000 = 0x19108; off0 = 1, off1 = 1
let error = decode_instruction(0x19108800180018001);
assert_matches!(
error,
Err(VirtualMachineError::InvalidQM31AddMulFlags(0x1108))
);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 6 files at r4, 3 of 7 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: 15 of 19 files reviewed, 4 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)


vm/src/vm/vm_core.rs line 2616 at r7 (raw file):

    #[test]
    #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
    fn compute_res_qm31_add_relocatable_values() {

we need more cases covered


vm/src/vm/decoding/decoder.rs line 128 at r7 (raw file):

    }

    let qm31_operation_flags_invalid = (res != Res::Add && res != Res::Mul)

please change to ..._valid

Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 7 files at r6.
Reviewable status: 18 of 19 files reviewed, 5 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @ohad-nir-starkware, @Oppen, @pefontana, and @yuvalsw)


vm/src/typed_operations.rs line 22 at r7 (raw file):

) -> Result<MaybeRelocatable, VirtualMachineError> {
    match opcode_extension {
        OpcodeExtension::Stone => Ok(x.add(y)?),

why not just

OpcodeExtension::Stone => x.add(y),

Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 11 files at r3.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @ohad-nir-starkware, @Oppen, @pefontana, and @yuvalsw)


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 80 at r7 (raw file):

) -> felt {
    alloc_locals;
    

remove spaces


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 118 at r7 (raw file):

        assert flags[1] = 1; // flag_op0_base_fp
    }
    assert flags[3] = 2 - is_imm - flags[0] - flags[1]; // flag_op1_base_fp

(2 - flags[0] - flags[1]) * (1 - is_imm)


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 176 at r7 (raw file):

    }
    if (is_mul == TRUE) {
        dw 0x1c05380007ffd7ffc;

missing two asserts

Copy link
Collaborator Author

@ohad-nir-starkware ohad-nir-starkware left a 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, 8 unresolved discussions (waiting on @DavidLevitGurevich, @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 80 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

remove spaces

Done.


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 118 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

(2 - flags[0] - flags[1]) * (1 - is_imm)

Done.


cairo_programs/stwo_exclusive_programs/qm31_opcodes_test.cairo line 176 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

missing two asserts

Done.


vm/src/typed_operations.rs line 22 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

why not just

OpcodeExtension::Stone => x.add(y),

because it returns Result(MaybeRelocatable, MathError) instead of Result(MaybeRelocatable, VirtualMachineError) so the compiler needs it to be wrapped this way.


vm/src/vm/vm_core.rs line 2616 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

we need more cases covered

added more tests, let me know whether they are enough


vm/src/vm/decoding/decoder.rs line 128 at r7 (raw file):

Previously, DavidLevitGurevich wrote…

please change to ..._valid

Done.

Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r8, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)

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

Successfully merging this pull request may close these issues.

3 participants