I'm running a hardhat node and a nodejs backend using web3js to capture events (code) and for some reason the events stop getting caught by web3js.
The transactions seem to be firing just fine as I can see them in the logs, but the backend isn't picking them up.
This is all being run in separate docker containers on a c5.xlarge ec2 instance on aws.
I tried increasing the instance class for more memory even though there was memory to spare, so not sure how to troubleshoot from here.
And the contact does emit events successfully at the beginning just not after a period of time. And also if I comment out some of the initial tests, the tests that time out due to the event not being captured succeed.
You can recreate the issue by running the unit tests for this repo (https://github.com/DAPPNetworkLabs/dapp-workers/) with:
./scripts/all-test.sh
Be sure to add a .config.json
to ./eth/.config.json
and ./nexus/.config.json
so hardhat has the proper alchemy (https://www.alchemy.com/) keys for forking the ETH mainnet.
{
"alchemyKey": ""
}