filecoin-project / ref-fvm

Reference implementation of the Filecoin Virtual Machine
https://fvm.filecoin.io/
Other
380 stars 136 forks source link

Create a Solidity/EVM smart contract benchmark suite #858

Closed raulk closed 1 year ago

raulk commented 2 years ago

We have several parallel streams that are benchmarking and optimizing the FEVM runtime from various vantage points:

We are all producing Solidity and EVM contracts for benchmarking purposes, so I'd like to propose that we collect them in a benchmarking suite in a dedicated new repo.

raulk commented 2 years ago

@maciejwitowski would love to hear your thoughts?

maciejwitowski commented 2 years ago

I think collecting these contracts is definitely a great idea. Not sure about a dedicated repo though. If these are inputs for the FVM testing, why not keep them in ref-fvm as we keep other kinds of tests? We could add them to a dedicated top-level folder.

maciejwitowski commented 2 years ago

Ref-fvm is agnostic to Ethereum, Solidity etc. It shouldn't be here. We can include it in builtin-actors EVM actor module.

raulk commented 2 years ago

So I'm having second thoughts about this. We not only want to include benchmarks, but also test contracts for users to play with and deploy.

For example, I now have a fully operational (sans logs) ERC-20 token contract that is slighly modified from OpenZeppelin's ERC20.

This is not a benchmark, but it's example/demo code. Therefore, no longer limited to builtin-actors dev audience.

Furthermore, we'll also need build scripts to compile the Solidity into EVM, and form the initCode to construct an actor.

For these reasons, I'm tempted to put these contracts in the already existing (but barely used) repo: https://github.com/filecoin-project/fvm-example-actors/

maciejwitowski commented 2 years ago

Ok, it seems the number of actors-related things we want to gather will be growing quickly. Looks like a separate repo is a good idea. I get 404 on https://github.com/filecoin-project/fvm-example-actors/ however. We can either open this one to public or create a new one, ideally more generic eg fvm-actors-resources.

maciejwitowski commented 1 year ago

Repo was created. It's not used a lot but it's an ongoing effort. Closing this one for clarity of the work left. Please reopen if needed.