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

feat: add ZkEVMBridgeExecutor #10

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

0xdapper
Copy link
Contributor

@0xdapper 0xdapper commented Oct 29, 2023

Pulled and little changed from aave/governance-crosschain-bridges#78

❯ forge test --mc ZkEVMCrosschainTest
[⠢] Compiling...
No files changed, compilation skipped

Running 11 tests for test/ZkEVMBridgeExecutor.t.sol:ZkEVMCrosschainTest
[PASS] testFuzz_actionExecutionFailsAfterGracePeriod(uint256) (runs: 256, μ: 1035293, ~: 1035445)
[PASS] testFuzz_actionExecutionFailsBeforeTimelock(uint256) (runs: 256, μ: 1033439, ~: 1033568)
[PASS] testFuzz_basicCrosschainPayloadExecution(uint256) (runs: 256, μ: 1047867, ~: 1047965)
[PASS] test_canceledActionCannotBeCanceled() (gas: 1034080)
[PASS] test_canceledActionCannotBeExecuted() (gas: 1033998)
[PASS] test_executedActionCannotBeCanceled() (gas: 1040355)
[PASS] test_executingMultipleActions() (gas: 4174564)
[PASS] test_expiredActionCannotBeCanceled() (gas: 1027536)
[PASS] test_nonExistentActionExecutionFails() (gas: 7955)
[PASS] test_onlyGuardianCanCancel() (gas: 1068924)
[PASS] test_selfReconfiguration() (gas: 1317935)
Test result: ok. 11 passed; 0 failed; 0 skipped; finished in 14.06s

Ran 1 test suites: 11 tests passed, 0 failed, 0 skipped (11 total tests)

Copy link
Contributor

@hexonaut hexonaut left a comment

Choose a reason for hiding this comment

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

Need some changes, and there is a critical security issue.

src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Show resolved Hide resolved
@0xdapper 0xdapper requested a review from hexonaut November 2, 2023 09:31
Copy link
Contributor

@hexonaut hexonaut left a comment

Choose a reason for hiding this comment

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

Looking better, but still need some changes.

src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
src/executors/ZkEVMBridgeExecutor.sol Outdated Show resolved Hide resolved
hexonaut
hexonaut previously approved these changes Nov 10, 2023
Copy link
Contributor

@hexonaut hexonaut left a comment

Choose a reason for hiding this comment

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

Good to merge after Polygon has internal reviewer/auditor.

Copy link
Contributor

@barrutko barrutko left a comment

Choose a reason for hiding this comment

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

test/ZkEVMBridgeExecutor.t.sol should be renamed to test/ZkEVMCrosschainTest.t.sol.

Other than that LGTM.

@hexonaut hexonaut merged commit b2b71e5 into marsfoundation:master Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants