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

[feat] Precompile MODEXP #520

Merged
merged 69 commits into from
Aug 1, 2023
Merged

[feat] Precompile MODEXP #520

merged 69 commits into from
Aug 1, 2023

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented May 30, 2023

Work plan:

  • Induce and wrap modexp circuit from Gaoxin's work
  • Parse memory bytes for input and connect with the wrapped modexp circuit via ModExpTable
  • Error handling: have to prove any invalid input bytes lead to empty output (the precompile always has a successful call)

This work would base on the PR of ECRECOVER to make use of some essential feature

[DO NOT MERGE] until following has completed:

Pending tasks (not planned in current PR)

  • truncate / zero padding the input bytes according to expected input size
  • gas cost
  • pass a mock prove

Base automatically changed from feat/precompile-call to develop June 7, 2023 12:16
@noel2004 noel2004 force-pushed the feat/precompile-modexp branch from 15eeecb to e60cb31 Compare June 13, 2023 14:38
@noel2004 noel2004 changed the title [feat] Modexp precompile [feat] Precompile MODEXP Jun 18, 2023
@noel2004 noel2004 force-pushed the feat/precompile-modexp branch from 4e34e7a to acc9ce8 Compare June 18, 2023 09:12
@noel2004 noel2004 force-pushed the feat/precompile-modexp branch from ccbe857 to ad62cbf Compare June 27, 2023 01:32
@lispc
Copy link

lispc commented Jul 30, 2023

i noticed so many codes is used to handle padding bytes..

@noel2004
Copy link
Member Author

i noticed so many codes is used to handle padding bytes..

Yes. Some code is written before PowOfRand table can be used. Now they have been pruned.

@lispc lispc merged commit f05db90 into develop Aug 1, 2023
@lispc lispc deleted the feat/precompile-modexp branch August 1, 2023 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants