Skip to content

Commit

Permalink
Merge pull request #1985 from OffchainLabs/add-default-backuptxforwar…
Browse files Browse the repository at this point in the history
…ders

Add backup transaction submission RPC URLs to arb1 chain information
  • Loading branch information
ganeshvanahalli authored Nov 29, 2023
2 parents 8ce5b53 + fc257a6 commit 09d45c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions cmd/chaininfo/arbitrum_chain_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"parent-chain-id": 1,
"parent-chain-is-arbitrum": false,
"sequencer-url": "https://arb1-sequencer.arbitrum.io/rpc",
"secondary-forwarding-target": "https://arb1-sequencer-fallback-1.arbitrum.io/rpc,https://arb1-sequencer-fallback-2.arbitrum.io/rpc,https://arb1-sequencer-fallback-3.arbitrum.io/rpc,https://arb1-sequencer-fallback-4.arbitrum.io/rpc,https://arb1-sequencer-fallback-5.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,
Expand Down
15 changes: 8 additions & 7 deletions cmd/chaininfo/chain_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ 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"`
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"`
SequencerUrl string `json:"sequencer-url"`
SecondaryForwardingTarget string `json:"secondary-forwarding-target"`
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
3 changes: 3 additions & 0 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,9 @@ func applyChainParameters(ctx context.Context, k *koanf.Koanf, chainId uint64, c
if chainInfo.SequencerUrl != "" {
chainDefaults["execution.forwarding-target"] = chainInfo.SequencerUrl
}
if chainInfo.SecondaryForwardingTarget != "" {
chainDefaults["execution.secondary-forwarding-target"] = strings.Split(chainInfo.SecondaryForwardingTarget, ",")
}
if chainInfo.FeedUrl != "" {
chainDefaults["node.feed.input.url"] = strings.Split(chainInfo.FeedUrl, ",")
}
Expand Down

0 comments on commit 09d45c1

Please sign in to comment.