102 Commits

Author SHA1 Message Date
ncantu
c31d3a4f0c Fix too-long-mempool-chain error in anchor API
**Motivations:**
- API d'ancrage retournait une erreur "too-long-mempool-chain, too many unconfirmed ancestors [limit: 25]"
- Les transactions d'ancrage ne pouvaient pas être envoyées au mempool

**Root causes:**
- L'API utilisait des UTXOs non confirmés (confirmations = 0) pour créer les transactions
- Lorsqu'un UTXO provient d'une transaction non confirmée avec des ancêtres, Bitcoin Core limite la chaîne à 25 transactions
- L'appel listunspent utilisait params: [0], récupérant tous les UTXOs y compris non confirmés
- Aucun filtre n'excluait les UTXOs non confirmés

**Correctifs:**
- Changement de listunspent params: [0] à params: [1] pour ne récupérer que les UTXOs confirmés
- Ajout d'un filtre supplémentaire pour exclure les UTXOs avec confirmations = 0
- Amélioration des logs pour indiquer le nombre d'UTXOs non confirmés filtrés
- Ajout d'une gestion d'erreur spécifique pour "too-long-mempool-chain" avec code HTTP 503

**Evolutions:**
- Documentation de la correction dans fixKnowledge/api-anchorage-too-long-mempool-chain.md

**Pages affectées:**
- api-anchorage/src/bitcoin-rpc.js: Filtrage des UTXOs non confirmés, changement minconf de 0 à 1
- api-anchorage/src/routes/anchor.js: Gestion d'erreur spécifique pour too-long-mempool-chain
- fixKnowledge/api-anchorage-too-long-mempool-chain.md: Documentation (nouveau)
2026-01-25 23:19:09 +01:00
ncantu
26a53327a4 Enhance: Complete dashboard documentation and new services integration
**Motivations:**
- Complete documentation for dashboard, domains, ports and environment configuration
- Add new services (ClamAV API, Watermark API) to the infrastructure
- Enhance dashboard with new pages and improved functionality
- Improve deployment scripts and service configurations

**Root causes:**
- Missing comprehensive documentation for infrastructure setup
- Need for antivirus scanning service integration
- Need for watermark service integration
- Dashboard required additional pages and features

**Correctifs:**
- Added comprehensive documentation in docs/ (DASHBOARD.md, DOMAINS_AND_PORTS.md, ENVIRONMENT.md)
- Updated systemd service files with proper environment variables
- Enhanced nginx proxy configuration script
- Updated maintenance documentation

**Evolutions:**
- Added new ClamAV API service (api-clamav) for file scanning
- Added new Watermark API service (api-filigrane) for document watermarking
- Enhanced signet-dashboard with new learn.html page
- Improved dashboard UI with better styles and navigation
- Enhanced app.js with new functionality and better error handling
- Updated API documentation page with complete endpoint descriptions
- Added deployment scripts for watermark and nginx configuration
- Updated hash and UTXO lists with latest data
- Enhanced server.js with new routes and improved Bitcoin RPC integration

**Pages affectées:**
- docs/DASHBOARD.md: New comprehensive dashboard documentation
- docs/DOMAINS_AND_PORTS.md: New infrastructure domains and ports documentation
- docs/ENVIRONMENT.md: New environment variables documentation
- docs/MAINTENANCE.md: Updated maintenance procedures
- docs/README.md: Updated main documentation
- signet-dashboard/public/app.js: Enhanced with new features
- signet-dashboard/public/styles.css: Improved styling
- signet-dashboard/public/index.html: Enhanced main page
- signet-dashboard/public/learn.html: New educational page
- signet-dashboard/public/api-docs.html: Enhanced API documentation
- signet-dashboard/public/hash-list.html: Updated hash list page
- signet-dashboard/public/utxo-list.html: Updated UTXO list page
- signet-dashboard/public/join-signet.html: Updated join signet page
- signet-dashboard/src/server.js: Enhanced server with new routes
- signet-dashboard/start.sh: Updated startup script
- signet-dashboard/signet-dashboard.service: Updated systemd service
- api-anchorage/anchorage-api.service: Updated systemd service
- api-faucet/faucet-api.service: Updated systemd service
- configure-nginx-proxy.sh: Enhanced nginx configuration script
- add-watermark-certificate.sh: New watermark certificate script
- deploy-watermark-nginx.sh: New deployment script
- api-clamav/: New ClamAV API service
- api-filigrane/: New Watermark API service
- hash_list.txt, utxo_list.txt: Updated with latest data
- anchor_count.txt: Updated anchor count
2026-01-25 17:43:05 +01:00
ncantu
970b06ee8f Fix: Automatic UTXO provisioning on each Bitcoin anchor transaction
**Motivations:**
- Fix insufficient UTXO amount error in anchor API
- Ensure continuous availability of usable UTXOs for anchor transactions
- Improve anchor transaction reliability and efficiency

**Root causes:**
- UTXO selection logic was too restrictive, rejecting UTXOs larger than needed
- No automatic provisioning of new usable UTXOs when existing ones were not suitable
- Algorithm prevented efficient use of available UTXOs

**Correctifs:**
- Refactored createAnchorTransaction() to provision 7 UTXOs of 2500 sats on each anchor
- Use single large UTXO to create 1 anchor output + 7 provisioning outputs + change
- Simplified UTXO selection: single large UTXO per transaction instead of multiple small ones
- Added UTXO provisioning logic in signet-dashboard
- Enhanced Bitcoin RPC methods in both api-anchorage and signet-dashboard
- Added documentation in fixKnowledge/api-anchorage-utxo-provisioning.md

**Evolutions:**
- Enhanced signet-dashboard with new pages (hash-list, utxo-list, join-signet, api-docs)
- Improved Bitcoin RPC client with better error handling and UTXO management
- Added cache files for hash and UTXO lists
- Updated api-faucet with improved server configuration
- Enhanced anchor count tracking

**Pages affectées:**
- api-anchorage/src/bitcoin-rpc.js: Complete refactor of createAnchorTransaction()
- api-anchorage/src/routes/anchor.js: Enhanced anchor route
- api-anchorage/src/server.js: Server configuration updates
- signet-dashboard/src/bitcoin-rpc.js: Added comprehensive Bitcoin RPC client
- signet-dashboard/src/server.js: Enhanced server with new routes
- signet-dashboard/public/: Added new HTML pages and updated app.js
- api-faucet/src/server.js: Server improvements
- api-faucet/README.md: Documentation updates
- fixKnowledge/api-anchorage-utxo-provisioning.md: New documentation
- anchor_count.txt, hash_list.txt, utxo_list.txt: Tracking files
2026-01-25 14:25:49 +01:00
ncantu
b3973ddc41 Add transaction statistics endpoints and systemd services
**Motivations:**
- Add transaction statistics endpoints (avg-fee, avg-amount) for dashboard display
- Fix difficulty parsing issue when Bitcoin RPC returns string instead of number
- Add systemd service files for proper service management
- Update dashboard UI to display transaction statistics

**Root causes:**
- Bitcoin RPC can return difficulty as string, causing type issues
- Missing API endpoints for transaction statistics in dashboard

**Correctifs:**
- Fix difficulty parsing to handle both string and number types
- Add proper type conversion for blockchainInfo.difficulty

**Evolutions:**
- Add /api/transactions/avg-fee endpoint returning fixed 1200 sats fee
- Add /api/transactions/avg-amount endpoint returning fixed 1000 sats amount
- Add systemd service files for api-faucet and signet-dashboard
- Enhance dashboard UI with transaction statistics display
- Update anchor_count.txt

**Pages affectées:**
- signet-dashboard/src/server.js
- signet-dashboard/public/app.js
- signet-dashboard/public/index.html
- signet-dashboard/signet-dashboard.service
- api-faucet/faucet-api.service
- anchor_count.txt
2026-01-25 03:55:26 +01:00
ncantu
21438530a1 Update anchor count, API anchorage, mempool submodule and signet dashboard
**Motivations:**
- Update anchor count tracking
- Improve API anchorage Bitcoin RPC handling
- Update mempool submodule
- Enhance signet dashboard functionality and UI

**Root causes:**
- N/A (evolutions and updates)

**Correctifs:**
- N/A

**Evolutions:**
- Updated anchor count tracking
- Enhanced Bitcoin RPC handling in API anchorage
- Updated mempool submodule to latest version
- Added new features and improvements to signet dashboard (app.js, server.js)
- Enhanced signet dashboard UI (index.html, styles.css)

**Pages affectées:**
- anchor_count.txt
- api-anchorage/src/bitcoin-rpc.js
- api-anchorage/src/bitcoin-rpc.js.backup
- mempool (submodule)
- signet-dashboard/public/app.js
- signet-dashboard/public/index.html
- signet-dashboard/public/styles.css
- signet-dashboard/src/server.js
2026-01-25 02:37:58 +01:00
ncantu
e34b6ee43a Fix UTXO selection and race condition in anchorage API
**Motivations:**
- Resolve insufficient UTXO amount errors when wallet has many small UTXOs
- Prevent race conditions when multiple anchor requests arrive simultaneously
- Improve signet dashboard functionality and documentation

**Root causes:**
- API tried to find a single UTXO large enough instead of combining multiple UTXOs
- No mutex mechanism to prevent concurrent transactions from using the same UTXOs
- UTXOs in mempool still appear as available in listunspent before block confirmation

**Correctifs:**
- Implement coin selection algorithm to combine multiple UTXOs when needed
- Add mutex-based locking mechanism to serialize UTXO access
- Filter locked UTXOs during selection to prevent double spending
- Properly handle change output when combining multiple UTXOs
- Lock UTXOs during transaction creation and unlock after mempool broadcast

**Evolutions:**
- Enhance signet dashboard with improved Bitcoin RPC integration
- Update mempool documentation
- Add comprehensive fix documentation in fixKnowledge/

**Pages affectées:**
- api-anchorage/src/bitcoin-rpc.js
- signet-dashboard/src/bitcoin-rpc.js
- signet-dashboard/src/server.js
- signet-dashboard/public/app.js
- signet-dashboard/public/index.html
- signet-dashboard/public/styles.css
- signet-dashboard/start.sh
- docs/MEMPOOL.md
- fixKnowledge/api-anchorage-insufficient-utxo.md (new)
- fixKnowledge/api-anchorage-utxo-race-condition.md (new)
- anchor_count.txt (new)
- mempool (submodule update)
2026-01-25 01:21:18 +01:00
ncantu
dde1ccbb07 fix: Improve .env loading and add backup/startup scripts
**Motivations:**
- Fix 401 error on anchorage API due to .env not being loaded correctly
- Fix 502 error on dashboard due to service not running
- Add backup script for mining keys and wallet descriptors
- Improve service management with startup scripts and systemd services

**Root causes:**
- dotenv.config() was called without explicit path, causing .env to be loaded from wrong directory
- Services were not started automatically, causing 502 errors
- No backup mechanism for critical keys and wallet data

**Correctifs:**
- Improved .env loading in api-anchorage/src/server.js with explicit path
- Improved .env loading in signet-dashboard/src/server.js with explicit path
- Added backups/ directory to .gitignore to prevent committing sensitive data
- Created export-backup.sh script for backing up mining keys and wallet descriptors

**Evolutions:**
- Added api-anchorage/start.sh script for proper service startup
- Added api-anchorage/anchorage-api.service systemd service file
- Added fixKnowledge/api-anchorage-401-error.md documentation
- Added fixKnowledge/dashboard-502-error.md documentation
- Updated mempool submodule

**Pages affectées:**
- .gitignore (added backups/)
- api-anchorage/src/server.js (improved .env loading)
- api-anchorage/start.sh (new)
- api-anchorage/anchorage-api.service (new)
- signet-dashboard/src/server.js (improved .env loading)
- export-backup.sh (new)
- fixKnowledge/api-anchorage-401-error.md (new)
- fixKnowledge/dashboard-502-error.md (new)
- mempool (submodule updated)
2026-01-24 03:17:48 +01:00
ncantu
bcb1aa5f2f docs: Update documentation and API server
**Motivations:**
- Update documentation with latest information
- Remove redundant deployment documentation
- Add mempool documentation
- Improve API server implementation

**Root causes:**
- Documentation needed updates to reflect current state
- DEPLOYMENT.md was redundant with other documentation
- Missing documentation for mempool integration
- API server required improvements

**Correctifs:**
- Removed api-anchorage/DEPLOYMENT.md (redundant)
- Updated api-anchorage/src/server.js with improvements
- Updated documentation files (INTERFACES.md, MAINTENANCE.md, README.md)

**Evolutions:**
- Added docs/MEMPOOL.md for mempool documentation
- Updated mempool submodule

**Pages affectées:**
- api-anchorage/DEPLOYMENT.md (deleted)
- api-anchorage/src/server.js
- docs/INTERFACES.md
- docs/MAINTENANCE.md
- docs/MEMPOOL.md (new)
- docs/README.md
- mempool (submodule updated)
2026-01-24 03:08:21 +01:00
ncantu
20d115a31c feat: Add APIs, dashboard, documentation and improve scripts
**Motivations:**
- Add API services for anchorage and faucet functionality
- Add dashboard interface for signet monitoring
- Improve documentation and maintenance guides
- Enhance existing scripts for better functionality

**Root causes:**
- Need for API services to interact with Bitcoin Signet
- Need for user-friendly dashboard interface
- Need for comprehensive documentation
- Scripts required improvements for better reliability

**Correctifs:**
- Updated Dockerfile with better configuration
- Improved gen-bitcoind-conf.sh and gen-signet-keys.sh scripts
- Enhanced mine.sh, miner, run.sh, and setup-signet.sh scripts
- Updated env.example with new configuration options

**Evolutions:**
- Added api-anchorage service with anchor functionality
- Added api-faucet service for testnet coin distribution
- Added signet-dashboard for monitoring and management
- Added comprehensive documentation in docs/ directory
- Added configure-nginx-proxy.sh for proxy configuration
- Added update-signet.sh for signet updates
- Added ETAT_SYSTEME.md and START_DASHBOARD_AND_FAUCET.md guides
- Added .bitcoin-version file for version tracking

**Pages affectées:**
- Dockerfile
- env.example
- gen-bitcoind-conf.sh
- gen-signet-keys.sh
- mine.sh
- miner
- run.sh
- setup-signet.sh
- api-anchorage/ (new)
- api-faucet/ (new)
- signet-dashboard/ (new)
- docs/ (new)
- configure-nginx-proxy.sh (new)
- update-signet.sh (new)
- ETAT_SYSTEME.md (new)
- START_DASHBOARD_AND_FAUCET.md (new)
- .bitcoin-version (new)
- .env (modified)
- mempool/ (added)
2026-01-24 02:40:25 +01:00
Elyan
9f304317d6 bug:fix port errors 2024-05-09 05:46:58 -07:00
Elyan
41677c6759 update 2024-05-09 04:12:18 -07:00
Elyan
7f3e85ee7e update:iclude port to conf 2024-05-09 02:29:31 -07:00
Elyan
68a3a494ad chore:add values to env 2024-05-08 05:33:05 -07:00
Elyan
30672bbf38 Merge branch 'main' of https://github.com/Easepay/easepay-custom-signet-script 2024-03-05 13:03:41 -08:00
Elyan
59e896c297 update signet script 2024-03-05 13:03:16 -08:00
Geo ⚡️
7c1064242f
Update README.md 2024-02-25 14:55:02 +01:00
Geo ⚡️
123d475228
Update README.md 2024-02-24 12:21:43 +01:00
Elyan
0c2c0e9fa5 Docs: Update Readme 2024-02-24 03:16:45 -08:00
Elyan
1aae13f3c0 update dockerfile 2024-02-23 10:38:31 -08:00
Elyan
94006c0590 Feat:implement quick blocks for signet mining 2024-02-23 02:06:12 -08:00
Elyan
df4c4bcdbd update file 2024-02-23 00:52:04 -08:00
Elyan
485186933b update file structure 2024-02-22 13:43:23 -08:00
Elyan
038afb6203 Modified python parts to fix bug 2024-02-22 09:39:58 -08:00
Elyan
3ce3a474a9 Update:Add test scripts 2024-02-22 08:14:33 -08:00
Elyan
f1828412cf Remove:bitcoin.conf 2024-02-22 05:13:33 -08:00
Elyan
3f056ce757 Update dockerfile 2024-02-22 04:50:46 -08:00
Elyan
dbc4e523ab Add:gen-bitcoin.conf script 2024-02-22 03:48:32 -08:00
Elyan
17d0d032d7 Add:install.sh script 2024-02-22 03:45:17 -08:00
Elyan
a9375653f1 Add:mine-genesis.sh script 2024-02-22 03:28:09 -08:00
Elyan
4a4f579070 Feat:reworked script 2024-02-22 03:23:42 -08:00
Elyan
2d5f75e6a0 reworked docker to use lncm images 2024-02-21 10:34:40 -08:00
Elyan
c20a8643b3 Merge branch 'main' of https://github.com/Easepay/easepay-custom-signet-script 2024-02-20 05:31:24 -08:00
Elyan
ef21fbc465 chore: update dockerfile 2024-02-20 05:31:06 -08:00
Elyan
8fda01b586 Feat:create a new script to generate signet challenge 2024-02-20 01:20:07 -08:00
Geo ⚡️
cdf6dba46a
Update README.md 2024-02-19 14:31:14 +01:00
Geo ⚡️
c2191504de
Update README.md 2024-02-18 18:12:08 +01:00
Elyan
18333d9140 Add bashrc file as an alais for interactive shell 2024-02-18 04:01:52 -08:00
Elyan
80680e5556 include logtail to view bitcoind logs 2024-02-18 03:34:43 -08:00
Elyan
c7bf7962bb update bitcoin.conf 2024-02-18 02:50:31 -08:00
Elyan
438f3be826 Merge branch 'main' of https://github.com/Easepay/easepay-custom-signet-script 2024-02-17 10:09:16 -08:00
Elyan
b34a7640f5 update nbits value 2024-02-17 10:07:35 -08:00
Elyan
5ee451fabd clean up script 2024-02-17 09:58:31 -08:00
Elyan
5687b6d7c1 update script with advanced block generation 2024-02-17 09:51:21 -08:00
Elyan
84310628eb update time to match consensus rules 2024-02-17 09:08:05 -08:00
Elyan
8278cef19d update generate.py to miner.py for v26 2024-02-17 08:58:48 -08:00
Geo ⚡️
1c3465e23f
Update README.md 2024-02-16 21:01:04 +01:00
Geo ⚡️
4a792770b2
Update README.md 2024-02-16 20:59:36 +01:00
Geo ⚡️
df5e55e78f
Update README.md 2024-02-16 20:58:03 +01:00
Elyan
c8e6dab4bc Added custom Signet setup & update Readme.md 2024-02-16 11:53:08 -08:00
Elyan
68e812aac5 feat:Create a script for Easepay custom signet network 2024-02-16 10:57:25 -08:00