-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Etheno depends on transaction receipt requests for exporting with "-x" #93
Comments
I think we need to discuss #95 first, to avoid modifying some code that we will need to rewrite later 😞 |
I've made some hacky changes to be able to continue my current work on the Damn Vulnerable DeFi challenges: |
Hi @rappie thanks for bringing this up, this will be a great feature addition. After thinking through it for a bit, the simplest option seems to be to use the So the flow would be:
The main edge case that comes to mind is that any function call(s) made in the last block won't be checked for receipts since no additional We can try to squeeze in this feature in an upcoming release. I'll come up with a final design and post here for your thoughts. |
@rappie so I've been working on a bug fix for this here: The general idea here was to not call The one edge case I noticed is if the last transaction to be made is a contract creation call.
If you run this branch on the code above, etheno will hang and never successfully complete a call using
then since |
Awesome, I will take a look soon. You can add the following line to fix problems with contract deployments not being logged: await SimpleStorageTwo.deployed() I have discovered this recently and haven't investigated why it works. I assume it forces hardhat to do an |
Yup, Btw, the |
I have tested the your changes and everything seems to be working. There are some differences in the order of transactions being logged compared to my own (hacky) bugfixed version. I dont know which one is correct and it doesnt seem to be causing any problems. I've switched to the RC1 branch as my daily driver. I'll let you know if I run into any problems. Thanks 😄 |
That's great to hear @rappie - thank you for your help in testing this out. The order will be different but I don't believe that that should cause any side effects. However, to make sure I will chat with Gustavo to see what happens from the Echidna side. |
Hi.
I've been having problems with exporting my deployment transactions using Hardhat. It turns out this is because the etheno logging system depends on a
eth_getTransactionReceipt
for it's exporting plugin (EventSummaryExportPlugin
). Hardhat does not request this receipt by default for function calls, so only contract deployments are being logged. Truffle does request this by default for both functions and deployments. I have not tested it in any other frameworks.When I specifically request a receipt in the hardhat deploy script I can get it to work using the following code:
Right now this is something that has to be remembered every time to keep an accurate etheno export. People new to etheno will probably not know this at all. I think it would be an nice improvement if etheno can support this out of the box. Without the need for manually requesting the receipt.
I have been tinkering with the etheno code a bit, looking for a fix. I've come up with 2 ideas for a possible fixes. Each have their own problems though, i'm hoping you guys can shed some light on this.
eth_sendRawTransaction
because you dont need to know the address of a deployed contract (which you can only know afterwards). The problem here is that currently "gas used" is also being logged. This is something you can't know in advance either, right? Is it important to keep logging this?eth_getTransactionReceipt
at all. Etheno could just call this itself after every transaction. This would be the most robust fix in my opinion. The problem here is that we cannot do this right away, because the transaction is still being mined. So using theafter_post
hook for this if impossible. Correct me if i'm wrong. We'd have to have another kind of hook, or can we useevm_mine
for this?I'd be interested in putting a bit of time into this. So far i've been looking at this for about 2-4 hours. I expect one of these fixes to take another 4-8 hours (if they turn out to be possible).
Let me know what you think and if this would be elligible for a bounty. Thanks.
The text was updated successfully, but these errors were encountered: