-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: zk go deployer #20219
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
Open
ashitakah
wants to merge
19
commits into
ethereum-optimism:develop
Choose a base branch
from
defi-wonderland:feat/zk-go-deployer
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+755
−3
Open
feat: zk go deployer #20219
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
65bf9ee
feat: merge with dev
ashitakah c92df45
feat: merge with dev
ashitakah b23bd24
Merge branch 'develop' of github.com:defi-wonderland/optimism into de…
ashitakah b72f9a0
fix: merge with dev
ashitakah bcd3405
Merge branch 'develop' of github.com:defi-wonderland/optimism into de…
ashitakah ede7c85
fix: merge with dev
ashitakah b91f370
Merge branch 'develop' of github.com:defi-wonderland/optimism into de…
ashitakah 5e18971
Merge branch 'develop' of github.com:defi-wonderland/optimism into de…
ashitakah 326f7e4
feat: op deployer zk
ashitakah 3ad0694
feat: op deployer zk
ashitakah 473eaf8
fix: lint
ashitakah 8736fc7
feat: acceptance tests and fix
ashitakah d95d853
fix: lint
ashitakah a0f08ea
feat: merge with develop
ashitakah 833eeef
feat: merge with develop
ashitakah 027fae4
fix: comments and merge
ashitakah 991e973
fix: comments and merge
ashitakah 3f89c65
fix: lint
ashitakah fdc342b
fix: comments
ashitakah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package zk | ||
|
|
||
| import ( | ||
| gameTypes "github.com/ethereum-optimism/optimism/op-challenger/game/types" | ||
| "github.com/ethereum-optimism/optimism/op-core/devfeatures" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/devtest" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/presets" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/sysgo" | ||
| ) | ||
|
|
||
| func zkOpts() []presets.Option { | ||
| return []presets.Option{ | ||
| presets.WithGameTypeAdded(gameTypes.ZKDisputeGameType), | ||
| presets.WithDeployerOptions(sysgo.WithDevFeatureEnabled(devfeatures.ZKDisputeGameFlag)), | ||
| presets.WithDeployerOptions(sysgo.WithJovianAtGenesis), | ||
| } | ||
| } | ||
|
|
||
| func newSystem(t devtest.T) *presets.Minimal { | ||
| return presets.NewMinimal(t, zkOpts()...) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package zk | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/ethereum-optimism/optimism/op-devstack/devtest" | ||
| ) | ||
|
|
||
| // TestSmoke verifies that op-deployer correctly deploys and registers the ZK | ||
| // dispute game when ZKDisputeGameFlag is enabled. | ||
| func TestSmoke(gt *testing.T) { | ||
| t := devtest.ParallelT(gt) | ||
| sys := newSystem(t) | ||
| require := t.Require() | ||
|
|
||
| zk := sys.DisputeGameFactory().ZKGameImpl() | ||
|
|
||
| require.NotEmpty(zk.Address, "ZK dispute game impl must be registered in DisputeGameFactory") | ||
| require.NotZero(zk.Args.MaxChallengeDuration, "maxChallengeDuration must be set") | ||
| require.NotZero(zk.Args.MaxProveDuration, "maxProveDuration must be set") | ||
| require.Positive(zk.Args.ChallengerBond.Sign(), "challengerBond must be non-zero") | ||
| require.Equal(sys.L2Chain.ChainID().ToBig(), zk.Args.L2ChainID, "l2ChainId must match deployed chain") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit/question: Here we use
thisState.OpChainContracts.DelayedWethPermissionlessGameProxy(makes sense, ZK is permissionless), but in line 202 below, we usethisState.OpChainContracts.DelayedWethPermissionedGameProxyfor both permissioned and permissionless cannon games in the deploy.This question is not about a change in this PR (this behavior was already in op-deployer previously), and I think it is correct to use the permissionless proxy for ZK games, but I'm raising this inconsistency/difference so someone with more context around these contracts can double check (cc @stevennevins)