MCPcopy Create free account
hub / github.com/SaitoTech/saito-rust

github.com/SaitoTech/saito-rust @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
548 symbols 1,765 edges 40 files 118 documented · 22% updated 3y ago★ 437 open issues

Browse by type

Functions 495 Types & classes 53
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

saito-rust

A high-performance implementation of Saito in Rust.

This project will serve as the reference implementation for other code-bases. It will also be a flexible implementation which can be easily extended to support various testnet implementations which we envision For example, we may use different epoch times or different sources of randomness for the Golden Ticket "Lottery Game" instead of sha256 difficult hashes(e.g. PoS or even 3rd party sources like BTC block hashes).

Contributing

We're happy for any contribution.
Please have a look at our contributing guidelines before you start.

Documentation

Deps

Run the node

RUST_LOG=debug cargo run

Possible log levels are Error, Warn, Info, Debug, Trace.

Tests

scripts/test.sh

or

cargo test

Code formatting

cargo fmt

Format code according to the Rust style Guide.

Code linting

cargo clippy

Clippy is a collection of lints to catch common mistakes and improve your Rust code.

Benchmarks

cargo bench

Github Actions

GH Actions are located here: .github/workflows

  • cargo docs
    Is creating and deploying the docs to GH pages

  • rustfmt (required)
    Is checking if the code is formatted according to rust style guidelines

  • cargo build & test
    Tries to build the code and run all tests

  • Convco commit format check (required)
    Check all commits or range for errors against the convention

  • Clippy code linting
    A collection of lints to catch common mistakes and improve your Rust code

VSCode

Extensions:

  • https://github.com/rust-lang/vscode-rust

Create release

cargo build --release

Further steps

Publish certain rust functionalities (as bin) as a npm package

  • https://blog.woubuc.be/post/publishing-rust-binary-on-npm
  • https://github.com/EverlastingBugstopper/binary-install

TODO

Casual list of suggestions on improvements:

[] routing hops currently contain two publickeys and one signature. we can remove "from" because it is contextually available (from the sender of the first transaction, and then the to field. We should also be able to reduce the signatures by switching to a different/commutive signature. This would magnificently remove the size of our transactions and shrink blocksize as well.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 384
Function 111
Class 42
Enum 9
Interface 2

Languages

Rust100%

Modules by API surface

src/block.rs79 symbols
src/transaction.rs56 symbols
src/wallet.rs45 symbols
src/blockchain.rs39 symbols
src/peer.rs36 symbols
src/slip.rs30 symbols
src/mempool.rs22 symbols
src/staking.rs21 symbols
src/network.rs18 symbols
src/storage.rs17 symbols
src/networking/message_types/handshake_challenge.rs17 symbols
src/blockring.rs17 symbols

For agents

$ claude mcp add saito-rust \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page