Skip to content

Commit

Permalink
feat(utils/client): add secp256r1 cycle tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
fakedev9999 committed Jan 14, 2025
1 parent 270af2c commit 361ac33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/client/src/precompiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub(crate) const ANNOTATED_KZG_EVAL: PrecompileWithAddress = create_annotated_pr
);
pub(crate) const ANNOTATED_EC_RECOVER: PrecompileWithAddress =
create_annotated_precompile!(revm::precompile::secp256k1::ECRECOVER, "ec-recover");
pub(crate) const ANNOTATED_P256_VERIFY: PrecompileWithAddress =
create_annotated_precompile!(revm::precompile::secp256r1::P256VERIFY, "p256-verify");

// Source: https://github.com/anton-rs/kona/blob/main/bin/client/src/fault/handler/mod.rs#L20-L42
pub fn zkvm_handle_register<F, H>(handler: &mut EvmHandler<'_, (), &mut State<&mut TrieDB<F, H>>>)
Expand All @@ -68,6 +70,7 @@ where
ANNOTATED_BN_PAIR,
ANNOTATED_KZG_EVAL,
ANNOTATED_EC_RECOVER,
ANNOTATED_P256_VERIFY,
];
ctx_precompiles.extend(override_precompiles);

Expand Down

0 comments on commit 361ac33

Please sign in to comment.