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

Do not default gasLimit to 1M #169

Open
makoto opened this issue Jul 18, 2018 · 5 comments
Open

Do not default gasLimit to 1M #169

makoto opened this issue Jul 18, 2018 · 5 comments

Comments

@makoto
Copy link
Owner

makoto commented Jul 18, 2018

It's currently set here

https://github.com/makoto/blockparty/blob/master/src/index.js#L224

Which gives heart attack to some users.

https://twitter.com/vietlq/status/1019509916321636352

The ideal solution would be to use estimated gas price (unless most wallet dynamically calculate in which case we can completely take out )

@vietlq
Copy link

vietlq commented Jul 18, 2018

I checked a few block party contracts and found that most of them hang around ~150K gas and can be near 170K in some cases:

It's best to warn users about the gas limit on the web page and suggest limit around 200K.

@makoto
Copy link
Owner Author

makoto commented Jul 18, 2018

Some of the admin functions may cost over 1M so the alternative is to hard code gas limit per function.

https://github.com/makoto/blockparty/blob/master/log/stress_0100.log

The inefficiency of admin gas cost is something we are tracking separately #160

@vietlq
Copy link

vietlq commented Jul 18, 2018

The register function actually has fluctuating gas cost, I believe due to the dependency on the input size for name & twitter handle. That should be addressed in #171 and #170 and remove dependency on input size

register	108685	1	468	0.000108685	0.05086458

@makoto
Copy link
Owner Author

makoto commented Jul 18, 2018

I guess I can make it constant if I hash the input. Removing these fields are topic of their own.

@vietlq
Copy link

vietlq commented Jul 18, 2018

I discussed solution here for constant gas cost: #171

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