consensus-shipyard / ipc

🌳 Spawn multi-level trees of customized, scalable, EVM-compatible networks with IPC. L2++ powered by FVM, Wasm, libp2p, IPFS/IPLD, and CometBFT.
https://ipc.space
Apache License 2.0
41 stars 35 forks source link

feat(contracts): numerous improvements to deploy scripts (+). #1108

Closed raulk closed 1 month ago

raulk commented 1 month ago

Tolerating null rounds

Filecoin chains will occasionally produce null rounds. Ethers' transaction monitoring cannot handle skipped block heights. It will try to request intermediate blocks that don't exist. Lotus returns a JSON-RPC error when calling eth_getBlock* with a height corresponding to a null round. Ethers reacts with an exception, and this aborts the deployment process.

To overcome this situation, we inject a custom provider that catches this specific error, and returns an artificial empty block instead of an error. With this, hardhat-ethers can now cope with null rounds.

Major refactors and cleanups for easier maintenance

TODO

Next steps