Require server-issued challenges for attestation submit#1756
Require server-issued challenges for attestation submit#1756Mavline wants to merge 3 commits intoScottcjn:mainfrom
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
|
Review-ready. This PR is a focused security hardening follow-up to merged PR #1746. It closes the remaining client-controlled timestamp / arbitrary-nonce path in /attest/submit and makes pico_bridge fail closed Happy to answer any review questions or adjust the patch if needed. |
|
Review: Approve ✅ Excellent security hardening. Removing the local nonce fallback and requiring server-issued challenges closes a real replay attack surface. Test coverage is thorough. One minor: 💰 75 RTC — solid security contribution @Mavline. Please share your RTC wallet address. |
|
Excellent security hardening — removing the client-supplied timestamp attack surface is the right call. Has a merge conflict with main though. Can you rebase? Will merge immediately after. |
|
Update: CI fix just landed on main (removed broken |
|
Still approved — excellent security hardening. Just needs rebase against current main. The BCOS scan CI is being fixed separately. |
Follow-up to #1746.
This tightens the attestation nonce contract so
/attest/submitonly accepts live server-issued challenges from/attest/challenge. The previous merged path could still be bypassed by supplying client-controlled timestamp fields, and in-treepico_bridgestill had an insecure local-nonce fallback.What changed:
used_noncesafter successful challenge consumptionpico_bridgeclosed when challenge fetch fails instead of synthesizing a local nonceValidation:
/tmp/rustchain-test-venv/bin/python -m unittest node/tests/test_attest_nonce_replay.py node/tests/test_attest_submit_challenge_binding.py/tmp/rustchain-test-venv/bin/python miners/pico_bridge/tests/test_pico_bridge_miner.pyImportant deployment note: