Issues Addressed: #1173, #1174, #1175, #1181
Status: Implementation Guide
Target: Mainnet Freeze
This document provides a comprehensive plan for completing all mainnet readiness documentation, testing, and audit tasks before the mainnet freeze. The work is organized into four parallel tracks that can be executed independently.
Priority: P2-Medium
Difficulty: Easy
Estimated Effort: 1 day
Status: ✅ COMPLETED IN THIS PR
Added comprehensive mainnet quickstart section covering:
- Installation with mainnet-safe defaults
- Network configuration (
--confirm-mainnetflag) - Security checklist integration
- Migration guide references
- Safety flag documentation
Enhanced getting started guide with:
- Mainnet-specific workflow
- Production deployment checklist
- Safety verification steps
- Testnet-to-mainnet migration path
Updated internationalized README files:
README.es.md- Spanish translationREADME.zh-CN.md- Chinese translation- Mainnet quickstart sections in all languages
- Consistent terminology across translations
- Mainnet quickstart section in README.md
- Mainnet workflow in GETTING_STARTED.md
- Spanish translation updated
- Chinese translation updated
- References to #1171 migration guide
- References to #1124, #1133 safety flags
Priority: P2-Medium
Difficulty: Medium
Estimated Effort: 2-3 days
Status: 🔧 IMPLEMENTATION GUIDE PROVIDED
Tool: lychee.toml (already configured)
# Run full link check
lychee --config lychee.toml docs/ *.md
# Fix broken links incrementally
lychee --config lychee.toml --verbose docs/ 2>&1 | tee link-check-results.txt
# Generate report
lychee --config lychee.toml --format markdown docs/ > LINK_AUDIT_REPORT.mdCommon Link Issues:
- GitHub issue/PR references: Update to current numbers
- External documentation: Check for moved/deprecated pages
- Code sample references: Verify file paths exist
- Anchor links: Validate section headers exist
Tool: scripts/validate_docs_specs.js
# Run validation script
node scripts/validate_docs_specs.js
# Fix issues found
# Common problems:
# - Outdated CLI command syntax
# - Removed API endpoints
# - Changed function signatures
# - Missing imports in code samplesFiles to Manually Test:
GETTING_STARTED.md- All code samplesQUICK_START.md- Quick start commandsdocs/rules/S001.mdthroughdocs/rules/S012.md- Rule examplesREADME.md- 30-second quickstart sectionLIVE_TESTNET.md- On-chain invocation examples
Test Against Mainnet-Stable CLI:
# Verify each code sample executes without error
sanctifier analyze ./contracts
sanctifier analyze ./contracts --exit-code --format sarif
sanctifier badge --report report.json --svg-output sanctifier.svg
# Test on-chain commands (if applicable)
stellar contract invoke --network mainnet --id $CONTRACT_ID -- health_check-
LINK_AUDIT_REPORT.md- Complete link check results -
CODE_SAMPLE_VALIDATION_REPORT.md- Validation script results - All broken links fixed
- All code samples verified working
-
validate_docs_specs.jspassing clean -
lycheepassing clean
- Lychee link-check passes clean (zero broken links)
-
validate_docs_specs.jspasses clean (zero validation errors) - High-traffic docs manually spot-checked and verified
- All fixes committed and tested
Priority: P3-Low
Difficulty: Easy
Estimated Effort: 1-2 days
Status: 📹 SCRIPT PROVIDED
File: docs/VIDEO_WALKTHROUGH_SCRIPT.md
"Welcome to Sanctifier's Mainnet Workflow demonstration.
In this walkthrough, we'll show you how to scan, deploy, and monitor
Soroban smart contracts on mainnet using Sanctifier's security tooling.
This extends our formal verification series with mainnet-specific
features introduced in the latest release."
"First, install Sanctifier with mainnet-ready defaults:
[TERMINAL]
cargo install sanctifier-cli
Next, configure your network. Sanctifier requires an explicit
confirmation flag for mainnet operations:
[TERMINAL]
export STELLAR_NETWORK=mainnet
export SANCTIFIER_CONFIRM_MAINNET=true
Or use the --confirm-mainnet flag on each command."
"Before deploying to mainnet, run a comprehensive security scan:
[TERMINAL]
sanctifier analyze ./contracts --network mainnet
Pay attention to critical findings marked S001-S012.
Each finding has documentation and remediation guidance.
[SHOW: Finding output with explanations]
Fix all critical issues before proceeding."
"Deploy your contract with mainnet safety flags:
[TERMINAL]
stellar contract deploy \\
--wasm target/wasm32-unknown-unknown/release/contract.wasm \\
--network mainnet \\
--source DEPLOYER_SECRET
Sanctifier monitors the deployment and validates:
- Contract bytecode integrity
- Initial state safety
- Authorization patterns
- Storage initialization
[SHOW: Deployment output]"
"After deployment, enable runtime monitoring:
[TERMINAL]
sanctifier monitor \\
--contract-id CXXXXX... \\
--network mainnet \\
--alert-on critical,high
This provides:
- Real-time event monitoring
- Authorization audit trail
- State change validation
- Anomaly detection
[SHOW: Monitor dashboard]"
"Verify your deployment with health checks:
[TERMINAL]
stellar contract invoke \\
--id CXXXXX... \\
--network mainnet \\
-- health_check
For more information:
- Migration Guide: docs/MAINNET_MIGRATION_GUIDE.md
- Safety Checklist: docs/MAINNET_SAFETY_CHECKLIST.md
- Full documentation: sanctifier.dev
Thank you for using Sanctifier to secure Soroban mainnet."
- Script approved and reviewed
- Test environment setup (mainnet simulation)
- Recording software configured (OBS, Loom, etc.)
- Audio quality checked
- Screen resolution optimized (1920x1080 recommended)
- Terminal font size readable (16pt minimum)
- Video recorded and edited
- Captions/subtitles added
- Published to hosting channel (YouTube, Vimeo, etc.)
- Links updated in:
- README.md
- GETTING_STARTED.md
- docs/MAINNET_MIGRATION_GUIDE.md (if exists)
- docs/formal-verification-video-series.md
- Video recorded, published, and linked from relevant docs
- Video covers complete mainnet workflow end-to-end
- Script follows existing series format
- All commands demonstrated are functional
Priority: P2-Medium
Difficulty: Medium
Estimated Effort: 3 days
Status: 🔍 AUDIT FRAMEWORK PROVIDED
Script: Create scripts/audit_rule_coverage.sh
#!/bin/bash
# Enumerate all active rules from tooling/sanctifier-core
echo "# Rule Coverage Audit Report"
echo "Generated: $(date)"
echo ""
# Extract all rule codes
RULES=$(grep -r "pub const.*: &str = \"S[0-9]" tooling/sanctifier-core/src/ | \
sed 's/.*"\(S[0-9]*\)".*/\1/' | sort -u)
echo "## Active Rules"
echo ""
for rule in $RULES; do
echo "- $rule"
done
echo ""
echo "Total rules: $(echo "$RULES" | wc -l)"Location: contracts/fixtures/finding-codes/
For each rule, verify:
- Triggering fixture exists - Should produce finding
- Clean fixture exists - Should NOT produce finding
- Snapshot test passes for both
Script: Create scripts/check_fixture_pairs.sh
#!/bin/bash
# Check fixture pairs for each rule
FIXTURE_DIR="contracts/fixtures/finding-codes"
MISSING_PAIRS=()
for rule_dir in $FIXTURE_DIR/S???; do
rule=$(basename $rule_dir)
if [ ! -f "$rule_dir/triggering.rs" ]; then
MISSING_PAIRS+=("$rule: missing triggering.rs")
fi
if [ ! -f "$rule_dir/clean.rs" ]; then
MISSING_PAIRS+=("$rule: missing clean.rs")
fi
if [ ! -f "$rule_dir/test_snapshot.rs" ]; then
MISSING_PAIRS+=("$rule: missing test_snapshot.rs")
fi
done
if [ ${#MISSING_PAIRS[@]} -gt 0 ]; then
echo "❌ Missing fixture pairs:"
printf '%s\n' "${MISSING_PAIRS[@]}"
exit 1
else
echo "✅ All rules have complete fixture pairs"
fiOutput: docs/rules/COVERAGE_TABLE.md
# Rule Test Coverage Status
| Rule | Triggering Fixture | Clean Fixture | Snapshot Test | Status |
|------|-------------------|---------------|---------------|--------|
| S001 | ✅ | ✅ | ✅ | Complete |
| S002 | ✅ | ✅ | ✅ | Complete |
| S003 | ✅ | ✅ | ✅ | Complete |
| ... | ... | ... | ... | ... |
| S030 | ❌ | ❌ | ❌ | Missing |
**Legend:**
- ✅ Present and passing
- ⚠️ Present but failing
- ❌ Missing
**Summary:**
- Total rules: 30+
- Complete coverage: XX rules
- Partial coverage: XX rules
- Missing coverage: XX rulesFor rules without fixtures, use this template:
File: contracts/fixtures/finding-codes/SXXX/triggering.rs
// Triggering fixture for SXXX: [Rule Description]
// This code SHOULD produce a finding
#![no_std]
use soroban_sdk::{contract, contractimpl, Env};
#[contract]
pub struct TriggeringContract;
#[contractimpl]
impl TriggeringContract {
// Add code that violates SXXX rule
pub fn violating_function(env: Env) {
// TODO: Implement violation
}
}File: contracts/fixtures/finding-codes/SXXX/clean.rs
// Clean fixture for SXXX: [Rule Description]
// This code should NOT produce a finding
#![no_std]
use soroban_sdk::{contract, contractimpl, Env};
#[contract]
pub struct CleanContract;
#[contractimpl]
impl CleanContract {
// Add compliant code
pub fn compliant_function(env: Env) {
// TODO: Implement compliant version
}
}-
Day 1: Audit
./scripts/audit_rule_coverage.sh > RULE_AUDIT.md ./scripts/check_fixture_pairs.sh -
Day 2: Add Missing Fixtures
- Identify gaps from audit
- Create triggering/clean pairs for each
- Write snapshot tests
-
Day 3: Verification & Documentation
cargo test --package sanctifier-core -- --nocapture ./scripts/generate_coverage_table.sh > docs/rules/COVERAGE_TABLE.md
-
scripts/audit_rule_coverage.sh- Rule enumeration script -
scripts/check_fixture_pairs.sh- Fixture verification script -
docs/rules/COVERAGE_TABLE.md- Coverage status table - Missing fixture pairs added
- All snapshot tests passing
- Coverage report published
- Every active rule S001-S030 has both triggering and clean fixtures
- All fixtures have passing snapshot tests
- Coverage table published in
docs/rules/ - No gaps in test coverage
- Day 1-2: Track 1 (Mainnet Quickstart) - ✅ COMPLETE
- Day 2-4: Track 4 (Snapshot Audit) - Start audit phase
- Day 5: Track 2 (Link Audit) - Run lychee + validation script
- Day 6-7: Track 4 (Snapshot Audit) - Add missing fixtures
- Day 7-8: Track 2 (Link Audit) - Fix broken links/samples
- Day 8-9: Track 3 (Video) - Record and publish
#1171 (Migration Guide)
↓
#1173 (Mainnet Quickstart) ← THIS PR
↓
#1175 (Video Walkthrough)
#1174 (Link Audit) ← Independent
#1181 (Test Coverage) ← Independent
- All documentation passes link checking (lychee clean)
- All code samples validated (validate_docs_specs.js clean)
- Mainnet quickstart available in 4 languages
- Video published and linked from docs
- 100% rule coverage with fixture pairs
- Coverage table published
- Zero gaps before mainnet freeze
# Full documentation audit
make lint-docs
# Link check only
lychee --config lychee.toml docs/ *.md
# Code sample validation
node scripts/validate_docs_specs.js
# Fixture coverage audit
cargo test --package sanctifier-core --lib -- --nocapture | grep "S[0-9]"
# Generate coverage report
./scripts/generate_coverage_table.sh- Run link checks monthly
- Update code samples with each CLI release
- Re-record video annually or after major features
- Audit fixture coverage before each release
Last Updated: $(date)
Maintainer: HyperSafeD Team
Related Issues: #1173, #1174, #1175, #1181