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

Adjust some logs #225

Merged
merged 7 commits into from
Dec 11, 2023
Merged

Adjust some logs #225

merged 7 commits into from
Dec 11, 2023

Conversation

divagant-martian
Copy link
Collaborator

@divagant-martian divagant-martian commented Dec 10, 2023

Description

Adjust some common logs seen on sigp/lighthouse#4979

  • Query time out; Queries always have a callback, so this error is always informed in the form of an event, the caller can decide what to do with this
  • Failed FINDNODE; unclear what kind of errors are happening. I suspect we will be downgrading this log eventually
  • Blacklisting peer. Log was not very descriptive of what is actually going on
  • IP mode info. Before we would only know this on start, not on creation. Since this is no longer the case the two logs (start and creation) can be merged

Notes & open questions

Change checklist

  • Self-review
  • Documentation updates if relevant
  • Tests if relevant

@divagant-martian divagant-martian changed the title remove log for timed out query. This is always informed in the callback Adjust some logs Dec 10, 2023
Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'd suggest keeping the query-timeout but just a debug.

warn!("Query id: {:?} timed out", query.id());
Poll::Ready(QueryEvent::TimedOut(Box::new(query)))
}
QueryPoolState::Timeout(query) => Poll::Ready(QueryEvent::TimedOut(Box::new(query))),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
QueryPoolState::Timeout(query) => Poll::Ready(QueryEvent::TimedOut(Box::new(query))),
debug!("Query id: {:?} timed out", query.id());
QueryPoolState::Timeout(query) => Poll::Ready(QueryEvent::TimedOut(Box::new(query))),

Users can set the max time for a query. It's useful to know if the results were partial or not. How about downgrading to a debug?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why I removed it is because a query timeout is on itself an event emited via the callback. Also queries belong to request so I'm not sure the query id on itself is useful info.

Do you still prefer to have this as a debug statement?

@AgeManning AgeManning merged commit ce7531c into sigp:master Dec 11, 2023
6 checks passed
AgeManning added a commit that referenced this pull request Feb 21, 2024
* Version bump to v0.3.1 (#203)

* fix docs (#204)

* refactor for removing `Discv5` prefix (#206)

* goodbye prefix

* adjust docs

* fix rpc decoding to reject extra data (#208)

* reject extra data

* reduce diff

* expected_responses remains after challenge has been completed (#210)

* Replace `Handler::spawn` with `build_handler()` and `Handler::start()`

* Test the handler's states after the handler has been terminated

* Remove expected response on handle_auth_message()

* Rename variables for readability

* Expose local ENR Arc (#214)

* Use zero ports in tests (#216)

* update dependencies (#219)

* Changing port of ReponseBody::Pong to NonZeroU16 (#220)

* Change `port` from u16 to NonZeroU16

* Fix tests

* Fix test: the PONG port can't be zero

* Fix clippy warnings

* Update 'enr' dependency (#223)

* Add support for concurrent requests to a single peer. (#200)

Co-authored-by: ackintosh <sora.akatsuki@gmail.com>
Co-authored-by: Diva M <divma@protonmail.com>
Co-authored-by: Age Manning <Age@AgeManning.com>

* Adjust some logs (#225)

* remove log for timed out query. This is always informed in the callback

* expand common logs, unify info on startup

* adjust auth header log

* Update src/service.rs

* Appease clippy

* Realised I was wrong. Don't need this log, my bad

* fmt

---------

Co-authored-by: Age Manning <Age@AgeManning.com>

* Version bump to v0.4.0

* make tracing-subscriber a dev dep (#226)

* Fix warnings and bump libp2p (#232)

* Update session_cache_capacity from usize to NonZeroUsize

since the argument of LruCache::new is NonZeroUsize.

* Fix rustdoc

* cargo fmt

* Fix a merging mistake: lost validation in Message::decode

---------

Co-authored-by: Age Manning <Age@AgeManning.com>
Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
Co-authored-by: Jack McPherson <jmcph4.github@gmail.com>
Co-authored-by: João Oliveira <hello@jxs.pt>
Co-authored-by: Milos Stankovic <82043364+morph-dev@users.noreply.github.com>
Co-authored-by: Nick Gheorghita <nickgheorghita@gmail.com>
Co-authored-by: Diva M <divma@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants