docs: add wRTC quickstart documentation with comprehensive tests#141
docs: add wRTC quickstart documentation with comprehensive tests#141Scottcjn merged 2 commits intoScottcjn:mainfrom
Conversation
- Add complete wRTC onboarding guide (buy, verify, bridge, withdraw) - Include comprehensive anti-scam checklist with canonical mint - Add step-by-step instructions for Raydium swap and BoTTube bridge - Include quick reference tables and troubleshooting section - Add comprehensive test suite (21 tests) validating: - Mint address format and consistency - All required sections present - URL validity and HTTPS usage - Anti-scam content documented - No TODO placeholders - README integration - Link from main README with prominent callouts All tests passing: 21/21 ✓ Closes Scottcjn#58 Closes Scottcjn#80
|
Security-focused review (PR #141)
Overall: content is good; fix the length checks + the candidate filter so tests actually enforce the canonical mint. |
David-code-tang
left a comment
There was a problem hiding this comment.
Security/doc review notes:
- Avoid recommending insecure TLS by default
- docs/wrtc.md uses
curl -sk https://50.28.86.131/...which disables certificate verification. - Suggest providing a secure default first (e.g. fetch the cert once and use
--cacert, or document a pinned fingerprint), and only mention-kas a last-resort fallback.
- Mint consistency tests have a logic bug
- The canonical mint is 44 chars, but test_mint_address_consistency() filters
likely_mintsto len == 43. That means it may silently skip checking the canonical mint and any 44-char mints. - Suggest: treat 43-44 as candidates and assert ALL found mints equal CANONICAL_MINT (or at least the 43/44 ones), e.g.
if len(m) in (43,44).
- Minor: make sure any base58-like strings that are not mints (addresses, tx sigs) don’t get falsely treated as mints by the regex-based tests; you might want a stricter pattern or contextual anchoring.
Overall: nice anti-scam emphasis + tests are a good direction; tightening these two items would improve safety.
|
@David-code-tang Update: All review comments have been addressed in the latest commit. Key fixes:
Added 2 new tests to verify the fixes. All 23 tests passing. Ready for re-review! |
|
@David-code-tang Thanks for the detailed security review! All three issues have been addressed: 1. Mint Address Length Assertion ✅
2. Regex Logic Bug ✅
3. Insecure curl Command ✅
New Tests Added
Test ResultsReady for another round of review! |
Scottcjn
left a comment
There was a problem hiding this comment.
Changes Requested — Better than #151 but still needs work
This is a more comprehensive attempt at the wRTC Quickstart docs bounty (#58). However:
- Verify all commands work: Every CLI command and curl example must be tested against live infrastructure. Include output
- Bridge section incomplete: The bridge at
bottube.ai/bridgeneeds step-by-step instructions with screenshots - Raydium swap link: Include the actual swap URL:
https://raydium.io/swap/?inputMint=sol&outputMint=12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X - Token details: Mint address, decimals (6), supply (8.3M), immutable metadata — all should be documented
- Test suite: The "comprehensive tests" mentioned — do they actually run? Provide test output
The bar for #58 is a doc that a new user can follow end-to-end. Almost there — polish it up.
|
This PR is merged. To queue the bounty payout for #58 (40 RTC), please reply with your RustChain wallet name ( Reminder: RustChain bounties pay to a RustChain |
|
🎉 Your bounty payment is queued! You have 40 RTC pending for this merged PR. To claim it, we need your RustChain wallet name. How to get your wallet (takes 30 seconds):Option 1 — Start mining (recommended): pip install clawrtc
clawrtc --wallet YOUR-CHOSEN-NAMEYour wallet name is whatever string you choose (e.g., your GitHub username). Option 2 — Just claim the wallet name: Example: Check your balance anytime:
|
|
Reviewed changes for 'docs: add wRTC quickstart documentation '. The implementation is clean and the approach makes sense. |
This PR adds a comprehensive wRTC quickstart guide as requested in #58 and delivers the bounty claim in #80.
Changes
docs/wrtc.md(420 lines) with complete onboarding guidetests/test_wrtc_docs.py+tests/run_tests.py)Test Results
Canonical Info Verified
12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4XCloses #58
Closes #80