Skip to content

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Aug 6, 2025

Why this should be merged

The vm.PrecompileEnvironment.Call() method requires careful usage because of reentrancy vulnerabilities (this is common to all outgoing CALLs in the EVM, not just stateful precompiles). This package provides a common method of protection, a reentrancy guard.

How this works

Provides a function that returns vm.ErrExecutionReverted if called twice, by the same contract, in the same transaction, with the same identifier.

How this was tested

Integration test.

@ARR4N ARR4N changed the title feat: PrecompileEnvironment.ReentrancyGuard() feat: reentrancy.Guard Sep 25, 2025
@ARR4N ARR4N self-assigned this Sep 25, 2025
@ARR4N ARR4N marked this pull request as ready for review September 25, 2025 11:34
@ARR4N ARR4N requested a review from a team September 25, 2025 11:34
@ARR4N ARR4N changed the title feat: reentrancy.Guard feat: reentrancy.Guard for stateful precompiles Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant