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

[Tracking] EIP-2537: BLS12-381 precompiles #26

Closed
meyer9 opened this issue Jan 23, 2025 · 12 comments
Closed

[Tracking] EIP-2537: BLS12-381 precompiles #26

meyer9 opened this issue Jan 23, 2025 · 12 comments
Labels
A-op-geth Area: op-geth (go execution client incl. go evm) A-op-program Area: op-program (go fault-prover) A-op-revm Area: op-revm (rust evm) A-spec Area: spec H-isthmus Hardfork: change is planned for Isthmus upgrade H-pectra Hardfork: change planned for Pectra (L1) upgrade M-tracking Meta: tracking issue U-node Upgrade: involving changes to node component (cl, el, etc.)

Comments

@meyer9
Copy link
Author

meyer9 commented Jan 23, 2025

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

@emhane emhane added U-node Upgrade: involving changes to node component (cl, el, etc.) A-op-revm Area: op-revm (rust evm) H-isthmus Hardfork: change is planned for Isthmus upgrade H-pectra Hardfork: change planned for Pectra (L1) upgrade A-spec Area: spec labels Jan 23, 2025
@emhane
Copy link
Member

emhane commented Jan 23, 2025

seems no changes are needed for op-reth and op-alloy to make this work, right? neither for op-program or kona right? removing the headings from the issue to reflect that @meyer9

@emhane emhane added A-op-geth Area: op-geth (go execution client incl. go evm) U-smart-contract Upgrade: involving changes to smart contracts M-platform M: platform development labels Jan 23, 2025
@emhane
Copy link
Member

emhane commented Jan 23, 2025

this doesn't require any engagement from solidity devs, but it does require deployment of same contract as on l1, right @janjakubnanista ?

@emhane emhane added the M-tracking Meta: tracking issue label Jan 23, 2025
@janjakubnanista
Copy link

@emhane not sure here

@emhane
Copy link
Member

emhane commented Jan 24, 2025

would you tag someone who would know pls @janjakubnanista ?

@janjakubnanista
Copy link

@zhwrd / @mslipper possibly

@meyer9
Copy link
Author

meyer9 commented Jan 24, 2025

I think we need to add the BLS operations as accelerated precompiles to op-program: https://github.com/ethereum-optimism/optimism/blob/7bb33f991d90ecde978fa2937cbee0b0f3804a64/op-program/client/l2/engineapi/precompiles.go#L58-L71

op-program could also execute these independently of L1 technically, but these operations are generally pretty expensive and would benefit greatly by calling out to L1. This will prevent us from affecting challenger performance much by making these changes. secp256k1 was one precompile that needed to be implemented in op-program instead of accelerated because it doesn't exist on L1 and it caused a big performance hit in op-program.

Created this issue: ethereum-optimism/optimism#13975

@emhane
Copy link
Member

emhane commented Jan 24, 2025

does this mean that some change is also needed in kona @meyer9 ? cc @clabby

@clabby
Copy link
Member

clabby commented Jan 24, 2025

Yes @emhane, we'll need to add it as a new "accelerated precompile."

These are registered in the client program here, and the BLS precompile will also need to be added into the host here.

We'll also need to be cognizant of the ability to reproduce the precompile call on L1 via the PreimageOracle contract's loadPrecompilePreimagePart function. The BLS12-381 precompile accepts variable-length inputs, so it'll have variable gas, and we'll need to cap this within both the client software and the proof. We did the same thing for the ecPairing precompile in the Granite hardfork, since it's also accelerated in the proof + has dynamic gas consumption based on the input.

@emhane emhane removed M-platform M: platform development U-smart-contract Upgrade: involving changes to smart contracts labels Jan 31, 2025
@meyer9
Copy link
Author

meyer9 commented Feb 4, 2025

Need to accelerate Kona precompiles: op-rs/kona#1000

@meyer9
Copy link
Author

meyer9 commented Feb 4, 2025

Added link to PR for geth change also: ethereum-optimism/optimism#14154

@emhane
Copy link
Member

emhane commented Feb 7, 2025

closing, implementation done. moving acceptance test pr to root tracking issue in order to document the incremental progress that implementation and unit testing is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-geth Area: op-geth (go execution client incl. go evm) A-op-program Area: op-program (go fault-prover) A-op-revm Area: op-revm (rust evm) A-spec Area: spec H-isthmus Hardfork: change is planned for Isthmus upgrade H-pectra Hardfork: change planned for Pectra (L1) upgrade M-tracking Meta: tracking issue U-node Upgrade: involving changes to node component (cl, el, etc.)
Projects
None yet
Development

No branches or pull requests

4 participants