-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Make CALLs Revert Properly #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested removal of a couple onlys
and some commented code. LGTM! 📚
packages/ovm/test/contracts/execution-manager.executeCall.spec.ts
Outdated
Show resolved
Hide resolved
// private static enoughBytesLeft( | ||
// opcode: EVMOpcode, | ||
// bytecodeLength: number, | ||
// pc: number, | ||
// errors: TranspilationError[] | ||
// ): boolean { | ||
// if (pc + opcode.programBytesConsumed >= bytecodeLength) { | ||
// return false | ||
// } | ||
// return true | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// private static enoughBytesLeft( | |
// opcode: EVMOpcode, | |
// bytecodeLength: number, | |
// pc: number, | |
// errors: TranspilationError[] | |
// ): boolean { | |
// if (pc + opcode.programBytesConsumed >= bytecodeLength) { | |
// return false | |
// } | |
// return true | |
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this, but this is from another PR that I merged into this one, so would rather handle it there.
|
||
uint c = a + b; | ||
|
||
require(c >= a); // Makre sure the right computation was made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require(c >= a); // Makre sure the right computation was made | |
require(c >= a); // Make sure the right computation was made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this, but this is from another PR that I merged into this one, so would rather handle it there.
@@ -54,7 +55,7 @@ import { transpileAndDeployInitcode, stripAuxData } from '../helpers' | |||
const abi = new ethers.utils.AbiCoder() | |||
const log = getLogger(`constructor-transpilation`) | |||
|
|||
describe('Solitity contracts with constructors that take inputs should be correctly deployed', () => { | |||
describe.only('Solitity contracts with constructors that take inputs should be correctly deployed', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe.only('Solitity contracts with constructors that take inputs should be correctly deployed', () => { | |
describe('Solitity contracts with constructors that take inputs should be correctly deployed', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this, but this is from another PR that I merged into this one, so would rather handle it there.
- @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected] - @eth-optimism/[email protected]
* patch(l2geth): revert back to latest upstream optimism master * chore: disable android tests
* patch(l2geth): revert back to latest upstream optimism master * chore: disable android tests
use zeppelin safe transfer stuff
use zeppelin safe transfer stuff
- Add infrastructure stability after v0.5 regenesis - Simplify the separation of concerns for v1.0 - Add some "future optimizations" to reflect a more accurate list of what we might want to do to push the chain to the next level. - Update the terminology in the fraud proof track. - Moved the boxes around so they are more chronologically ordered
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50) 1146a08b5 localnet reorg fix (ethereum-optimism#76) 87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64) 9073baeaf localnet (ethereum-optimism#37) 1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51) 210aabe7a Update popm.go, fix typo (ethereum-optimism#40) a5e689493 make: automate copyright headers (ethereum-optimism#31) 1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (ethereum-optimism#33) 1be4df2a3 Use 'errors.Is' to compare errors (ethereum-optimism#32) 3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36) c5b0fea01 electrumx: add connection reuse and pooling (ethereum-optimism#26) cfc1293e9 Update README.md (ethereum-optimism#29) 8896259f0 retry mine keystone on failure (ethereum-optimism#18) a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes ethereum-optimism#13) (ethereum-optimism#27) 6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (ethereum-optimism#28) ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (ethereum-optimism#16) ac3b7eacb docker: update golang image to v1.22.1 (ethereum-optimism#25) d6b0ac8af returning response errors if they exist from bfg -> popm (ethereum-optimism#24) d450b787a Network test start height + no panic (ethereum-optimism#22) b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (ethereum-optimism#19) bfd3b1dc0 make: add -local flag to goimports (ethereum-optimism#9) e0e8964fc Move internal error into protocol package (ethereum-optimism#10) 7875a897c l2 keystone mining fixes (#3) git-subtree-dir: heminetwork git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50) 1146a08b5 localnet reorg fix (ethereum-optimism#76) 87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64) 9073baeaf localnet (ethereum-optimism#37) 1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51) 210aabe7a Update popm.go, fix typo (ethereum-optimism#40) a5e689493 make: automate copyright headers (ethereum-optimism#31) 1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (ethereum-optimism#33) 1be4df2a3 Use 'errors.Is' to compare errors (ethereum-optimism#32) 3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36) c5b0fea01 electrumx: add connection reuse and pooling (ethereum-optimism#26) cfc1293e9 Update README.md (ethereum-optimism#29) 8896259f0 retry mine keystone on failure (ethereum-optimism#18) a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes ethereum-optimism#13) (ethereum-optimism#27) 6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (ethereum-optimism#28) ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (ethereum-optimism#16) ac3b7eacb docker: update golang image to v1.22.1 (ethereum-optimism#25) d6b0ac8af returning response errors if they exist from bfg -> popm (ethereum-optimism#24) d450b787a Network test start height + no panic (ethereum-optimism#22) b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (ethereum-optimism#19) bfd3b1dc0 make: add -local flag to goimports (ethereum-optimism#9) e0e8964fc Move internal error into protocol package (ethereum-optimism#10) 7875a897c l2 keystone mining fixes (#3) git-subtree-dir: heminetwork git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
* chore: add forge-std * feat: add forge testdata dir * feat: simple testing tool * feat: command line args * refactor: split test into test and testCmd * refactor: return passes and fails * fix: use testCmd in cmd/test * refactor: set gas limit to 1e7 * fix: add gasLimit to genesis * fix: set gasLimit to 2e7 * refactor: assert test path count in test
* Fix register validator and add e2e tests
Description
Making CALLs revert while transactions log a revert log when execution fails.
Metadata
Fixes
Contributing Agreement