Skip to content
toidiuPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

raft-rs

A toy implementation to better understand the Raft consensus protocol

TODO:

  • Fuzz test the protocol.
    • make timeout independent of tokio
  • sim
    • unique server id
    • faster router
    • large size cluster test
  • add len to packet header
  • queues
    • ring buffer for queues
    • queue bounds check rather than overflow
    • fragmented packets (TCP can deliver a payload over multiple packets)
  • network send should return packet

Design

sans I/O design io_queues

Fuzzing

Run the fuzzer with make fuzz. Crashes are written to __fuzz__/<target>/crashes/ and are committed so they replay on every cargo test.

Corpus dirs (__fuzz__/<target>/corpus/) are gitignored since they hold hundreds of small files that change on every run. Commit a tarball of the corpus instead. Run from the repo root so the tarball stores repo relative paths:

tar czf sim/src/fuzz/corpus.tar.gz sim/src/fuzz/__fuzz__/fuzz__raft/corpus

# restore
tar xzf sim/src/fuzz/corpus.tar.gz

Resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages