Commit Graph

8 Commits

Author SHA1 Message Date
Matt Hess a13c1d6451 Salvium 2 layers 2-5: validation, builder, CLI, FFI, RPC
- Fix builder version selection to emit v5 for CREATE_TOKEN/ROLLUP
  - Add consensus validation for tx types 9-10 (HF11 gating, asset rules)
  - Wire wallet token module (validate_create_token_params, CREATE_TOKEN_COST)
  - Add CreateToken CLI command with full build/sign/submit pipeline
  - Add salvium_wallet_create_token FFI endpoint with token metadata support
  - Add create_token wallet RPC types and method
  - Fix CLI mempool scan skipped when wallet already at chain tip
  - Show pool TXs in history by default, display "pool" instead of height 0
  - Normalize FFI input param structs to camelCase (#[serde(rename_all)])
  - Update tx_type_name for types 9 (CREATE_TOKEN) and 10 (ROLLUP)
  - Add integration testing docs (docs/integration-testing.md)
2026-03-03 15:50:54 +00:00
Matt Hess 0459b3d0f9 Add mempool TX scanning: show pending transfers immediately after sync and broadcast 2026-03-02 16:34:59 +00:00
Matt Hess aa30b213d2 Add distributed multi-node fetch and explorer FFI exports
Distribute block fetch requests across up to 4 fastest nodes in the
  NodePool, selected by latency-weighted racing. All configured nodes
  are probed but only the top 4 are used for parallel fetching.

  NodePool (salvium-rpc):
  - Add max_fetch_nodes to PoolConfig (default 4)
  - Add force_race() to probe all nodes on demand
  - Add fetch_batch_distributed() with latency-weighted range splitting
  - Add compute_assignments() with 6 unit tests
  - Add DistributedBatchResult type

  Sync engine (salvium-wallet):
  - Call force_race() at sync start to populate latency data
  - Replace all 3 fetch sites with fetch_batch_distributed
  - Simplify PrefetchResult to use DistributedBatchResult

  Explorer FFI (salvium-ffi):
  - Add salvium_daemon_get_blocks_by_height (JSON heights → blocks)
  - Add salvium_daemon_get_transactions (JSON hashes → tx hex)
  - Add salvium_daemon_add_nodes (batch add from JSON array)
  - Add salvium_daemon_force_race (probe all nodes)

  CLI & bench:
  - Add --nodes flag to salvium-wallet-cli and salvium-sync-bench
  - Wire extra nodes into NodePool for sync commands

  Docs:
  - Document multi-node setup in wallet-sync-spec.md
  - Document FFI block/tx fetching in explorer-spec.md
2026-02-27 18:56:31 +00:00
Matt Hess 9996b116a7 Fix get_outs HTTP 500 by using global index space for decoy selection
The transfer pipeline was passing asset-type-specific asset_type to get_output_distribution and get_outs but using global output indices from the wallet DB, causing an index space mismatch that made the daemon return HTTP
   500. Switched to empty asset_type (global index space) for both calls, matching the existing salvium-cli pattern. Removed unused is_global_out field from OutputRequest. Bumped version to r012.
2026-02-27 03:19:45 +00:00
Matt Hess fad6aca9c6 Fix doc inaccuracies across wallet-sync-spec, explorer-spec, ffi-scanner
Correct camelCase field names in FFI source comments, fix build script
  target description, bigint→number types for u64 params, address format
  values (legacy not CryptoNote), verify_rct binary return format, and
  stale line number references.
2026-02-27 01:19:38 +00:00
Matt Hess a662f7da2e Fix subaddress creation to use chain tip for CARROT detection, add CARROT subaddress derivation 2026-02-26 11:56:42 +00:00
Matt Hess 65d596a6ea Add sync cancellation via AtomicBool flag for FFI consumers
Allows Android/FFI callers to interrupt an in-progress wallet sync
  cleanly between batches. Adds salvium_wallet_stop_sync FFI export,
  WalletError::Cancelled, SyncEvent::Cancelled, and WalletHandle
  wrapper that pairs each wallet with its cancellation flag.
2026-02-26 02:23:12 +00:00
Matt Hess bcfe173261 Add FFI CARROT scanner integration reference for Dart/Flutter consumers 2026-02-12 21:29:26 +00:00