Open aviggiano opened 12 months ago
I think there is an opportunity to standardize on a simple common format. It would open up some interesting possibilities:
I'd like to suggest a format inspired by https://github.com/ethereum/tests: https://karmacoma.notion.site/Common-Corpus-Format-1d273a31ae4b43a4bc9f4df1e96fa900?pvs=4
I think I'd be pretty happy to work with this format but I'd love to hear what you think.
I believe the whole industry would benefit from this standardization. CC @gakonst @mds1
@karmacoma-eth wanted to make sure I properly understand your proposed format - for a scenario like:
where the test execution would look something like
[30977] TestHandler::work(3613300754934649 [3.613e15])
├─ [0] VM::roll(19812633)
│ └─ ← [Return]
├─ [189] TargetContract::doSomething(3613300754934649)
│ └─ ← [Stop]
├─ [0] VM::warp(19812634 [1.981e7])
│ └─ ← [Return]
└─ ← [Stop]
Should the call sequence include only the children txes as in
or should also include the parent as in
(I assume 1st option?) thanks!
@grandizzy there is a 3rd option (include only the top level call):
calls = [
{
"sender":"0xeaa1ffc3f1012ad923577141ed582ab41d006934",
"to":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f",
"data":"0x5858d161000000000000000000000000000000000000000000000000000cd64723f6eb79",
"_info":"TestHandler::work(3613300754934649)"
}
]
I think this option is more correct, the idea is that we should only represent calls made by the driver to the test code. In this case, the driver has invoked TestHandler::work(3613300754934649)
, and the subcalls happened internally in TestHandler
. If we do include the subcalls in the trace, it should only be informational.
In other words, the only thing necessary to replay the same result should be for the test driver to run the same setUp and then invoke TestHandler::work(3613300754934649)
again
thank you, makes sense, will update support to use this format
We are still working on a draft of a standard that includes necessary info e.g. the ABI of TestHandler::work
and will share with Foundry and Halmos soon for feedback.
Describe the desired feature
This is a feature request to standardize the corpus between https://github.com/crytic/echidna and https://github.com/crytic/medusa, so that it is easier to replay transactions from one tool on the other.
Ref: https://github.com/crytic/echidna/issues/1123