Commit Graph

83 Commits

Author SHA1 Message Date
LORDBABUINO 52fb5b4c39 docs: use scripts/setup.sh in readme quickstart
Replace the giant inline bootstrap-and-scan bash block with the
setup.sh script that already does the same thing (and is maintained
alongside the regtest harness). The reader sees four short steps —
setup, start API, scan, CLI alternative — instead of 40 lines of
shell to copy-paste correctly.
2026-05-11 20:22:10 -03:00
LORDBABUINO a24dc0aa1f docs: point readme bitcoin.conf section to bitcoin.conf.example
Replace the inline cat heredoc with a single cp instruction so the
example config stays canonical (the file is already in the repo and
also drives ./scripts/setup.sh).
2026-05-11 20:21:43 -03:00
LORDBABUINO 25a0594f74 refactor(api): remove preflight descriptor validation
The Bitcoin Core node is the authority on descriptor validity.
Reimplementing descriptor shape/prefix/checksum checks here creates
a divergence risk with the node's own validator and adds maintenance
surface for no real safety gain. Invalid descriptors now fail at the
node, surfaced through AnalysisError.

- delete api/src/preflight.rs and its module declaration
- drop ValidationError from ApiError (no remaining producers)
- remove the validate() call from the scan handler
- drop the two tests that asserted preflight-specific rejection codes
2026-05-11 20:21:23 -03:00
LORDBABUINO 2dcb2d244c refactor(api): use read_cookie_file in e2e regtest tests
Replace the inline cookie split with stealth_bitcoincore::read_cookie_file,
which already implements the same parsing with proper error handling.
Removes duplication and keeps the cookie format in one place.
2026-05-11 20:19:48 -03:00
LORDBABUINO 446fb9eb45 refactor(api): use match for scan input validation
The if-chain and counter pattern is a 5-arm tuple match in disguise.
Pattern match on (descriptor, descriptors, utxos) directly: every
valid case picks exactly one variant, the empty tuple is a clear
missing-input error, and the wildcard catches mutual-exclusion
violations.
2026-05-11 20:18:52 -03:00
LORDBABUINO ca827db53e feat(api): add permissive CORS layer
Browser-based frontends need CORS to call the API. Apply
tower_http::cors::CorsLayer::permissive() at the router level so
the frontend (and other origins during development) can reach the
scan endpoint.
2026-05-11 20:18:31 -03:00
LORDBABUINO 3ab2fb3c9c refactor(api): drop dead-code cookie loop in detect_cookie_file
The second loop is unreachable: the first loop returns as soon as it
finds an existing candidate. Collapse to a single iterator chain.
2026-05-11 20:17:58 -03:00
LORDBABUINO 9e1cadcc5e Merge remote-tracking branch 'origin/main' into satsfy-pr17-rebase
# Conflicts:
#	Cargo.toml
#	README.md
#	bitcoin.conf.example
2026-05-11 20:17:44 -03:00
LORDBABUINO 501d6883c6 Merge pull request #18 from satsfy/add-cli
refactor: implement stealth cli as rust crate
2026-04-10 18:49:52 -03:00
Renato Britto 780c3122bd feat(docs): add docs for api package 2026-04-09 17:55:36 -03:00
Renato Britto 720342f880 refactor(api): expand and test api as stealth http interface 2026-04-09 17:55:34 -03:00
Renato Britto 41098fc209 fixup! feat(docs): update README for cli rust crate instructions 2026-04-09 16:27:07 -03:00
Renato Britto 1d0479cc83 fixup! feat(cli): create rust package cli for stealth cli interface 2026-04-09 16:11:30 -03:00
Renato Britto 5efb210d68 fixup! refactor(model): convert core crate into model for types and interfaces 2026-04-09 16:11:22 -03:00
Renato Britto fc2d7007ac feat(docs): update README for cli rust crate instructions 2026-04-05 00:09:10 -03:00
Renato Britto a08aca3af3 feat(cli): create rust package cli for stealth cli interface 2026-04-05 00:03:49 -03:00
LORDBABUINO 1b06b64d98 Merge pull request #21 from stealth-bitcoin/docs/contributing-guide
docs: add CONTRIBUTING.md
2026-04-04 19:56:28 -03:00
LORDBABUINO 5625a8de7d docs: add CONTRIBUTING.md with PR workflow and code standards 2026-04-04 19:14:13 -03:00
LORDBABUINO cf07b94520 Merge pull request #16 from satsfy/add-rust-detector
refactor: implement vulnerability detection in Rust crate
2026-04-04 01:39:39 -03:00
Renato Britto f01faabde1 fixup! feat(engine): create engine rust package for detectors and orchestration
Shorten the TxGraph comment to describe seeding ownership from derived addresses without the removed Python-reference explanation.
2026-03-31 19:42:45 -03:00
Renato Britto 7fb428da55 fixup! refactor(bitcoincore): convert bitcoincore into gateway adapter
Trim the scan_wallet comment so it only states the Rust-side behavior: derive every descriptor address, without the extra cross-reference to the Python path.
2026-03-31 19:42:39 -03:00
Renato Britto 27087de01d fixup! refactor(model): convert core crate into model for types and interfaces
Tighten the derived_addresses doc comment to describe the field's purpose without referencing the Python implementation details.
2026-03-31 19:40:02 -03:00
Renato Britto ea6c90bf41 fixup! feat(engine): create engine rust package for detectors and orchestration
Seed TxGraph ownership state from all derived addresses, not just addresses discovered from transaction outputs. This makes is_ours() recognize every descriptor-derived address and preserves internal/change tagging separately.
2026-03-31 19:31:48 -03:00
Renato Britto 14ac5c80a1 fixup! refactor(bitcoincore): convert bitcoincore into gateway adapter
Derive addresses from all wallet descriptors, external and internal, and persist both internal_addresses and derived_addresses on WalletHistory. This aligns the Rust path with the Python reference behavior.
2026-03-31 19:31:45 -03:00
Renato Britto 3664d73c4e fixup! refactor(model): convert core crate into model for types and interfaces
Track all addresses derived from wallet descriptors in WalletHistory, not only internal/change addresses. This gives TxGraph a complete address set to compare ownership against later.
2026-03-31 19:31:39 -03:00
Renato Britto 9eb6b8ba58 refactor: remove deprecated crates/ 2026-03-30 23:12:09 -03:00
Renato Britto 7700cfcbb1 feat(docs): update README to reflect rust refactor 2026-03-30 23:12:08 -03:00
Renato Britto b8c196f8eb feat(engine): create engine rust package for detectors and orchestration 2026-03-30 23:12:07 -03:00
Renato Britto 86335e8467 refactor(bitcoincore): convert bitcoincore into gateway adapter
Removed from crates/stealth-bitcoincore and moved to bitcoincore as a
standalone package. This change is part of the refactor to create
separate packages for each component of the stealth project, allowing
for better modularity and separation of concerns.
2026-03-30 23:11:43 -03:00
Renato Britto 0931bd3272 refactor(model): convert core crate into model for types and interfaces 2026-03-30 23:11:27 -03:00
LORDBABUINO 0c511bf5bb Merge pull request #14 from satsfy/add-ci
ci: add github actions rust formater, linter, and test execution
2026-03-29 18:05:53 -03:00
LORDBABUINO 3f52c8405c Merge pull request #15 from stealth-bitcoin/feat/rust-port
feat: reimplement the analysis stack in Rust
2026-03-29 18:03:21 -03:00
Renato Britto d88fa982c8 feat(ci): create ci with rustfmt, lint and test 2026-03-25 22:12:33 -03:00
Renato Britto 40ee2466d1 feat(ci): create formatter config 2026-03-25 22:12:32 -03:00
LORDBABUINO eb04748a2a Merge pull request #8 from stealth-bitcoin/chore/readme-and-governance
docs: add governance, license, and rewrite README
2026-03-24 07:33:03 -03:00
LORDBABUINO d6e16171cf docs: add GOVERNANCE.md, LICENSE, and rewrite README for clarity
Establish maintainer-led governance, add MIT license, and restructure
README to lead with mission and roadmap for grant and contributor audiences.
2026-03-23 16:03:10 -03:00
Breno Brito 9792b231ba feat: add rust analysis workspace 2026-03-17 14:53:17 -03:00
LORDBABUINO 5205133638 chore: remove tracked pycache and add to gitignore 2026-03-06 05:46:53 -03:00
LORDBABUINO caba1d9464 docs: update README to reflect cleanup and datadir config
- Update config.ini example to show datadir setting
- Fix bitcoin-cli command to include -datadir=bitcoin-data
- Expand project structure tree to show current file layout
2026-03-06 05:46:53 -03:00
LORDBABUINO dbaaa8d5d0 Merge pull request #5 from LORDBABUINO/cleanup/remove-unused-code
Remove unused code, optimize critical path, fix datadir auth
2026-03-05 19:45:45 -03:00
LORDBABUINO fcef52adbf fix: pass datadir to bitcoin-cli so Python scripts find cookie auth
setup.sh starts bitcoind with -datadir=bitcoin-data, but bitcoin_rpc.py
was calling bitcoin-cli without it, so it looked in ~/.bitcoin for the
auth cookie and failed with "Incorrect rpcuser or rpcpassword".

Add datadir config to config.ini and resolve it in _build_base_args().
2026-03-05 14:00:56 -08:00
LORDBABUINO 8e226143dd feat: Optimize setup.sh and reproduce.py
- setup.sh: remove unused MINER_FUND_BTC variable
- setup.sh: remove signet stop section (only regtest used)
- setup.sh: remove reference to deleted verify.py in next steps
- reproduce.py: verified clean, no redundant mining or unnecessary sleeps
2026-03-05 11:30:58 -08:00
LORDBABUINO 3a11a3393e feat: Optimize frontend rendering and API calls
- Update loading screen messages to match actual backend processing steps
- Verified walletService.js, App.jsx, ReportScreen.jsx, FindingCard.jsx
  have no dead code or legacy endpoint references
2026-03-05 11:30:07 -08:00
LORDBABUINO 0e0a24bfb7 feat: Optimize detect.py performance
- Cache get_input_addresses() and get_output_addresses() results in TxGraph
  to avoid redundant parsing across 12 detector functions
- TxGraph.fetch_tx() already cached raw RPC calls; now parsed results are
  cached too, eliminating repeated iteration over vin/vout arrays
- JSON output structure remains identical (no breaking changes)
2026-03-05 11:28:53 -08:00
LORDBABUINO b700b7add8 feat: Clean up dead code within remaining files
- detect.py: remove unused imports (time, hashlib, log2)
- bitcoin_rpc.py: remove __main__ test block, unused CLI/SIGNET_ARGS vars,
  and unused functions (fund_wallet, wait_for_mempool_empty, decode_psbt,
  decode_raw_tx), remove unused time import
- VulnerabilityBadge.jsx: verified clean, no UtxoCard references
- WalletResource.java: already cleaned in prior commit
2026-03-05 11:27:26 -08:00
LORDBABUINO b466bb7721 feat: Remove unused Python test/utility scripts
- Delete verify.py (test script, not in critical path)
- Delete test_vulnerabilities.py (test script, not in critical path)
- Delete create_random_transactions.py (data generation, not in critical path)
2026-03-05 11:24:59 -08:00
LORDBABUINO eb148ea69e feat: Remove alternate-network and utility shell scripts
- Delete setup_signet.sh (signet workflow, not used in regtest)
- Delete mine_blocks.sh (utility script, not in critical path)
- Delete run_all.sh (orchestrator script, not needed)
- Delete openconf.sh (config viewer, not needed)
2026-03-05 11:24:48 -08:00
LORDBABUINO a5bbd3712e feat: Remove unused frontend files
- Delete UtxoCard.jsx and UtxoCard.module.css (never imported)
- Delete mockData.js (never imported)
2026-03-05 11:24:37 -08:00
LORDBABUINO 87dee19070 feat: Remove unused backend Java files
- Delete WalletController.java (BDK-based, entirely unused)
- Delete WalletMockData.java (mock data for legacy endpoints)
- Delete ExampleResponse.java and its tests (depended on BDK)
- Delete empty domain classes: Wallet.java, UTXO.java, BitcoinRepository.java, WalletUtils.java
- Remove legacy endpoints from WalletResource.java: POST /api/wallet/analyze, GET /api/wallet/{analysisId}/utxos
- Remove BDK, JNA, and Kotlin dependencies from pom.xml
2026-03-05 11:23:47 -08:00
LORDBABUINO 458a37c566 refactor: use local bitcoin-data dir and bcli helper in setup.sh 2026-03-05 00:13:06 -03:00