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

Add backup feed URLs to chain information #1958

Merged
merged 4 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 24 additions & 45 deletions cmd/chaininfo/arbitrum_chain_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"parent-chain-is-arbitrum": false,
"sequencer-url": "https://arb1-sequencer.arbitrum.io/rpc",
"feed-url": "wss://arb1-feed.arbitrum.io/feed",
"secondary-feed-url": "wss://arb1-delayed-feed.arbitrum.io/feed,wss://arb1-feed-fallback-1.arbitrum.io/feed,wss://arb1-feed-fallback-2.arbitrum.io/feed,wss://arb1-feed-fallback-3.arbitrum.io/feed,wss://arb1-feed-fallback-4.arbitrum.io/feed,wss://arb1-feed-fallback-5.arbitrum.io/feed",
"has-genesis-state": true,
"chain-config":
{
"chain-config": {
"chainId": 42161,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -23,13 +23,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": false,
"DataAvailabilityCommittee": false,
Expand All @@ -38,8 +36,7 @@
"GenesisBlockNum": 0
}
},
"rollup":
{
"rollup": {
"bridge": "0x8315177ab297ba92a06054ce80a67ed4dbd7ed3a",
"inbox": "0x4dbd4fc535ac27206064b68ffcf827b0a60bab3f",
"rollup": "0x5ef0d09d1e6204141b4d37530808ed19f60fba35",
Expand All @@ -56,8 +53,7 @@
"sequencer-url": "https://nova.arbitrum.io/rpc",
"feed-url": "wss://nova-feed.arbitrum.io/feed",
"das-index-url": "https://nova.arbitrum.io/das-servers",
"chain-config":
{
"chain-config": {
"chainId": 42170,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -73,13 +69,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": false,
"DataAvailabilityCommittee": true,
Expand All @@ -88,8 +82,7 @@
"GenesisBlockNum": 0
}
},
"rollup":
{
"rollup": {
"bridge": "0xc1ebd02f738644983b6c4b2d440b8e77dde276bd",
"inbox": "0xc4448b71118c9071bcb9734a0eac55d18a153949",
"rollup": "0xfb209827c58283535b744575e11953dcc4bead88",
Expand All @@ -105,8 +98,7 @@
"parent-chain-is-arbitrum": false,
"sequencer-url": "https://goerli-rollup.arbitrum.io/rpc",
"feed-url": "wss://goerli-rollup.arbitrum.io/feed",
"chain-config":
{
"chain-config": {
"chainId": 421613,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -122,13 +114,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": false,
"DataAvailabilityCommittee": false,
Expand All @@ -137,8 +127,7 @@
"GenesisBlockNum": 0
}
},
"rollup":
{
"rollup": {
"bridge": "0xaf4159a80b6cc41ed517db1c453d1ef5c2e4db72",
"inbox": "0x6bebc4925716945d46f0ec336d5c2564f419682c",
"rollup": "0x45e5caea8768f42b385a366d3551ad1e0cbfab17",
Expand All @@ -150,8 +139,7 @@
},
{
"chain-name": "arb-dev-test",
"chain-config":
{
"chain-config": {
"chainId": 412346,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -167,13 +155,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
Expand All @@ -185,8 +171,7 @@
},
{
"chain-name": "anytrust-dev-test",
"chain-config":
{
"chain-config": {
"chainId": 412347,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -202,13 +187,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": true,
Expand All @@ -225,8 +208,7 @@
"chain-name": "sepolia-rollup",
"sequencer-url": "https://sepolia-rollup-sequencer.arbitrum.io/rpc",
"feed-url": "wss://sepolia-rollup.arbitrum.io/feed",
"chain-config":
{
"chain-config": {
"chainId": 421614,
"homesteadBlock": 0,
"daoForkBlock": null,
Expand All @@ -242,13 +224,11 @@
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"clique":
{
"clique": {
"period": 0,
"epoch": 0
},
"arbitrum":
{
"arbitrum": {
"EnableArbOS": true,
"AllowDebugPrecompiles": false,
"DataAvailabilityCommittee": false,
Expand All @@ -257,8 +237,7 @@
"GenesisBlockNum": 0
}
},
"rollup":
{
"rollup": {
"bridge": "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9",
"inbox": "0xaAe29B0366299461418F5324a79Afc425BE5ae21",
"sequencer-inbox": "0x6c97864CE4bEf387dE0b3310A44230f7E3F1be0D",
Expand All @@ -268,4 +247,4 @@
"deployed-at": 4139226
}
}
]
]
13 changes: 7 additions & 6 deletions cmd/chaininfo/chain_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ type ChainInfo struct {
ParentChainId uint64 `json:"parent-chain-id"`
ParentChainIsArbitrum *bool `json:"parent-chain-is-arbitrum"`
// This is the forwarding target to submit transactions to, called the sequencer URL for clarity
SequencerUrl string `json:"sequencer-url"`
FeedUrl string `json:"feed-url"`
DasIndexUrl string `json:"das-index-url"`
HasGenesisState bool `json:"has-genesis-state"`
ChainConfig *params.ChainConfig `json:"chain-config"`
RollupAddresses *RollupAddresses `json:"rollup"`
SequencerUrl string `json:"sequencer-url"`
FeedUrl string `json:"feed-url"`
SecondaryFeedUrl string `json:"secondary-feed-url"`
DasIndexUrl string `json:"das-index-url"`
HasGenesisState bool `json:"has-genesis-state"`
ChainConfig *params.ChainConfig `json:"chain-config"`
RollupAddresses *RollupAddresses `json:"rollup"`
}

func GetChainConfig(chainId *big.Int, chainName string, genesisBlockNum uint64, l2ChainInfoFiles []string, l2ChainInfoJson string) (*params.ChainConfig, error) {
Expand Down
5 changes: 4 additions & 1 deletion cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,10 @@ func applyChainParameters(ctx context.Context, k *koanf.Koanf, chainId uint64, c
chainDefaults["execution.forwarding-target"] = chainInfo.SequencerUrl
}
if chainInfo.FeedUrl != "" {
chainDefaults["node.feed.input.url"] = chainInfo.FeedUrl
chainDefaults["node.feed.input.url"] = strings.Split(chainInfo.FeedUrl, ",")
}
if chainInfo.SecondaryFeedUrl != "" {
chainDefaults["node.feed.input.secondary-url"] = strings.Split(chainInfo.SecondaryFeedUrl, ",")
}
if chainInfo.DasIndexUrl != "" {
chainDefaults["node.data-availability.enable"] = true
Expand Down
Loading