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
//! AVM (Agave Virtual Machine) execution layer.
//!
//! mAI (🧠) - Technology Lead: Murtaza Ali Imtiaz
//!
//! Contains two sub-modules that together demonstrate the performance and
//! auditability story of the Agave runtime inside the HFT platform:
//!
//! * `benchmark` - micro-benchmark comparing AVM JIT-compiled execution against EVM bytecode-style
//! interpretation, demonstrating the ~8–12× throughput advantage of the Agave runtime.
//! * `reactor` - Reactor GUI audit-log simulation, emitting a structured before/after log of a
//! smart contract deployment so operators get a human-readable, per-trade execution trace.
//!
//! ## Public API
//!
//! | Function | Description |
//! |---|---|
//! | [`run_benchmark`] | Run 10 000-iteration AVM vs EVM benchmark |
//! | [`audit_log`] | Emit Reactor GUI audit log for a completed swap |
use Result;
use crate::;
/// Run the AVM vs EVM execution benchmark and log the speedup factor.
///
/// Delegates to [`benchmark::run`].
///
/// # Errors
///
/// Currently infallible; returns `Ok(())`. The signature uses [`Result`] for
/// forward-compatibility with real AVM instrumentation hooks.
/// Emit a Reactor GUI audit log entry for the given route and swap result.
///
/// Logs state-before, execution details, and state-after at `INFO` level so
/// the output is visible in the default tracing subscriber configuration.
///
/// Delegates to [`reactor::emit_audit_log`].
///
/// # Arguments
///
/// * `route` - The SOR-selected execution venue and price quote.
/// * `swap` - The completed swap result from the Jupiter simulation.
///
/// # Errors
///
/// Currently infallible.