Running with live data
Step 1: preparing the Monad node
Before running, make sure the execution daemon is running and that execution events are enabled. in particular, make sure you have passed the command line argument--exec-event-ring to the execution daemon
Step 2: run the example program
In the snapshot example, we passed the name of the snapshot file to the program as a command line argument. In both the C and Rust example programs, if we do not pass any filename at all, it will use default filename used by the execution daemon, connecting us to the live event stream.-
For C, run
eventwatchwith no arguments -
For Rust, run the command
cargo run -- -d
Next steps
This completes the getting started guide! If you’re interested in developing your own real-time data processing software with the SDK, where should you go from here? Here is a recommended list of resources, in roughly the order that will be most helpful in developing real applications:- If you haven’t already, read the overview and the source code for the example program you just ran
- Once you understand the basic ideas in the example, the rest of the SDK documentation should be easy to follow
- Before using the SDK, make sure you understand the consensus events and what they mean
-
Try out a more sophisticated program and look at the source code for it
-
For Rust, try the “Block Explorer” TUI example in the upstream
monadrepository. You can run it withcargo run -p monad-exec-events --example explorerand then browse the source code inexplorer.rs -
For C, look at the code for the
monad-event-cliprogram in the upstreammonadrepository; this program is the “tcpdump” of the execution event system, and shows several different uses of the API. You may also want to read the next section about compiling this program
-
For Rust, try the “Block Explorer” TUI example in the upstream
Optional: build the monad-event-cli tool
monad-event-cli is a useful utility for working with the event system. Like
the Rust eventwatch example, it can decode execution event payloads into
human-readable form. It does several other tasks which are useful in the
developer workflow, e.g., recording captures of events and creating snapshot
event ring files for test cases.
To build monad-event-cli, you will also need the
CLI11
C++ command-line parser library and the OpenSSL development files. Although it
is optional, you should also install the development files for
GNU multiple-precision library
so that uint256 values print in decimal form.
The instructions also use the
ninja
build tool. You can install everything on Ubuntu with:
release/exec-events-sdk-v1.1, then build the CMake
project rooted at category/event.
Using clang-19 with libc++ and the above options:
The
-march=x86-64-v4 is needed to enable certain atomic operations at the
CPU instruction level, to avoid needing to link with libatomic.a; without this,
a performance warning is emitted, which becomes a compilation error due to
-Werrorclang19-libcxx.cmake with these contents:

