Skip to content

Conversation

@ben-chain
Copy link
Collaborator

@ben-chain ben-chain commented Jun 23, 2020

Description

Adds the ability of the EM to meter OVM gas, and adds a rate limiting feature to bound the gas consumed by a rollup chain per unit time.

Todos

  • Clean up tests a little bit
  • Add tests to see if we can get SimpleGas.consumeGas(...) to consume exactly the gas specified
  • Add Full Node integration tests to be sure we are handling errors gracefully

Questions

  • Even failed transactions need to increment the cumulative gas. This means allowRevert cannot really be true for the metering to work. Are we down to remove allowRevert altogether?
  • How should chain config be handled? Right now I just have a constant similar to our original GAS_LIMIT being passed into the constructor.
  • We are hitting the stack depth in the EM. Should I pull out the gas metering stuff into a wrapper function which CALLs the EM once again, like we do for executeTransaction?
  • Any other TODOs pop out?

Metadata

Fixes

  • Fixes YAS 423

Contributing Agreement

@ben-chain ben-chain changed the title [WIP [WIP] Gas Metering and Rate Limiting Jun 23, 2020
@ben-chain ben-chain mentioned this pull request Aug 4, 2020
1 task
@ben-chain
Copy link
Collaborator Author

Closing in favor of refactor at #201

@ben-chain ben-chain closed this Aug 4, 2020
@gakonst gakonst deleted the feat/YAS423/EM-gas-metering branch March 18, 2021 15:09
snario pushed a commit that referenced this pull request Apr 14, 2021
* Separates storage from SCC and CTC (#151)

* First pass version

* More minor tweaks for tests to pass

* Add authentication

* Minor config updates

* Fix lint error

* Fix naming changes per review

* Enable Deployer Whitelist (#119)

* first pass, test runner updated

* add ability to only validate flag, test passes

* all tests passing

* clean up console.logs

* enforce gas refund preservation

* more cleanup/import removal

* whitelisted -> allowed

* first pass, test runner updated

* add ability to only validate flag, test passes

* all tests passing

* clean up console.logs

* enforce gas refund preservation

* more cleanup/import removal

* whitelisted -> allowed

* remove whitespace

* Restrict StateTransitionerFactory (#140)

* added msg sender check

* add create test

* cleanup

* add param

* add addressmanager.address param

* CTC Chain Monotonicity Fixes (#93)

* [wip] Fix block time logic

* some sad path and happy tests passing

* more progress

* first pass sad cases tested

* cleanup, adding empty tests

* more reversion tests

* rename shouldstartat}

* add final couple tests

* enable more tests

* cleanup

* remove .only

* textual cleanup

* make queue length public

* improve structure, comments

* update deploy config

* address nits

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

* fix declarations, lint (#152)

* Adds river's new Merkle tree implementation, with some cleanup (#148)

* Reverts an accidental breaking merge

* Added new merkle tree impl

* add comments

* Final cleanups and merge

Co-authored-by: Ben Jones <[email protected]>

* Fix run gas Lower Bound (#94)

* added the check

* add test

* lower OVM TX size for Kovan

* re-remove gas check

* update gas vals slightly

* lint

* lint

* Merge master into freeze integration branch  (#153)

* update solidity version to ^0.7.0 (#122)

* update solc version to ^0.7.0

* interfaces back to solidity >0.6.0 <0.8.0

* update solc to 0.7.6

* back to 0.7.4

* upgrade to 0.7.6, fix EXTCODESIZE check

* versions >0.5.0 <0.8.0 for xdomain msgers

* ctc: disable appendQueueBatch (#150)

* ctc: disable appendSequencerBatch

* typo: fix

* re-enable verifyQueueTransaction test:

* add explicit test for verifying queue elements against either append

Co-authored-by: Ben Jones <[email protected]>

* fix up test

* remove .only

Co-authored-by: Alina <[email protected]>
Co-authored-by: Mark Tyneway <[email protected]>

* add check, simple test, update deploy (#154)

* go back to first name (#155)

* lint

* fix js number error

* add error logging to help debug deploy

* [code freeze] Fix deploy script (#156)

* fix deploy script

* add block time config

* ensure value is integer

* lint

* remove console logs from deploy

* Moves gas check to applyTransaction (#161)

* move to OVM_ST, pass test

* remove old test because functionality moved

* linting

* remove leaf hasing

* use safe EXEMRG wrapper (#162)

* use safeREQUIRE

* add owner getter

* relayer: add to config (#160)

* relayer: add to config

* lint: fix

* Fix minor error in test config

Co-authored-by: Kelvin Fichter <[email protected]>
Co-authored-by: ben-chain <[email protected]>
Co-authored-by: Alina <[email protected]>
Co-authored-by: Mark Tyneway <[email protected]>
Co-authored-by: Kevin Ho <[email protected]>
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Dec 9, 2024
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
blockchaindevsh pushed a commit to blockchaindevsh/optimism that referenced this pull request Jan 25, 2025
* Add inbox test

* update .mise-tasks/dev-test.sh
shenkeyao referenced this pull request in EspressoSystems/optimism-espresso-integration Mar 1, 2025
* state-migration: Initialize CeloDistributionSchedule

Fixes celo-org#155

* state-migration: Don't fail when distribution schedule update errors

* Review comments
QuentinI referenced this pull request in EspressoSystems/optimism-espresso-integration Mar 7, 2025
* state-migration: Initialize CeloDistributionSchedule

Fixes celo-org#155

* state-migration: Don't fail when distribution schedule update errors

* Review comments
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Apr 4, 2025
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Apr 7, 2025
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
theochap pushed a commit that referenced this pull request Jan 15, 2026
### Description

Modifies OP Stack types in `rpc-types` to use the `Op` prefix as opposed
to `Optimism` prefix.

### Metadata

Makes progress on #150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants