Skip to content
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

Lessons learned from running Meridian on FEVM #157

Open
bajtos opened this issue Sep 2, 2024 · 3 comments
Open

Lessons learned from running Meridian on FEVM #157

bajtos opened this issue Sep 2, 2024 · 3 comments
Assignees

Comments

@bajtos
Copy link
Contributor

bajtos commented Sep 2, 2024

In the past 12 months, we learned a lot about the practical aspects of running a Web 2.5 service interacting with FEVM smart contract via RPC API. What worked well? What are the rough edges that the Filecoin developers could improve?

I'd like to present our learnings at FIL Dev Summit at LabWeek.

We can also convert the talk into a blog post after the event.

List of topics we could mention:

  • Gas fee estimation - ethers.js v5, ethers.js v6

  • Rising gas fees, stuck transactions, how to recover.

    • Don't resubmit the transactions!
    • How to cancel pending transaction.
  • Reliability and performance of RPC API providers

  • How to reliably consume smart contract events (polling vs websockets, filters, etc.)

  • How to self-heal service state after deploying a new version (see Self-healing filecoin-station/spark-evaluate#3)

@bajtos bajtos self-assigned this Sep 2, 2024
@bajtos
Copy link
Contributor Author

bajtos commented Sep 2, 2024

@juliangruber, could you please add anything else that comes to mind? I remember you had one idea last week, but I cannot recall it.

@juliangruber
Copy link
Member

juliangruber commented Sep 2, 2024

  • Getting filecoin native addresses to work in the contract is tricky. I didn't manage to do so, this is why we switched to 0x addresses. Also, other tooling like ethers.js wouldn't support it. Support native Filecoin addresses Meridian-IE/impact-evaluator#28
  • There's no publicly hosted Filecoin L2 yet. But: We're part of the IPC WG now
  • Filecoin testnet (calibration) is way easier to use than EVM testnets (you have to perform some work to get test ether, you can't just use a faucet)
  • In solidity, units are ether and not fil
  • We discovered a couple lotus errors and DX issues. Which those were will take some time to find. Basically with a few things it felt like we were the first to try these -> the ecosystem hadn't matured yet
  • No matter what, you could always get an answer in #fil-builders
  • Initially GLIF rpc nodes didn't support request batching. After enabling it, we had to change the ethers default config to 10 messages per batch (default: 100)
  • About half of Station support requests is people thinking they haven't been paid, because smart contract transactions don't get listed in their wallet transactions
  • https://github.com/OpenZeppelin/openzeppelin-contracts is your friend

How to self-heal service state after deploying a new version (see filecoin-station/spark-evaluate#3)

I believe this has nothing to do with FEVM vs EVM, but still can be mentioned.

@juliangruber
Copy link
Member

I'll keep editing this comment with ideas :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants