Skip to content

noise_sv2: handshake does not expose why a certificate was rejected, nor the certificate it accepted #2425

In review

Description

@plebhash

while investigating stratum-mining/sv2-ui#383 I noticed we can improve logs around certificates

noise_sv2 itself doesn't log anything, the logs are emitted by the applications in sv2-apps.

so noise_sv2 must give the applications everything they need to log, as typed values returned by the handshake (Ok and Err) rather than text, so that applications and sv2-ui act on types instead of parsing logs (see stratum-mining/sv2-apps#577). the logging itself needs a companion PR on sv2-apps

more specifically:

handshake failure

we don't log what was the root cause of the failure, only a generic SignatureNoiseMessage (which is part of, but shouldn't be conflated with a certificate)

there's multiple potential causes for a handshake failure:

  • unsupported version
  • not yet valid
  • expired
  • bad signature

moreover, the logs should also display the current system clock reading to make it easy to spot potential NTP issues

handshake success

a successful handshake should still log the meaningful certificate parameters, because those are also useful to the operator

meaningful parameters are:

  • certificate version
  • validity window (valid_from and not_valid_after)
  • server static public key
  • authority public key, in the base58-check encoding operators use to configure it (spec 4.7)

for example, after public pool certificate was renewed, I was curious to know which validity they set for the new certificates, but I could not easily see that from logs

Activity

  1. changed the title [-]`noise_sv2`: need to improve logs around certificate[/-] [+]noise_sv2: handshake does not expose why a certificate was rejected, nor the certificate it accepted[/+] on Oct 17, 2026
  2. changed the title [-]noise_sv2: handshake does not expose why a certificate was rejected, nor the certificate it accepted[/-] [+]`noise_sv2`: handshake does not expose why a certificate was rejected, nor the certificate it accepted[/+] on Oct 17, 2026
  3. 35 remaining items

  4. moved this from In Progress 🏗️ to Ready For Review 🔍 in stratum 🛠️on Nov 26, 2026
  5. moved this from In Progress 🏗️ to Ready For Review 🔍 in Stratum V2 - 2026 Q4 - Roadmap 📍🗺️on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions