Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Gas cost profiling, optimization, and management #166

@djrtwo

Description

@djrtwo

Issue

Gas costs are getting out of control. Specifically, vote now takes in excess of 500k as per the vyper estimate, and I don't think this includes the max 200k call to the validator's validation contract.

At the mainchain's current 8M gas_limit, at 500k a vote less only 16 votes can make it in per block. An update to the EIP is only going to allow votes after block 12 of an epoch so only 37 blocks per epoch will include votes. That is only support for 592 validators. If vote takes closer to 700k, only 400 validators will be supported.

Proposed Implementation

  • Profile gas costs. Decide which functions are problems
  • Consider and implement gas saving techniques
  • Create a new set of tests that set a maximum amount of gas allowed for each of the main functions. These will serve as warnings when we create changes that significantly increase gas costs

Question

is vyper going to implement any compile time gas optimizations?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions