Skip to content

Comments

Custom crypto provided#28

Draft
hecmas wants to merge 28 commits intomainfrom
feat/new-patch-style
Draft

Custom crypto provided#28
hecmas wants to merge 28 commits intomainfrom
feat/new-patch-style

Conversation

@hecmas
Copy link
Member

@hecmas hecmas commented Jan 21, 2026

  • Precompiles have been patched using a similar function install_crypto introduced in revm in this PR.
  • ecrecover for tx signature recovery has been patched using a global function install_default_provider introduced in allor-rs in this PR.
  • keccak has been patched my activating the flag native-kecccak for the alloy-primitives crate, since when the native-keccak feature is enabled on alloy-primitives, users can provide their own keccak implementation by exporting a native_keccak256 function:
    fn native_keccak256(bytes: *const u8, len: usize, output: *mut u8);

TODOS:

  • Fall back to native implementation for ALL the functions (not reimplement).
  • Patch all functions in the crypto provider, except ripemd and blake2.
  • Make sure zeth depends on alloy-rs when using the ecrecover optimization for tx signature recovery.

@hecmas hecmas requested a review from agnusmor January 21, 2026 17:55
@cla-bot cla-bot bot added the cla-signed label Jan 21, 2026
agnusmor and others added 27 commits January 22, 2026 03:06
Fix public_key_to_address alloy_consensus dependency
Update dependencies for patched crates
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.

2 participants