Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

Conversation

@karlfloersch
Copy link
Contributor

Description

In order to fix a bug where we were returning a crazy gas limit, this PR reduces those variables & makes estimateGas lower the gas limit.

Questions

None

Metadata

Fixes

  • Hotfix

Contributing Agreement

@karlfloersch karlfloersch merged commit 91d2823 into master Sep 19, 2020
karlfloersch added a commit that referenced this pull request Nov 20, 2020
* Remove hardcoded estimate gas & reduce gas limit

* Remove commented code

* Set default target gas limit to 8mm

* Fix more cases of non-8mm gas

* Fix lint error

* Fix min gas limit bug
karlfloersch added a commit that referenced this pull request Nov 20, 2020
* Remove hardcoded estimate gas & reduce gas limit

* Remove commented code

* Set default target gas limit to 8mm

* Fix more cases of non-8mm gas

* Fix lint error

* Fix min gas limit bug
@gakonst gakonst deleted the feat/fix_estimate_gas branch March 9, 2021 12:43
gakonst added a commit that referenced this pull request Mar 10, 2021
This was removed in #22, but we need it
to properly estimate the amount we should charge users
gakonst added a commit that referenced this pull request Mar 10, 2021
This was removed in #22, but we need it
to properly estimate the amount we should charge users
gakonst added a commit that referenced this pull request Mar 30, 2021
…oEstimateGas from geth (#276)

* fix: add nil check when estimating gas to avoid panic during contract creation

* fix: revert DoEstimateGas changes introduced as a temp fix in #22

* Tweak fudge factor for Geth gas estimation (#292)

* experimenting with gas fudge factor

* fix formatting

* try using 1m gas constant

* Add log statement for the gas estimate

* Add more detail to gas estimate log

* one more log edit

* Try new formula

* Bump base gas

* Even more base gas

* even more

* Just 1m?

* one more time

* Final cleanup

* Minor fix

* Update internal/ethapi/api.go

* don't use cap-1

* Make sure data is not nil

Co-authored-by: Karl Floersch <[email protected]>

Co-authored-by: Ben Jones <[email protected]>
Co-authored-by: smartcontracts <[email protected]>
Co-authored-by: Karl Floersch <[email protected]>
tynes pushed a commit that referenced this pull request Apr 9, 2021
… to take data price into account (#273)

* fix: add nil check when estimating gas to avoid panic during contract creation

* fix: revert DoEstimateGas changes introduced as a temp fix in #22

* Tweak fudge factor for Geth gas estimation (#292)

* experimenting with gas fudge factor

* fix formatting

* try using 1m gas constant

* Add log statement for the gas estimate

* Add more detail to gas estimate log

* one more log edit

* Try new formula

* Bump base gas

* Even more base gas

* even more

* Just 1m?

* one more time

* Final cleanup

* Minor fix

* Update internal/ethapi/api.go

* don't use cap-1

* Make sure data is not nil

Co-authored-by: Karl Floersch <[email protected]>

* feat(api): make eth_gasPrice always return 1 gwei

* feat: overload estimateGas to return the data+execution fee

* feat: implement static L1 Gas Price oracle

* feat: allow configuring the L1GasPrice via CLI at node startup

* feat: allow configuring the L1GasPrice remotely over a new private RPC namespace

* Sequencer Fee Pricing Part 3, feat: Pull L1Gasprice from the Data Service (#277)

* feat: pull L1GasPrice from the data transport service

* refactor: split out single-iteration of sequencer loop

* test(sync-service): ensure L1GasPrice is set correctly

* chore: gofmt

* fix: parse json response as string and test

* chore: expose L1Gpo in the sync service

* refactor: create helper function for calculating the rollup fee

* docs: add doc for rollup tx size constant

* chore(console_test): add rollup_personal to test

* chore: remove empty line

* chore: adjust review comments

* do not cast gasUsed
* adjust comment on GasPrice method
* add nil check for args.Data
* log gas price changes in the sync service

* chore: re-order imports

* fix: skip txpool max gas check for rollup txs

Security Question: does this introduce a DoS vector?

* chore: debug log

* fix(rollup_fee): normalize charged gas by the charged gas price

* remove intrinsic gas checks

* move intrinsic gas check behind non-ovm codepath

* remove fudging code

* fix wrong gas limit

Co-authored-by: Ben Jones <[email protected]>
Co-authored-by: smartcontracts <[email protected]>
Co-authored-by: Karl Floersch <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants