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

fix: missing gas costs and memory issues #121

Merged
merged 1 commit into from
Jun 19, 2024
Merged

fix: missing gas costs and memory issues #121

merged 1 commit into from
Jun 19, 2024

Commits on Jun 19, 2024

  1. fix: missing gas costs and memory issues

    Add missing gas costs for multiple operations, mainly for FheBool,
    FheUint160 and FheUint2048.
    
    Note that verify for bool is more expensive due to lack of cast from
    2048 bits to bool - doing not equal instead.
    
    Make `castTo()` fail and not panic on bad type input.
    
    Fixed a memory leak in `executeTernaryCiphertextOperation()` - the
    `first_ptr` pointer was never freed.
    
    Refactor some of the code such that it uses `defer` with destroy as
    close to the point where memory is allocated as possible - that fixes
    memory leaks on early returns in multiple places.
    
    C code needs to be refactored and reduced. Maybe we can use codegen or
    a tool for that.
    dartdart26 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    805bc13 View commit details
    Browse the repository at this point in the history