Stellar blockchain node source code
The app is minimalistic. By default, it connects to a hardcoded MAINNET stellar node, executes handshake, prints the result and ends.
To run this app:
rust nightly >= 1.71
cargo run
To understand the handshake process, refer to handshake in the root of the project.
What's not included:
- Unit tests. The code is written to be easily unit-tested because it eliminates all random dependencies.
- When the Stellar Node, not the app is the one who initializes a connection.
- Handling
Error
as well as any other messages from node. - Reading the configuration from file. The configuration constants are hardcoded as
mainnet
andlocal
, but it's easy to add your own config. - Logging.
- Timeout for waiting for messages from TCP.
- Running a tcp connection in a separate task.
- Code comments.
Upon request, it's possible to provide the details on how to run a local stellar node to actually read the logs from it or implement all the above features.