-
Notifications
You must be signed in to change notification settings - Fork 446
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
Get rid of the hardcoded list of chains in config_arbitrum.go (geth) instead use arbitrum_chain_info.json (nitro) #2658
base: master
Are you sure you want to change the base?
Conversation
…instead use arbitrum_chain_info.json (nitro)
cmd/chaininfo/chain_defaults.go
Outdated
@@ -0,0 +1,141 @@ | |||
// Copyright 2021-2022, Offchain Labs, Inc. |
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.
nitpick: Update date to 2024
} | ||
} | ||
|
||
func CopyArbitrumChainParams(arbChainParams params.ArbitrumChainParams) params.ArbitrumChainParams { |
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.
nitpick: don't need to export those copy funcs.
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 thought these functions would be handy in other places of the codebases, dont you think so?
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.
Maybe 🤔.
I usually only export it if already exists one place outside of the package trying to use it, but it is OK exporting it.
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.
LGTM, not approving to check if we can remove code that seems unused.
func ArbitrumOneParams() params.ArbitrumChainParams { | ||
return fetchArbitrumChainParams("arb1") | ||
} | ||
func ArbitrumNovaParams() params.ArbitrumChainParams { | ||
return fetchArbitrumChainParams("nova") | ||
} | ||
func ArbitrumRollupGoerliTestnetParams() params.ArbitrumChainParams { | ||
return fetchArbitrumChainParams("goerli-rollup") | ||
} | ||
func ArbitrumDevTestParams() params.ArbitrumChainParams { | ||
return fetchArbitrumChainParams("arb-dev-test") | ||
} | ||
func ArbitrumDevTestDASParams() params.ArbitrumChainParams { | ||
return fetchArbitrumChainParams("anytrust-dev-test") | ||
} |
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 didn't find any place in which those functions are used, why we need them?
} | ||
} | ||
|
||
func CopyArbitrumChainParams(arbChainParams params.ArbitrumChainParams) params.ArbitrumChainParams { |
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.
Maybe 🤔.
I usually only export it if already exists one place outside of the package trying to use it, but it is OK exporting it.
This PR changes nitro to only use
arbitrum_chain_info.json
to create defaultChainConfig
s andArbitrumChainParams
and removes these hardcoded defaults from the geth side.Pulls geth PR- OffchainLabs/go-ethereum#357
Resolves NIT-2732