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

EIP-2537: Precompile for BLS12-381 curve operations #509

Open
1 task
emhane opened this issue Jan 15, 2025 · 8 comments · Fixed by bluealloy/revm#2000
Open
1 task

EIP-2537: Precompile for BLS12-381 curve operations #509

emhane opened this issue Jan 15, 2025 · 8 comments · Fixed by bluealloy/revm#2000
Labels
A-evm Area: EVM A-prover A: fault prover H-pectra Hardfork: change planned for Pectra (L1) upgrade U-node Upgrade: involving changes to node component (cl, el, etc.) U-smart-contract Upgrade: involving changes to smart contracts

Comments

@emhane
Copy link
Member

emhane commented Jan 15, 2025

https://eips.ethereum.org/EIPS/eip-2537

op-revm

op-geth

smart-contract

References

@emhane emhane added H-pectra Hardfork: change planned for Pectra (L1) upgrade U-node Upgrade: involving changes to node component (cl, el, etc.) U-smart-contract Upgrade: involving changes to smart contracts A-op-revm labels Jan 15, 2025
@meyer9
Copy link
Contributor

meyer9 commented Jan 15, 2025

I took a swing at this one here: bluealloy/revm#2000

@emhane emhane added A-evm Area: EVM and removed A-op-revm labels Jan 16, 2025
@protolambda
Copy link
Contributor

This needs:

  • a spec PR to explicitly state this EIP is part of the upgrade
  • monorepo test that the precompile is usable when the op-stack fork is active (covers at least op-geth, but op-reth testing would also be nice)
  • op-program change to override the new BLS precompiles, and hook them up to the preimage oracle, like we have done with other precompiles.

Also warning: if I understood correctly from ACD calls, there are some G2mul precompiles of the BLS precompile set that were being removed, and still seem present in devnet 5, but not in final L1 Pectra scope, due to them being considered unnecessary/duplicate. We should not include these last-minute removed precompiles in L2.

@meyer9
Copy link
Contributor

meyer9 commented Jan 17, 2025

The removal of MUL precompiles, and pricing changes suggested in the ACD calls is implemented here in geth: ethereum/go-ethereum#30978

We'll need to pull this into op-geth once merged.

@Inphi
Copy link
Contributor

Inphi commented Jan 17, 2025

We also need a performance analysis of any introduced precompiles to ensure that derivation is fault provable by cannon/op-program (and probably asterisc/kona too). Similar to the Cannon benchmarking performed by Base for the gas limit increase.

It should answer questions like: Do BLS12-381 operations require too many steps to execute under cannon? How much memory is used by the VM in the worst case execution?

@meyer9
Copy link
Contributor

meyer9 commented Jan 21, 2025

@Inphi I believe we can utilize the L1 precompiles for this. The reason we needed to benchmark the P256VERIFY precompile is that it isn't implemented on L1, so the fault proof program has to execute it. For this, we're implementing Isthmus as a fast follow-up to Pectra, so the BLS operations can just be passed through. Let me know if I'm missing something though!

@meyer9
Copy link
Contributor

meyer9 commented Jan 23, 2025

Update on this work:

These are blocked by some fixes to get Isthmus/geth e2e tests working:

Planning on working on fault proofs accelerated precompile tests soon, and testing Reth precompiles as well later this week.

@emhane
Copy link
Member Author

emhane commented Jan 23, 2025

Update on this work:

These are blocked by some fixes to get Isthmus/geth e2e tests working:

Planning on working on fault proofs accelerated precompile tests soon, and testing Reth precompiles as well later this week.

pls add links in pm repo better, this is specs repo, and when spec is merged this issue will close, but doesn't mean implementation is done

the issue doesn't exist, so please make a new one ethereum-optimism/pm#23

@meyer9
Copy link
Contributor

meyer9 commented Jan 23, 2025

ah makes sense! I'll make an issue there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-evm Area: EVM A-prover A: fault prover H-pectra Hardfork: change planned for Pectra (L1) upgrade U-node Upgrade: involving changes to node component (cl, el, etc.) U-smart-contract Upgrade: involving changes to smart contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants