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

Conversation

@roynalnaruto
Copy link

@roynalnaruto roynalnaruto commented Aug 23, 2023

Description

Issue Link

Closes #799

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

kunxian-xia and others added 2 commits August 25, 2023 18:37
* enforce gas_cost for ec_add

* enforce gas_cost for ec_mul

* enforce gas_cost for ec_pairing

* fix: test case generation random G2 coeffs

* chore: refactor unnecessary cell being returned

* enforce gas_cost for modexp

* remove tests for gadget that wont be used

* tests: invalid cases for ecpairing

* fix: input cells (pairing) for RLC

---------

Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
@roynalnaruto roynalnaruto marked this pull request as ready for review August 25, 2023 17:38
@roynalnaruto roynalnaruto requested a review from lispc August 25, 2023 17:39
@roynalnaruto roynalnaruto mentioned this pull request Aug 25, 2023
4 tasks
@roynalnaruto roynalnaruto changed the title invalid inputs precompile Handle precompile call failure call.is_success == false due to "Invalid Inputs" and "Insufficient Gas" Aug 25, 2023
@lispc
Copy link

lispc commented Aug 26, 2023

generally looks good now.

complex codes anyway. need some tests after or before merging:

  1. super circuit mock proving (before merging), wip
  2. variadic_size_check? especially for err cases.
  3. testool (after merging?). thousands of test cases. (may be better err msg for modexp input > U256 and pairing input num > 4)
  4. super circuit real proving. (part of testool massive proving)

TODO later:

  1. limit precompileFailed only accepts 3 hash precompiles

@roynalnaruto
Copy link
Author

@lispc pushed commit: 4223a54 to check variadic size for ECC Circuit with valid+invalid inputs

@kunxian-xia kunxian-xia mentioned this pull request Aug 26, 2023
10 tasks
@lispc lispc force-pushed the feat/invalid-inputs-precompile branch from 5c02a61 to 4223a54 Compare August 27, 2023 03:21
roynalnaruto and others added 2 commits August 27, 2023 13:53
* add oog test for ec add

* add precompile oog gadget

* add oog precompile in bus-mapping

* fix compile error

* fix

* fix copy input bytes even precompile calls oog

* fix constraint errors

* add oog test for ec_mul & ec_pairing

* add identity oog

* fix

* add oog in modexp

---------

Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
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.

Tracking issue for "Invalid Inputs" to Precompiled Contract Calls

4 participants