Open jim380 opened 1 year ago
Hey @jim380, can you provide some details so I can reproduce locally? Cheers
@liamzebedee Hi Liam. You should be able to reproduce easily using Alchemy.
Also a sidebar question. Have you thought about turning this project into a local txn simulator? I built one using ethereumjs' VM library but eth-verifiable-rpc approaches it in a different way and I really like it.
I'll try a repro when I get a spare moment this week.
@jim380 oh yeah! @shazow suggested this to me a few weeks back. It wouldn't be that difficult, happy to help out / guide you on how could could build it.
@liamzebedee I actually built one using a much lower version of ethereumjs haha.
@jim380 Is yours public? Would love to check it out. :) It's on my list of things to prototype but not very high up the list right now. -_-
@shazow I took the base from this repo, trimmed it down and tweaked some of the VM settings to make it all work for my needs (i.e. I was having nonce issues etc.). We can collab and make it better. Sound good? Cc: @liamzebedee too here.
A couple of things:
@jim380 I think that's how a lot of OSS code evolves, someone stumbles on a cool idea and makes a trimmed-down and tweaked version of it, shares it in public (preferably with a permissive license), then someone else stumbles on that... repeat, until we arrive at our Utopian future! :)
@jim380 I think that's how a lot of OSS code evolves, someone stumbles on a cool idea and makes a trimmed-down and tweaked version of it, shares it in public (preferably with a permissive license), then someone else stumbles on that... repeat, until we arrive at our Utopian future! :)
I updated my original thread with the link to the repo I borrowed the idea from. Check it out.
I have been running this simulator PoC against ethereum/polygon mainnet as a dry-run. By dry-run I mean that I catch the errors from the simulator itself and only log out the simulation result. This way the errors don't get bubbled up and mess up the critical code paths.
It mostly works but can be finicky at times. In my logs I would see bursts of failed simulations (i.e. successful simulations with failed results) due to either revert or out-of-gas, but the actual txns I broadcast to the network all went through.
Seems to be persistent when using a paid Alchemy account. Out of 10 tries, only 1 would work if lucky. When it works, it works. Mostly fine when using Infura.