fuel-specs icon indicating copy to clipboard operation
fuel-specs copied to clipboard

Add gas costs

Open adlerjohn opened this issue 4 years ago • 4 comments

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

adlerjohn avatar Nov 29 '20 17:11 adlerjohn

What is our current strategy for pricing?

Will it have to be based upon real world benchmarking?

SilentCicero avatar Feb 10 '21 18:02 SilentCicero

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

adlerjohn avatar Feb 10 '21 18:02 adlerjohn

@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.

SilentCicero avatar Feb 25 '21 16:02 SilentCicero

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

adlerjohn avatar Feb 25 '21 16:02 adlerjohn

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

Voxelot avatar Dec 06 '22 22:12 Voxelot

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?

otrho avatar Dec 06 '22 23:12 otrho

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.

Voxelot avatar Dec 07 '22 00:12 Voxelot