Skip to content

Conversation

@StephenButtolph
Copy link

Why this should be merged

Coreth and Subnet-EVM require access to the current tx hash in the Warp precompile (for selecting the correct predicate results).

This can not be exposed as a wrapper through the OverrideEVMResetArgs because SetTxContext is called prior to resetting the EVM instance. Therefore, the SetTxContext function on any DB wrapper would never be called.

How this works

Exposes the existing txHash through a GetTxHash() function.

How this was tested

Added a trivial unit test.

@StephenButtolph StephenButtolph changed the title Add *StateDB.GetTxHash for usage with Warp Add *StateDB.TxHash for usage with Warp Jul 21, 2025
@StephenButtolph StephenButtolph requested a review from ARR4N July 21, 2025 19:55
StephenButtolph and others added 2 commits July 21, 2025 19:54
Co-authored-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
Signed-off-by: Stephen Buttolph <stephen@avalabs.org>
@StephenButtolph StephenButtolph merged commit 99f0d0b into main Jul 22, 2025
12 checks passed
@StephenButtolph StephenButtolph deleted the StephenButtolph/add-GetTxHash branch July 22, 2025 02:20
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.

3 participants