Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas cost profiling, optimization, and management #166

Open
djrtwo opened this issue Jun 6, 2018 · 1 comment
Open

Gas cost profiling, optimization, and management #166

djrtwo opened this issue Jun 6, 2018 · 1 comment

Comments

@djrtwo
Copy link
Contributor

djrtwo commented Jun 6, 2018

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?

@PhABC
Copy link

PhABC commented Jun 9, 2018

Had the same train of thought, thanks for raising this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants