security: reject replayed MiningProof nonces#2058
Merged
Scottcjn merged 1 commit intoScottcjn:mainfrom Apr 4, 2026
Merged
Conversation
Owner
|
Merged. 25 RTC. Existing attestation has nonce replay protection, but this hardens the mining proof path. Low severity but correct. |
Contributor
Code Review — PR #2058Reviewer: FlintLeng ✅ LGTMClean implementation. Follows project patterns well. |
FlintLeng
reviewed
Apr 24, 2026
Contributor
FlintLeng
left a comment
There was a problem hiding this comment.
PR #2058 — Review:
Adds RUSTCHAIN_DEV_INSECURE_TLS env var to disable TLS cert validation in development only. Clearly documented as INSECURE and defaults to false — good fail-closed design. The env var name with DEV prefix makes it obvious this should never be used in production. ✅
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.
Summary
This change hardens Proof of Antiquity validation by rejecting replayed
MiningProofnonces across block boundaries.What changed
ProofOfAntiquitysubmit_proof()with a dedicatedNonceReuseerrorWhy
The previous implementation accepted proofs without checking whether a wallet had already used the supplied nonce. Because pending proof state is cleared between blocks, the same proof nonce could be replayed in later blocks and accepted again.
Scope
rips/src/proof_of_antiquity.rsonlyCloses #2057
Payout Wallet
RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35