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

Create script to save transaction gas cost estimations to doc #16

Open
loredanacirstea opened this issue Mar 21, 2018 · 8 comments · Fixed by #335
Open

Create script to save transaction gas cost estimations to doc #16

loredanacirstea opened this issue Mar 21, 2018 · 8 comments · Fixed by #335
Labels
enhancement New feature or request P3 keeping somebody waiting possibly

Comments

@loredanacirstea
Copy link
Contributor

loredanacirstea commented Mar 21, 2018

tl;dr
Gas cost estimations are calculated in test_print_gas.py. This should not be ran as a test, but should be a script that generates a file with the information, which should be added in the docs.

Problem Definition

There is no way for (advanced developer) users to easily see a rundown of how much it would cost at any verion of raiden to perform common channel operations.

Solution

Add a table, probably in spec.rst with gas costs of all raiden common channel operations which should be updated every time we change the logic of the contracts or if there is any considerable contract revamp.

This way we will be able to efficiently have a versioned tracking of gas costs optimizations and also a way to identify bottlenecks that require optimization.

@loredanacirstea
Copy link
Contributor Author

loredanacirstea commented Oct 8, 2018

Update: the values should not be in the docs, but as package deliverables. We can make this script run at deployment time for the testnet and save the addresses & gas estimation values together, in a json file.
Also, we need to make sure we have the worst case scenarios in mind for the gas costs (e.g. calling closeChannel with a balance proof will cost more than without).

Related: #306

@loredanacirstea
Copy link
Contributor Author

This should have not been closed, sorry. #335 only adds the gas limits to the constants.py file. We should still have this calculations done automatically, maybe after we compile the contracts.json file, but I am moving the issue to anther milestone.

@loredanacirstea loredanacirstea added the P3 keeping somebody waiting possibly label Jan 7, 2019
@pirapira pirapira added P1 urgent, blocker, or makes life easier forever and removed P3 keeping somebody waiting possibly labels Feb 4, 2019
@LefterisJP
Copy link
Contributor

An idea mentioned by @hackaugusto here is to not auto-generate a constants.py but instead a .json file so that it can be processed by non-python consumers.

@pirapira pirapira removed this from the Ithaca milestone Feb 11, 2019
@pirapira
Copy link
Contributor

pirapira commented Feb 11, 2019

  • is there a standard format for storing gas-cost estimations? (Maybe solc output)?

@pirapira
Copy link
Contributor

solc does not like --combined-json abi,bin,bin-runtime,gas,metadata,ast.

@pirapira
Copy link
Contributor

Here is one option:

@pirapira
Copy link
Contributor

But, the first task is probably #547 .

After that the test can be turned into a script.

@pirapira pirapira added P2 demanded by somebody and removed P1 urgent, blocker, or makes life easier forever labels Feb 28, 2019
@pirapira
Copy link
Contributor

This issue is about adding the gas information in the document. I don't know if that's so urgent.

@pirapira pirapira added P3 keeping somebody waiting possibly and removed P2 demanded by somebody labels Mar 27, 2019
@pirapira pirapira changed the title Create script to save transaction gas cost estimations to a file Create script to save transaction gas cost estimations to doc Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 keeping somebody waiting possibly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants