Repository navigation
Conversation
This was referenced Oct 17, 2026
Open
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
October 17, 2026 01:27
5420fba to
b03df1f
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Oct 17, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
October 17, 2026 01:34
b03df1f to
88b7391
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Oct 17, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
October 17, 2026 14:36
88b7391 to
ba2b862
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Oct 17, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
October 17, 2026 14:43
ba2b862 to
bd155ec
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Oct 17, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
2 times, most recently
from
October 17, 2026 14:55
7701e54 to
77ec4ba
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Oct 17, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
November 12, 2026 18:19
77ec4ba to
aad73ee
Compare
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Nov 12, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
November 13, 2026 19:34
aad73ee to
735556d
Compare
A failed handshake used to return the `SignatureNoiseMessage` alone, leaving the operator to compare raw unix timestamps against the clock to guess what went wrong, and an application nothing to act on short of parsing a log line. Verification now returns a `CertificateError` naming the failed check (unsupported version, bad signature, empty validity window, not yet valid, expired), with the clock reading the time checks were made against, and `Error::InvalidCertificate` carries it next to the `SignatureNoiseMessage`. The signature is checked before the validity window, so a reported window problem always refers to timestamps the authority signed: a forged certificate, or one that does not verify for this server static pubkey and authority pubkey, is reported as `InvalidSignature` whatever timestamps it carries. `SignatureNoiseMessage::verify` and `verify_with_now` return the same `Result<(), CertificateError>` in place of a bool, so whoever loads a pre-issued certificate for `Responder::from_certificate` can run the initiator's checks ahead of any handshake and learn which one failed, instead of re-implementing them. The `SignatureNoiseMessage` `Display` drops the hex signature, which means nothing in a log line (`Debug` still has it), and codec_sv2 prints the reason ahead of it. `CertificateError` is re-exported next to `SignatureNoiseMessage`. The docs around them now tell the `SIGNATURE_NOISE_MESSAGE` apart from the certificate it forms with the responder's static key, as the spec does. Covered by the version bumps already pending on main: noise_sv2 3.0.0, codec_sv2 9.0.0 and stratum-core 0.8.0 over the published 2.1.0, 8.1.0 and 0.7.0. stratum-mining#2425
A successful handshake discarded the certificate, so an initiator could not log which certificate it accepted or when it expires. `NoiseEngine::certificate` and codec_sv2's `Transport::certificate` now return it as a `Certificate`: the spec's CERTIFICATE, formed by the `SignatureNoiseMessage` and the server's static public key its signature covers, together with the authority public key that signature was verified against. The responder has no authority key to verify against, so on its side there is none. Covered by the version bumps already pending on main. stratum-mining#2425
plebhash
force-pushed
the
2026-10-16-noise-certificate-ux
branch
from
November 26, 2026 01:50
735556d to
51161ce
Compare
plebhash
marked this pull request as ready for review
November 26, 2026 02:43
plebhash
added a commit
to plebhash/sv2-apps
that referenced
this pull request
Nov 26, 2026
…ificate-ux Temporary commit so CI builds against stratum-mining/stratum#2426. Drop it and update stratum-core to stratum main once that PR is merged.
Member
Author
|
ready for review, now that #2497 was merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #2425
companion stratum-mining/sv2-apps#931
rebuilt on
mainafter #2497 landed: every initiator pins an authority key now, so the verified certificate is always there on the initiator's sidethe handshake now hands applications typed results instead of text to parse (#2425 (comment)):
Error::InvalidCertificate { signature_noise_message, reason }, wherereasonis aCertificateError(UnsupportedVersion,InvalidSignature,EmptyValidityWindow,NotYetValid { now },Expired { now },nowbeing the local clock reading)NoiseEngine::certificate()/Transport::certificate()return the verifiedCertificate(signature_noise_message,server_static_pubkey,authority_pubkey), orNoneon the responder sideSignatureNoiseMessage::verify/verify_with_now, public sincenoise_sv2: let aResponderpresent a pre-issued certificate #2497 for whoever loads a pre-issued certificate, return the sameResult<(), CertificateError>in place of a boolthe certificate (spec 4.5.3) and the
SIGNATURE_NOISE_MESSAGE(spec 4.5.2) are kept apart in code and docs; the signature is checked before the validity window, so a forged certificate or a wrong key is reported asInvalidSignature, never as expiredCertificatehas noDisplay: the spec (4.7) encodes the authority pubkey in base58-check, whichnoise_sv2has no encoder for, so the apps format it;SignatureNoiseMessageandCertificateErrorkeep theirs for the codec error textas logged by the apps:
breaking, covered by the
noise_sv23.0.0,codec_sv29.0.0 andstratum-core0.8.0 bumps already pending onmain(crates.io has 2.1.0, 8.1.0 and 0.7.0)heads-up: sv2-ui parses the old error text (stratum-mining/sv2-ui#383)