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

Mega precompile testing PR: SHA2-256, RIPEMD-160, IDENTITY, MODEXP, ECADD, ECMUL, ECRECOVER #1778

Open
wants to merge 46 commits into
base: arith-dev
Choose a base branch
from

Conversation

OlivierBBB
Copy link
Collaborator

@OlivierBBB OlivierBBB commented Feb 5, 2025

The purpose of this issue is to test the "happy path" of precompiles in the following scenarios:

  • MESSAGE_CALL_TRANSACTION: the ROOT contract calls the precompile
  • CONTRACT_DEPLOYMENT_TRANSACTION: the init code running in the ROOT calls the precompile
  • MESSAGE_CALL_FROM_ROOT: the ROOT does a CALL to some SMC; this SMC performs the requisite calls to the precompile;
  • DURING_DEPLOYMENT: the ROOT deploys a contract (via CREATE); the init code of said deployment performs the requisite CALLs to the desired precompile;
  • AFTER_DEPLOYMENT: the ROOT deploys a contract (via CREATE); the thus deployed SMC is then called by the ROOT; the SMC then performs the desired call to the precompile.

We achieve this by using the 5 code execution methods from the CodeExecutionMethods class.

We cover the following precompiles:

  • SHA2-256
  • RIPEMD-160
  • IDENTITY
  • MODEXP
  • ECADD
  • ECMUL
  • ECRECOVER

@OlivierBBB OlivierBBB self-assigned this Feb 5, 2025
They now

- produce return data via some precompile and play around with it
- wipe said return data (and play around with it)
- produce return data via some other precompile and play around with it
Copy link

sonarqubecloud bot commented Feb 6, 2025

@OlivierBBB OlivierBBB changed the title Precompile testing for SHA2-256, RIPEMD-160 and IDENTITY Mega precompile testing PR: SHA2-256, RIPEMD-160, IDENTITY, MODEXP, ECADD, ECMUL, ECRECOVER Feb 19, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase issue I guesss ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants