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

Proposal: Integrate Arbitrum RPC fallback into livepeer-go #2975

Open
FranckUltima opened this issue Mar 11, 2024 · 4 comments
Open

Proposal: Integrate Arbitrum RPC fallback into livepeer-go #2975

FranckUltima opened this issue Mar 11, 2024 · 4 comments
Labels
status: triage this issue has not been evaluated yet

Comments

@FranckUltima
Copy link

In order to improve the quality and robustness of the network, I believe it could be useful to integrate an Arbitrum RPC fallback option directly into the livepeer-go code.

For example, we could enter a main RPC and 1 backup RPC, and if the main RPC no longer responds or provides erroneous data, the node could switch to the backup RPC, until the main RPC responds correctly again.

It would also be useful to have a metric available for prometheus/grafana so that we can integrate the RPC status into our monitoring.

This would also allow us to maintain our Arbitrum RPCs without stopping the availability of our Livepeer nodes.

@github-actions github-actions bot added the status: triage this issue has not been evaluated yet label Mar 11, 2024
@leszko
Copy link
Contributor

leszko commented Mar 12, 2024

@FranckUltima Thanks for posting. I think it's a duplicate of this: #1959

@FranckUltima
Copy link
Author

Actually, sorry about that. I think my post was a good reminder for the new developers on the Livepeer project, since the old post was from two years ago. You can delete my request, since it's a duplicate. I don't think I can do it myself.

@JJassonn69
Copy link

JJassonn69 commented Apr 27, 2024

@FranckUltima you can use proxyd right now to have a backup RPC, I have multiple RPC backends just incase the main RPC goes down, it automatically switches to the other RPC providers. But i would guess having it in the main livepeer itself would be more straight forward.

@eliteprox
Copy link
Collaborator

I think we should implement this within go-livepeer to help both Orchestrator and Broadcaster nodes stay up. We can allow for a comma-delimited list of RPC endpoints and then cycle through them if any blockWatcher error occurs instead of breaking.

I think the changes would be made to this go func:

blockWatcherErr := make(chan error, 1)
go func() {
if err := blockWatcher.Watch(blockWatchCtx); err != nil {
blockWatcherErr <- fmt.Errorf("block watcher error: %v", err)
}
}()
go func() {
var err error
select {
case err = <-timeWatcherErr:
case err = <-blockWatcherErr:
}
watcherErr <- err
}()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage this issue has not been evaluated yet
Projects
None yet
Development

No branches or pull requests

4 participants