Repository navigation
arbos/tracing: fix swapped caller/address in NewTracingInfo's fake Contract - #4772
Open
HusseinAdeiza wants to merge 1 commit into
Open
HusseinAdeiza wants to merge 1 commit into
HusseinAdeiza wants to merge 1 commit into
Conversation
…ntract NewTracingInfo built its fake vm.Contract with vm.NewContract(to, from, ...), but go-ethereum's signature is NewContract(caller, address, ...) and ScopeContext.Address() reports the second argument. Every fake opcode emitted through this TracingInfo (RecordStorageGet/Set, CaptureEVMTraceForHostio, captureState) therefore carried a scope naming the caller instead of the executing contract, so prestateTracer recorded Stylus SLOAD/SSTOREs and non-ArbOS state writes under the sender's account (diff mode showed nothing for the contract). Swap to NewContract(from, to, ...): caller = the message sender, address = the executing contract, matching the pattern already used in MockCall (tracing.go:87) and the semantics of the NewTracingInfo call sites in tx_processor.go. Fixes OffchainLabs#4771 Signed-off-by: Hussein Adeiza Yunusa <HusseinAdeiza@users.noreply.github.com>
|
|
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Fixes #4771
NewTracingInfobuilt its fakevm.Contractwithvm.NewContract(to, from, ...), but go-ethereum's signature isNewContract(caller, address, ...)andScopeContext.Address()reports the second argument. Every fake opcode emitted through thisTracingInfo(RecordStorageGet/Set,CaptureEVMTraceForHostio,captureState) therefore carried a scope naming the caller instead of the executing contract, soprestateTracerrecorded StylusSLOAD/SSTOREs and non-ArbOS state writes under the sender's account (diff mode showed nothing for the contract).Swap to
NewContract(from, to, ...): caller = the message sender, address = the executing contract, matching the pattern already used inMockCall(tracing.go:87) and the semantics of theNewTracingInfocall sites intx_processor.go.Note for reviewers: full local verification of
arbos/utilrequires the solgen codegen chain (contracts + contracts-legacy + safe-smart-account submodules plus a yarn/forge pipeline); the branch compiles at the file level and the change is a two-token argument-order fix confined to this struct literal. CI's solgen + tracer tests cover the behavior.