Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Conversation

@roynalnaruto
Copy link

Description

EVM Circuit Gadget for EcPairing precompile verification.

The EcPairingGadget, unlike the EcAddGadget or EcMulGadget, is designed to be capable of handling valid as well as invalid inputs supplied to the precompile call. So if the call fails (CallContext::IsSuccess == false), we should be able to validate the following:

cb.require_true(
    "ecPairing: possible reasons for failure",
    or::expr([
        // 1. len(inputs) > 4 * 192
        // 2. len(inputs) % 192 != 0
        // 3. any point not on curve (G1 / G2)
    ]),
);

Issue Link

Closes #596

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@roynalnaruto roynalnaruto self-assigned this Jul 21, 2023
@roynalnaruto roynalnaruto changed the title Feat/ec pairing EcPairing EVM Circuit Gadget Jul 21, 2023
@lispc
Copy link

lispc commented Aug 14, 2023

i think this is irrelevant and can be closed now?

@roynalnaruto
Copy link
Author

@lispc

i think this is irrelevant and can be closed now?

This PR was WIP for error handling. I need to rebase/update it based on all the latest changes and then make more progress for error handling.

@roynalnaruto
Copy link
Author

Closing this as the work is now done in #811

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EcPairing Execution State Validation

3 participants