Skip to content

add SSTORE and SLOAD to traces#456

Merged
0xkarmacoma merged 4 commits into
mainfrom
feat/trace-sstore-sload
Feb 13, 2025
Merged

add SSTORE and SLOAD to traces#456
0xkarmacoma merged 4 commits into
mainfrom
feat/trace-sstore-sload

Conversation

@0xkarmacoma

Copy link
Copy Markdown
Contributor

out

@0xkarmacoma

Copy link
Copy Markdown
Contributor Author

will add a --trace-events CALL,CREATE,SSTORE option

Comment thread src/halmos/sevm.py

def sstore(self, ex: Exec, addr: Any, loc: Any, val: Any) -> None:
ex.context.trace.append(StorageWrite(addr, loc, val))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to add this event even in the case of raising WriteInStaticContext below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think it's going to be useful for debugging - so you know what it tried to write that caused the revert

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example
image

@0xkarmacoma

Copy link
Copy Markdown
Contributor Author

will add a --trace-events CALL,CREATE,SSTORE option

in 4685084

@0xkarmacoma 0xkarmacoma enabled auto-merge (squash) February 13, 2025 22:03
@0xkarmacoma 0xkarmacoma merged commit a307d06 into main Feb 13, 2025
@0xkarmacoma 0xkarmacoma deleted the feat/trace-sstore-sload branch February 13, 2025 22:07
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.

2 participants