-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: use multiple RPCs for relayer #527
Conversation
@@ -100,7 +100,7 @@ func NewNode(opts *Options) (*Node, error) { | |||
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) | |||
defer cancel() | |||
|
|||
client, err := ethclient.DialContext(ctx, opts.L1RPCURL) | |||
client, err := ethclient.DialContext(ctx, opts.L1RPCURLs[0]) |
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.
What is the point to submit an array, if we just take the first value?
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.
Oh, we assume, that first one will work and in wrapped client use the array
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.
Yes, technically all work. If the first one doesnt work, we will fail in the initialization itself. This is mostly needed if we get rate-limited or if the RPC is down at some later point.
For the initial call we only do it to get the chain-id. We dont configure it in the CLI.
2771836
to
3297f29
Compare
3297f29
to
f709ad4
Compare
Describe your changes
Use multiple RPC URLs for bridge for failover incase one of them is down.
Issue ticket number and link
Fixes # (issue)
Checklist before requesting a review