Update FIP-0097 (Transient Storage): Add Implementation Details, Security Considerations, and Test Cases #1115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update FIP-0097: Add Implementation Details, Security Considerations, and Test Cases
Summary
This PR updates FIP-0097 to include:
TLOAD
andTSTORE
.These updates clarify the behavior of transient storage (
TSTORE
/TLOAD
) and provide a more robust specification for its implementation in FEVM.Changes in this PR
1. Added "Implementation Details" Section
TransientData
for tracking transient storage state.TransientDataLifespan
to enforce transaction lifecycle constraints.origin
andnonce
of a transaction.2. Modified "Specification" Section
TLOAD
andTSTORE
3. Expanded "Lifecycle Management" Section
StateKamt<U256, U256>
to maintain transaction-scoped isolation.4. Extended "Test Cases" Section
Basic Functionality Tests
TLOAD
retrieves expected values.TSTORE
correctly writes to transient storage.TLOAD
from an uninitialized key returns zero.Lifecycle Validation Tests
Cross-Contract Isolation Tests
A
andB
.A
writes to transient storage.B
attempts to accessA
’s transient storage.B
cannot readA
’s transient data.Handling of Reverted Transactions
TLOAD
returns zero after the revert.5. Strengthened "Security Considerations"
Automatic Clearing at Transaction End
Cross-Contract Data Isolation
Reentrancy Safety