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

Fixes to run the bootloader integration tests #37

Commits on Feb 22, 2024

  1. Fix: make the project compile

    Some issues occurred when compiling the project with the Madara prover
    API.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    7698c76 View commit details
    Browse the repository at this point in the history
  2. Fix: use correct type when setting simple_bootloader_input

    Store the `simple_bootloader_input` field of the bootloader input
    instead of storing the whole bootloader_input.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    7c3c338 View commit details
    Browse the repository at this point in the history
  3. Fix: use correct hint code for %{ 0 %}

    The hint is compiled to a different code.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    7b5b3df View commit details
    Browse the repository at this point in the history
  4. Fix: use correct hint code for validate_hash

    A backslash was encoded the wrong way in the hint code.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    8d6ccf6 View commit details
    Browse the repository at this point in the history
  5. Inner select builtins hint: select builtin

    Implement the hint that determines whether a specific builtin is
    selected for the given program.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    baac9ef View commit details
    Browse the repository at this point in the history
  6. Fix: consider output_ptr as a relocatable instead of a value

    `pre_execution_builtin_ptrs` is an array of pointers, not of values as
    we previously understood.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    9cdcdc5 View commit details
    Browse the repository at this point in the history
  7. Fix: do not force integer type when copying builtins

    Problem: `write_return_builtins` copies data from the pre-execution
    builtins for each builtin not used by the program. We specify that the
    value of the pre-execution builtins is integer, which is not the case.
    
    Solution: just copy the memory without enforcing a specific type.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    0e7c781 View commit details
    Browse the repository at this point in the history
  8. Fix: output_runner_data is an optional

    Implemented `get_task_fact_topologies` for Cairo PIE tasks at the same
    time.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    4a4d1fb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b1055e4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    615866b View commit details
    Browse the repository at this point in the history
  11. Fix: use correct hint code for nondet %{ ids.num // 2 %}

    The hint is compiled to a different code.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    0c5c9de View commit details
    Browse the repository at this point in the history
  12. Fix: use correct hint code for isinstance(packed_output, PlainPackedO…

    …utput)
    
    The hint is compiled to a different code.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    67d3b46 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9fd7790 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    640bee9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    97ebd55 View commit details
    Browse the repository at this point in the history
  16. Fix: use program identifiers to determine ret_pc for Cairo PIEs

    Remove the hardcoded value for `ret_pc` and compute it using the program
    identifiers instead. We now expect the bootloader program to be
    accessible as the `bootloader_program` variable in the root execution
    scope.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    392c4b6 View commit details
    Browse the repository at this point in the history
  17. Fix: deserialize PIE additional data as struct instead of hashmap

    Problem: Deserializing the PIE additional data as a hashmap of
    `BuiltinAdditionalData` enums because of an issue with deserializing
    untagged unions in `serde`
    (see serde-rs/json#1103).
    
    Solution: add a new `AdditionalData` struct with explicit fields for each
    builtin, circumventing the untagged union issue. This solution has the
    advantage of always associating the correct data type for each builtin
    (it's not possible anymore to associate a builtin with a different data
    type), but requires modifications if a new builtin is added.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    25d35b1 View commit details
    Browse the repository at this point in the history
  18. Fix: call_task test

    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    c95396d View commit details
    Browse the repository at this point in the history
  19. Fix: deserialize ECDSA builtin data from Python VM format

    Problem: the ECDSA/signature builtin additional data is stored
    internally as a hashmap, but the Python VM stores it as a vector of
    tuples.
    
    Solution: Add a `SignatureBuiltinAdditionalData` struct and implement a
    custom deserializer for it that can take either a hashmap or a vector.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    b7685a1 View commit details
    Browse the repository at this point in the history
  20. Fix: support loading PIE memory files > 32KB

    Fixed a bug in the memory file loader implementation.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    76622d8 View commit details
    Browse the repository at this point in the history
  21. Feature: support output pages in public input memory

    Problem: output page IDs do not appear when exporting the builtin
    memory, but default to page 0 instead.
    
    Solution: add a `get_public_memory` to the output builtin to export page
    IDs correctly.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    d3a33c2 View commit details
    Browse the repository at this point in the history
  22. Feature: deserialize Cairo PIE from bytes

    Added a `from_bytes` class method to build a `CairoPie` method in
    addition to the existing `from_file` method.
    odesenfans committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    e0a4653 View commit details
    Browse the repository at this point in the history