Skip to content

Conversation

@karlfloersch
Copy link
Contributor

@karlfloersch karlfloersch commented Feb 25, 2020

Description

This PR speeds up tests by no longer using the fully Solidity validated EOA function call. Instead we just recover the tx contents once inside of the fullnode, and then make an authenticated call on that user's behalf.

It also fixes a really tricky bug which was causing our fullnode to crash inside of a try{}catch{} statement!!. Apparently you cannot use Ganache's call with the ZERO_ADDRESS if the call fails because that will cause a really nasty error:

/Users/karlfloersch/workspace/ethereum/optimism-monorepo/node_modules/ethereumjs-util/dist/index.js:369
  var sig = secp256k1.sign(msgHash, privateKey);
                      ^
Error: nonce generation function failed or private key is invalid
    at Object.exports.ecsign (/Users/karlfloersch/workspace/ethereum/optimism-monorepo/node_modules/ethereumjs-util/dist/index.js:369:23)
    at Transaction.sign (/Users/karlfloersch/workspace/ethereum/optimism-monorepo/node_modules/ethereumjs-tx/es5/index.js:252:23)

By making this small change: b4060c8 it fixed the issue. Something that's a little weirder is that doing something as simple as changing it to use 0x 0x0000000000000000000000000000000000000099 as the from field also solves the issue! So it's just something special about the ZERO_ADDRESS it seems...

TODO

  • It is probably best to verify that the nonce is correct. This should be a quick fix.

Metadata

Fixes

Contributing Agreement

Copy link

@willmeister willmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Would change to getCallData(...) and getTransactionData(...) to better indicate how these two are used in the grand scheme of things.

@karlfloersch karlfloersch force-pushed the YAS-194/SkipSoliditySigVerify branch from 7ed5109 to 9f56d8a Compare March 16, 2020 17:20
@karlfloersch karlfloersch removed the wip label Mar 16, 2020
@karlfloersch karlfloersch force-pushed the YAS-194/SkipSoliditySigVerify branch from 9f56d8a to b4060c8 Compare March 19, 2020 00:33
@@ -504,12 +502,13 @@ contract ExecutionManager is FullStateManager {
* @param _timestamp The timestamp which should be used for this context.
* @param _queueOrigin The queue which this context's transaction was sent from.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an @param comment for _ovmTxOrigin

Comment on lines 106 to 111
executionManager: Contract,
wallet: Wallet,
to: Address,
data: string
data: string,
allowRevert: boolean
): Promise<TransactionReceipt> => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A function comment for executeUnsignedEOACall describing what each of the parameters is would be helpful! (Specifically about allowRevert)

}

private generateUnsignedCallCalldata(
private getTransactionCalldata(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A short function comment would be helpful!

@karlfloersch karlfloersch merged commit 7f07514 into ethereum-optimism:master Mar 19, 2020
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
therealbytes added a commit to therealbytes/optimism that referenced this pull request May 17, 2024
* feat: add NewVersion util

* fix: set big pi store radix and leaf

* refactor: generalize pi registry test
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 12, 2024
* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* test: add L2 standard bridge interop unit tests (ethereum-optimism#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (ethereum-optimism#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (ethereum-optimism#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (ethereum-optimism#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (ethereum-optimism#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (ethereum-optimism#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (ethereum-optimism#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>
SozinM pushed a commit to NethermindEth/optimism that referenced this pull request Feb 10, 2025
blockchaindevsh added a commit to blockchaindevsh/optimism that referenced this pull request Jun 30, 2025
cuiweixie pushed a commit to cuiweixie/optimism that referenced this pull request Oct 22, 2025
* WIP: initial commit of e2e files from old repo

* WIP: wip commit before moving e2e tests to op-geth

* wip: commented out old tests

* wip: change init file, docker compose and remove irrelevant tests

* chore: add files to gitignore

* fix: remove unnecessary cache pruning to optimise workflow

* chore: remove e2e code that is now ported to op-geth

* fix: pull branch to tmp directory & retry for leader detection

* fix: echo test success after cleanup for clearer message

* chore: cleanup makefile and always build op_geth

* chore: remove unnecessary commit of transactor.sol

* fix: add OP_GETH_LOCAL_DIRECTORY variable in .env file for developers to specify local op-geth directory

* fix: run tests according to whether branch or local directory is specified

* fix: run-test target local directory fix

* chore: silence run-test target

* fix: docker compose down only if .env file is present

* chore: remove hardcoded values for env variables

* fix: bugfix empty op_geth_image_tag

* fix: reset op_geth_image_tag from example.env when building with submodule

* fix

* chore: make skipping op-stack and op-contracts env flags, clean up makefile

* fix: revert unneccessary conductor retries

* fix: remove tag changing logic

* fix: change ports in docker compose
theochap pushed a commit that referenced this pull request Dec 10, 2025
Zena-park added a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
theochap pushed a commit that referenced this pull request Jan 15, 2026
Include deposit tx type in `alloy_network::Network` impl
theochap pushed a commit that referenced this pull request Jan 21, 2026
Include deposit tx type in `alloy_network::Network` impl
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.

3 participants