1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Broadcaster traits — propagate transactions to the BSV network and peer
//! overlay nodes.
//!
//! Two traits live here:
//!
//! * [`Broadcaster`] — SHIP propagation to peer overlay nodes (existing).
//! * [`ArcBroadcaster`] — ARC network broadcast to miners (new).
//!
//! After a transaction is admitted by topic managers the Engine:
//! 1. Broadcasts to ARC (network) so the tx reaches miners.
//! 2. Propagates to SHIP peers so other overlay nodes index the tx.
//!
//! Both traits abstract HTTP transport so the engine crate stays
//! platform-agnostic. Implementations (Cloudflare Workers Fetch, reqwest,
//! etc.) live in deployment crates.
use async_trait;
use crateTaggedBEEF;
/// Broadcasts tagged BEEF transactions to peer overlay nodes.
///
/// The Engine calls `broadcast_to_host()` for each peer discovered via SHIP
/// lookup after a transaction is admitted. Implementations handle the actual
/// HTTP POST to the peer's `/submit` endpoint.
/// Broadcasts a raw transaction to the BSV network via ARC (TAAL).
///
/// The Engine calls `broadcast()` during Phase 2 for `CurrentTx` submissions
/// that do not already have a merkle proof (i.e. not yet mined). The
/// implementation POSTs the transaction to ARC's `/v1/tx` endpoint.
///
/// Broadcast failures are non-fatal — the Engine logs them and continues
/// with SHIP propagation and storage mutations.