spacemeshos / pm

Project management. Meta-tasks related to research, dev, and specs for the Spacemesh protocol and infrastructure.
http://spacemesh.io/
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Initial gas metering (genesis parameters) #145

Closed lrettig closed 12 months ago

lrettig commented 1 year ago

Set initial gas costing for all genesis contracts and calls.

The most straightforward approach is to fix the gas cost for a basic operation, e.g., our "simple send" analogue, on the order of magnitude of 10,000-100,000 (e.g., ETH uses 21k), and then calculate a gas cost table relative to this.

lrettig commented 1 year ago

@dshulyak already implemented some basic fix costs. @WilfredTA will determine whether this is sufficient for genesis.

dshulyak commented 1 year ago

What i set is not sufficient. Those numbers are just placeholders.

selfdual-brain commented 1 year ago

Agreed gas formula for Genesis is available here: https://community.spacemesh.io/t/nonce-in-self-spawn-never-ending-battle/304/4?u=selfdual-brain

lrettig commented 1 year ago

Possibly useful: https://medium.com/aptoslabs/the-making-of-the-aptos-gas-schedule-508d5686a350

lrettig commented 1 year ago

Hopefully helpful: #210

pigmej commented 12 months ago

The current values are set and considered being "good enough". More info https://github.com/spacemeshos/pm/issues/145

lrettig commented 11 months ago

This was done in:

See also: https://community.spacemesh.io/t/gas-cost-for-precompiles/348

Assuming @dshulyak is happy with the current state; let us know if there's any more to be done here for genesis