Commit graph

21 commits

Author SHA1 Message Date
18a9dfae4c Simplify Monero recovery procedures and remove automated health checks
- Remove 'Automated Health Checks' section - redundant with make commands
- Simplify recovery procedures to match Dogecoin documentation style
- Remove bash script examples and implementation details
- Keep focus on essential backup/recovery information
2025-09-30 22:28:44 -04:00
dc01348782 Remove address validation code from documentation
- Replace Python validation functions with simple descriptions
- Keep validation rules (D prefix, 34 chars for DOGE; 4 prefix, 95/106 chars for XMR)
- Documentation should describe what, not show implementation how
2025-09-30 22:22:32 -04:00
7c9796c56c Simplify Dogecoin setup to use Makefile targets
- Replace manual installation steps with make install-dogecoin
- Replace manual configuration with make dogecoin-config
- Remove raw dogecoin-cli commands in favor of make targets
- Keep documentation focused on what users need to do, not implementation details
2025-09-30 22:18:11 -04:00
cb0676e701 Remove broken multi-node setup from Monero documentation
- Multi-node setups would cause account index mismatches
- Monero wallets can't be sharded or load balanced
- Replace with honest scaling limitations and realistic options
- Single wallet file is a fundamental architectural constraint
2025-09-30 22:14:39 -04:00
51ec71a9f9 Update crypto documentation with accurate configuration and remove tutorials
- Document actual resource requirements from production systems
- Fix fee documentation: fee buffers are for quotes, not wallet reserves
- Clarify perfect accounting to quote amounts in atomic units
- Remove generic curl/API tutorials, keep Make commands
- Add dust prevention benefit of exact amount sweeping
- Update Makefile targets to match what actually exists
2025-09-30 22:03:08 -04:00
7c8a0065cf modified: docs/CRYPTO.rst
new file:   docs/CRYPTO_PERFORMANCE.rst
	modified:   docs/DOGECOIN.md
	modified:   docs/MONERO.rst
2025-09-30 21:39:35 -04:00
04583ace53 Clean up Makefile sweep commands and documentation
- Remove error messages from sweep/sweep-check Makefile targets
- Keep commands functional for developers/admins in local environments
- Simplify documentation to focus on automatic sweeping behavior
- Maintain separation between end-user docs and dev tools
2025-09-30 20:54:50 -04:00
ed98674c48 Remove untested sweep_to_cold script and references
- Delete make_post_sell/lib/sweep_to_cold.py (untested, risky for production)
- Remove sweep_to_cold console script entry from setup.py
- Update Makefile to deprecate sweep/sweep-check, recommend tested alternatives
- Update CRYPTO.rst documentation to promote sweep-all and sweep-all-doge
- Reduce technical debt by eliminating dangerous untested code path
- Users should use properly tested sweep-all/sweep-all-doge commands instead
2025-09-30 20:54:50 -04:00
f2227199c9 Delete MONERO_DEFECTS.rst 2025-10-01 00:41:12 +00:00
86fdab0f3a Delete CRYPTO_WATCHER_FLOW.md 2025-10-01 00:40:29 +00:00
6ceb9375de modified: Makefile
new file:   docs/state-machine.dot
	new file:   docs/state-machine.dot.svg
	renamed:    state-machine.svg -> docs/state-machine.svg
2025-09-30 15:43:54 -04:00
0b5554e431 modified: docs/crypto-payments-state-machine.md
modified:   state-machine.svg
2025-09-30 14:46:47 -04:00
c7caae8d4a Fix crypto payment state machine logic and naming consistency
Major fixes:
1. Remove invalid received→expired transition
   - Payments that reach 'received' state cannot expire
   - Only pending payments can expire
   - Updated VALID_TRANSITIONS and tests accordingly

2. Rename STATUS_DOUBLEPAY_REFUND to STATUS_DOUBLEPAY_REFUNDED
   - Maintains consistency with all other past-tense status names
   - Updated all references across codebase and tests

3. Add INITIAL_WAITING_STATUSES semantic group
   - Groups states that are entry points: pending, latepay_refunded, doublepay_refunded
   - These states don't transition from 'received' - they represent initial states
   - Added is_initial_waiting_state() helper method

4. Update semantic groups
   - Removed latepay_refunded and doublepay_refunded from FAILED_PAYMENT_STATUSES
   - These are now in INITIAL_WAITING_STATUSES as they represent entry points

5. Fix mermaid diagram label
   - confirmed_overpay_not_refunded now correctly labeled as "Terminal Success (Not Refunded)"
   - Remove invalid received→expired transition from documentation

This improves the logical consistency of the state machine and aligns
the naming conventions across all status constants.
2025-09-30 14:34:11 -04:00
5c67b9ca4c Fix all crypto payment test failures and status constant issues
- Fix duplicate detection logic to prevent amount accumulation when new transactions arrive to already-processed payments
- Fix status constant naming errors: STATUS_CONFIRMED_OVERPAID → STATUS_CONFIRMED_OVERPAY, STATUS_EXPIRED_REFUNDED → STATUS_LATEPAY_REFUNDED
- Fix SweepRestockingFeeTests mock setup: add missing refund_confirmations, get_coin_config patches, and proper XMR client mocks
- Correct overpayment test expectations: restocking fee sweep happens later after refund confirmation, not immediately
- Update test assertions to match actual implementation behavior (transfer vs sweep_all for XMR)
- Add comprehensive mock configurations for DOGE/XMR atomic units and balance methods

All 108 crypto payment tests now pass. Fixes critical duplicate payment processing bug and aligns test expectations with production behavior.
2025-09-30 13:56:42 -04:00
923bd873f2 Add comprehensive crypto payment state transition validation
* Implement complete state machine with 17 test scenarios
* Add priority-based processing order validation
* Include property-based testing for state transitions
* Add graph analysis for state machine integrity
* Validate all payment lifecycle paths
* Ensure robust error handling and logging
* Remove temporary debug files and consolidate test structure
2025-09-30 11:26:44 -04:00
c1a936539e deleted: debug_auth_headers.py
deleted:    debug_digest_details.py
	deleted:    debug_monero_auth.py
	renamed:    CRYPTO_WATCHER_FLOW.md -> docs/CRYPTO_WATCHER_FLOW.md
	deleted:    test_digest_auth_local.py
	deleted:    test_dogecoin_client.py
	deleted:    test_monero_auth.py
	deleted:    test_monero_client.py
	deleted:    test_requests_lib.py
	deleted:    test_urllib_variants.py
2025-09-28 15:26:42 -04:00
c3c05796da Remove pooled sweep behavior and implement individual payment sweeping
- Remove pooled_sweep logic from both Monero and Dogecoin sweep functions
- Each payment now swept individually for better accounting and audit trail
- Insufficient balance now returns False to retry later instead of fake pooled_sweep
- Update all tests to expect new behavior (False for insufficient balance)
- Update documentation to reflect 1:1 payment-to-sweep mapping
- Add link to refund address configuration in crypto checkout template
- All crypto watcher tests now passing with new individual sweep logic
2025-09-24 16:03:50 -04:00
e4990a5462 Document Monero RPC get_transfers unlocked field defect
- Add comprehensive documentation of RPC inconsistency
- Include symptoms, impact, workarounds, and references
- Establishes framework for documenting future Monero RPC issues
2025-09-24 15:03:31 -04:00
c4d9192540 Improve crypto payment handling and out-of-stock refunds
- Add proper inventory checking before crypto payment completion
- Implement sequential (FIFO) crypto payment processing to prevent race conditions
- Add comprehensive out-of-stock refund handling with two statuses:
  - STATUS_OUT_OF_STOCK_REFUNDED: Full refund to customer (no restocking fee)
  - STATUS_OUT_OF_STOCK_NO_REFUND: Sweep to shop when no refund address
- Use sweep_all with subaddr_indices for Monero to ensure complete fund recovery
- Use sendtoaddress with subtractfeefromamount for Dogecoin fee handling
- Add refund tracking fields (refund_reason, refund_tx_hash, refund_amount)
- Update MONERO.rst with subaddress isolation and refund processing documentation
- Ensure action buttons are removed for non-pending crypto quotes to prevent double payments
2025-09-24 09:35:07 -04:00
b2a47f6789 Move crypto documentation to docs directory
- Move CRYPTO.rst to docs/CRYPTO.rst
- Move CRYPTO_PROBLEMS.rst to docs/CRYPTO_PROBLEMS.rst

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 13:21:15 -04:00
68d4ccfc25 Dogecoin payment support 2025-09-23 11:17:05 +00:00