FuelLabs / fuel-specs

📝 Specifications for the Fuel protocol and the FuelVM, a blazingly fast blockchain VM.
https://fuellabs.github.io/fuel-specs/master
Apache License 2.0
1.79k stars 711 forks source link

Add gas costs #10

Closed adlerjohn closed 1 year ago

adlerjohn commented 4 years ago

Opcodes currently don't have gas costs. These need to be specified.

SilentCicero commented 3 years ago

What is our current strategy for pricing?

Will it have to be based upon real world benchmarking?

adlerjohn commented 3 years ago

Run lots of benchmarks with as clean a setup as possible. That's really the only way.

SilentCicero commented 3 years ago

@adlerjohn can we placeholder some initial values for now, than adjust them based upon real world benchmarks?

This would help just for implementation and testing before we get to benchmarking.

adlerjohn commented 3 years ago

The implementation can just choose some sane values. There's no reason to pollute the specs with that.

Voxelot commented 1 year ago

@adlerjohn this could likely be closed, as we now have a gas schedule benchmarking framework that we are iterating on.

otrho commented 1 year ago

Don't we want them properly documented somewhere? If I wanted to know individual op costs (which I do when writing optimisers) where should I look?

Voxelot commented 1 year ago

We are working on a framework to autogenerate a yaml file of the costs based on bechmarks, and also generate a rust file which contains the instantiated gas costs.

As we expect the gas costs to change over time as we add more functionality like merkle trees or optimize the vm/client, I'm not sure if statically binding them to the specs is the best move right now.