Repository navigation
feat(transaction-controller): gate future resimulation by trust - #10747
Merged
Merged
Conversation
pedronfigueiredo
approved these changes
Oct 8, 2026
8 of 10 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
Add an optional trust callback to
TransactionController. Trusted transactions continue to re-simulate on the current block, while untrusted transactions keep the future-block timestamp used to detect time-dependent behavior.The callback defaults to untrusted, so existing consumers keep their current behavior until they explicitly provide trust data.
References
Checklist
Note
Medium Risk
Changes re-simulation timing for security-sensitive paths; incorrect trust classification could skip future-block checks on malicious or mismatched txs.
Overview
Adds an optional
isTransactionTrustedcallback onTransactionControllerOptionsso hosts can mark transactions that only touch trusted contracts. On re-simulation,shouldResimulatestill runs for security alerts and value/native-balance mismatches, but future-blockblockTime(used to surface time-dependent behavior) is applied only when the transaction is not trusted.The callback defaults to always untrusted (
false), so existing integrations keep today’s future-block re-simulation until they wire trust explicitly. Changelog and tests cover the new option and trusted vs untrustedblockTimebehavior.Reviewed by Cursor Bugbot for commit 8761887. Bugbot is set up for automated code reviews on this repo. Configure here.