Skip to content

Conversation

@lucasbalieiro
Copy link
Collaborator

@lucasbalieiro lucasbalieiro commented Dec 3, 2025

closes #2015

SignatureNoiseMessage:: verify_with_now verification now accepts messages whose valid_from/not_valid_after bounds fall within a 10-second leeway.

impl Display trait for SignatureNoiseMessage.

Bump noise-sv2 from 1.4.0 to 1.4.1

@lucasbalieiro lucasbalieiro force-pushed the add-time-tolerance-to-noise-validation branch from cdc67a3 to a461e61 Compare December 3, 2025 18:52
@lucasbalieiro lucasbalieiro marked this pull request as ready for review December 3, 2025 18:53
@lucasbalieiro
Copy link
Collaborator Author

added 841641d which implements Display for SignatureNoiseMessage, allowing sv2-apps to show clear, human-readable info instead of raw byte dumps.

Before display trait:

2025-12-02T14:16:24.691962Z ERROR translator_sv2::sv2::upstream::upstream: Failed Noise handshake with 188.40.233.17:34254: CodecError(NoiseSv2Error(InvalidCertificate([0, 0, 190, 244, 46, 105, 206, 2, 47, 105, 146, 164, 238, 218, 246, 86, 50, 46, 132, 248, 120, 123, 118, 153, 4, 114, 57, 4, 38, 69, 151, 151, 236, 168, 65, 8, 171, 78, 155, 197, 49, 22, 124, 242, 209, 235, 58, 247, 35, 255, 50, 197, 166, 89, 214, 131, 117, 189, 48, 206, 159, 209, 220, 99, 110, 212, 215, 210, 225, 183, 35, 226, 102, 46]))). Retrying...

after display trait:

2025-12-03T23:56:47.689861Z ERROR translator_sv2::sv2::upstream::upstream: Failed Noise handshake with 188.40.233.17:34254: Invalid Certificate: SignatureNoiseMessage { version: 0, valid_from: 1764806224, not_valid_after: 1764809824, signature: 679a439dedcd34e2524a0812237575f3734fb69ccdf8b03c3019d286b63fd7c72acbbab2df28ff8541a06ad0b850e37bc0f282621ff0255a3e1b33212542f600 }. Retrying...

@GitGab19
Copy link
Member

GitGab19 commented Dec 4, 2025

Also, let's bump the PATCH for noise_sv2 crate.

In this way we're gonna publish this change in the next release.

@lucasbalieiro lucasbalieiro force-pushed the add-time-tolerance-to-noise-validation branch 2 times, most recently from c839fcf to 00018ba Compare December 4, 2025 17:18
`SignatureNoiseMessage` verification now accepts messages whose
`valid_from`/`not_valid_after` bounds fall within a 10-second leeway. This
prevents false negatives when the local machine clock is a few seconds
ahead or behind (e.g., minor NTP drift).
@lucasbalieiro lucasbalieiro force-pushed the add-time-tolerance-to-noise-validation branch from 00018ba to 33f14db Compare December 6, 2025 17:25
@plebhash plebhash merged commit 7c0c883 into stratum-mining:main Dec 6, 2025
13 checks passed
@lucasbalieiro lucasbalieiro deleted the add-time-tolerance-to-noise-validation branch December 6, 2025 19:10
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.

should verify_with_nowhave a time leeway?

3 participants