-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get mode, metal and zora genesis.allocs validation working (#496)
* introduce node_version need to reexamine writeDeploymentsLegacy * fix bug in writeDeploymentsLegacy * fix declaration of legacy deployments and add note * improve diff * use hardhat Deployment type to pad data and avoid unmarshaling errors e.g. on mode * fix writeDeploymentsLegacy, mode now validates! * remove note * introduce GenesisCreationCommand mapping allows metadata file to choose from a list and have chainId automatically injected into command * introduce BuilldCommand mapping * op sepolia validates * remove UseLegacyDeploymentsFormat * remove op mainnet metadata for now * remove op sepolia (it doesn't validate yet) * echo nvm version * just codegen * load nvm * fix * try installing nvm in a step * require node_version to be set * just lint-all * attempt to patch genesis creation source code to make validation work at a wider range of commits * adds metal metadata -- validates! * add zora metadata -- validates!
- Loading branch information
Showing
20 changed files
with
515 additions
and
105 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,42 @@ | ||
package genesis | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
) | ||
|
||
type GeneratorFn func(uint64, string) string | ||
|
||
var GenesisCreationCommand = map[string]GeneratorFn{ | ||
"opnode1": opnode1, | ||
"opnode2": opnode2, | ||
} | ||
|
||
func opnode1(chainId uint64, l1rpcURL string) string { | ||
return strings.Join([]string{ | ||
"go run op-node/cmd/main.go genesis l2", | ||
fmt.Sprintf(" --deploy-config=./packages/contracts-bedrock/deploy-config/%d.json", chainId), | ||
" --outfile.l2=expected-genesis.json", | ||
" --outfile.rollup=rollup.json", | ||
fmt.Sprintf("--l1-deployments=./packages/contracts-bedrock/deployments/%d/.deploy", chainId), | ||
fmt.Sprintf("--l1-rpc=%s", l1rpcURL), | ||
}, | ||
" ") | ||
} | ||
|
||
func opnode2(chainId uint64, l1rpcURL string) string { | ||
return strings.Join([]string{ | ||
"go run op-node/cmd/main.go genesis l2", | ||
fmt.Sprintf("--deploy-config=./packages/contracts-bedrock/deploy-config/%d.json", chainId), | ||
"--outfile.l2=expected-genesis.json", | ||
"--outfile.rollup=rollup.json", | ||
fmt.Sprintf("--deployment-dir=./packages/contracts-bedrock/deployments/%d", chainId), | ||
fmt.Sprintf("--l1-rpc=%s", l1rpcURL), | ||
}, | ||
" ") | ||
} | ||
|
||
var BuildCommand = map[string]string{ | ||
"pnpm": "pnpm install --no-frozen-lockfile", | ||
"yarn": "yarn install --no-frozen-lockfile", | ||
} |
This file contains 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,13 @@ | ||
diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go | ||
index 4c813acd4..42aa795ed 100644 | ||
--- a/op-chain-ops/genesis/config.go | ||
+++ b/op-chain-ops/genesis/config.go | ||
@@ -588,7 +588,7 @@ func NewDeployConfig(path string) (*DeployConfig, error) { | ||
} | ||
|
||
dec := json.NewDecoder(bytes.NewReader(file)) | ||
- dec.DisallowUnknownFields() | ||
+ // dec.DisallowUnknownFields() | ||
|
||
var config DeployConfig | ||
if err := dec.Decode(&config); err != nil { |
Oops, something went wrong.