refactor: remove bal-pusher-enhanced and update docs/env

- Remove src/bin/bal-pusher-enhanced.rs (synchronous pusher variant)
- Remove bal-pusher.env and bal-pusher.sh from git tracking (now in .gitignore)
- Update all documentation to remove references to bal-pusher-enhanced:
  * 01_project_overview.md
  * 02_glossary_and_bitcoin_domain.md
  * 03_architecture_and_data_flow.md
  * 04_modules_detail.md
  * 05_api_reference.md (remove rawblock ZMQ section, update references)
  * 08_security_audit.md (remove references to bal-pusher-enhanced in DoS and ZMQ sections)
  * 09_references_and_links.md
- Build verified: cargo check passes for bal-pusher and bal-server binaries
This commit is contained in:
2026-07-16 14:32:59 -04:00
parent 69d877a360
commit df8effcc60
9 changed files with 13 additions and 73 deletions

View File

@@ -107,7 +107,7 @@
---
## ZMQ Messages (consumed by `bal-pusher` and `bal-pusher-enhanced`)
## ZMQ Messages (consumed by `bal-pusher`)
### Topic: `hashblock` (Consumed by `bal-pusher`)
- **Format:** A multipart ZMQ message. The first frame is the topic name (`hashblock`), the second frame is the 32-byte block hash.
@@ -115,16 +115,9 @@
- **Action:** The pusher fetches `getblockchaininfo` from the RPC, gets the updated `mediantime`, then queries and pushes pending transactions.
- **Endpoint:** `tcp://127.0.0.1:28332` (or network-specific ports).
### Topic: `rawblock` (Consumed by `bal-pusher-enhanced`)
- **Format:** A multipart ZMQ message. The first frame is the topic name (`rawblock`), the second frame is the raw serialized block data. The first `80` bytes of this second frame are the block header, in which bytes `[68..72]` are the timestamp (little-endian `uint32_t`).
- **Trigger:** When a new Bitcoin block is found by the local node.
- **Action:** The pusher extracts the block header, reads the timestamp from it, computes the rolling median of the last 11 block timestamps, then evaluates and pushes pending transactions.
- **Endpoint:** `tcp://127.0.0.1:28332` (or network-specific ports).
- **Note:** This topic is much more bandwidth-intensive than `hashblock` because the entire block is sent over the wire.
---
## Bitcoin Core RPC Usage (used by `bal-pusher` and `bal-pusher-enhanced`)
## Bitcoin Core RPC Usage (used by `bal-pusher`)
### `sendrawtransaction` (Both pushers)
- **Method:** `sendrawtransaction` (RPC `2`)
@@ -136,7 +129,7 @@
- **Method:** `getblockchaininfo` (RPC `1`)
- **Parameters:** None.
- **Description:** Returns the current blockchain state, including the `mediantime` (the median timestamp of the last 11 blocks). This is used to evaluate the `nLockTime` of pending transactions.
- **Alternative:** `bal-pusher-enhanced` does not use this method; it derives the block timestamp directly from the `rawblock` ZMQ message to avoid an RPC round-trip and a potential RPC dependency failure.
### `getblock` (Only used by `bal-pusher` for median time)
- **Method:** `getblock` (RPC `1`)