-
Notifications
You must be signed in to change notification settings - Fork 118
feat(l1): log warning if no CL messages are received in a while #5256
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
991d091
83260af
3f6c425
2bcebc6
97a0682
3359350
30d2cd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -75,6 +75,7 @@ use tokio::sync::{ | |||||||||||||||||||||||||||||
| mpsc::{UnboundedSender, unbounded_channel}, | ||||||||||||||||||||||||||||||
| oneshot, | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
| use tokio::time::timeout; | ||||||||||||||||||||||||||||||
| use tower_http::cors::CorsLayer; | ||||||||||||||||||||||||||||||
| use tracing::{error, info}; | ||||||||||||||||||||||||||||||
| use tracing_subscriber::{EnvFilter, Registry, reload}; | ||||||||||||||||||||||||||||||
|
|
@@ -296,7 +297,24 @@ pub async fn start_api( | |||||||||||||||||||||||||||||
| .into_future(); | ||||||||||||||||||||||||||||||
| info!("Starting HTTP server at {http_addr}"); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| let authrpc_handler = |ctx, auth, body| async { handle_authrpc_request(ctx, auth, body).await }; | ||||||||||||||||||||||||||||||
| let (timer_sender, mut timer_receiver) = tokio::sync::watch::channel(()); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| tokio::spawn(async move { | ||||||||||||||||||||||||||||||
| loop { | ||||||||||||||||||||||||||||||
| let result = timeout(Duration::from_secs(30), timer_receiver.changed()).await; | ||||||||||||||||||||||||||||||
| if result.is_err() { | ||||||||||||||||||||||||||||||
| error!("No messages from the consensus layer. Is the consensus client running? | ||||||||||||||||||||||||||||||
| Check the auth JWT coincides with the one used by the CL and the auth RPC address and port used by it and Ethrex match." | ||||||||||||||||||||||||||||||
SDartayet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
SDartayet marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| if result.is_err() { | |
| error!("No messages from the consensus layer. Is the consensus client running? | |
| Check the auth JWT coincides with the one used by the CL and the auth RPC address and port used by it and Ethrex match." | |
| ); | |
| match result { | |
| Ok(Ok(_)) => { | |
| // Successfully received a change, continue looping. | |
| } | |
| Ok(Err(_)) | Err(_) => { | |
| error!("No messages from the consensus layer. Is the consensus client running? | |
| Check the auth JWT coincides with the one used by the CL and the auth RPC address and port used by it and Ethrex match." | |
| ); | |
| break; | |
| } |
Uh oh!
There was an error while loading. Please reload this page.