Skip to content

feat(security): implement adaptive reentrancy guard with EIP-1153 transient support and storage fallback - #756

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
onajidavid87-web:main
Jul 30, 2026
Merged

feat(security): implement adaptive reentrancy guard with EIP-1153 transient support and storage fallback#756
mijinummi merged 1 commit into
MDTechLabs:mainfrom
onajidavid87-web:main

Conversation

@onajidavid87-web

Copy link
Copy Markdown
Contributor

Implementation adds AdaptiveReentrancyGuard — an abstract contract with two locking modes selected at construction:

  • Transient mode (useTransient = true): Uses Yul tload/tstore (EIP-1153) for ~100 gas per op, totaling ~300 gas for the full guard cycle
  • Storage mode (useTransient = false): Falls back to standard SSTORE with 1/2 sentinel values (warm slot, ~5000 gas cold start)
    Includes AdaptiveReentrancyGuardMock for testing and a matching Hardhat test suite in test/security/.

Closes #753

@mijinummi
mijinummi merged commit e669760 into MDTechLabs:main Jul 30, 2026
1 of 7 checks passed
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.

[CORE] Implement Dynamic Reentrancy Guard with EIP-1153 Transient Support

2 participants