{"id":30126485,"url":"https://github.com/iotaledger/starfish","last_synced_at":"2026-02-25T17:11:04.988Z","repository":{"id":285420602,"uuid":"874045010","full_name":"iotaledger/starfish","owner":"iotaledger","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-24T08:57:40.000Z","size":1656,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-24T10:38:19.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotaledger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-17T06:53:17.000Z","updated_at":"2025-09-24T08:57:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bceff30-de37-41a2-bd59-3e449caed553","html_url":"https://github.com/iotaledger/starfish","commit_stats":null,"previous_names":["iotaledger/starfish"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iotaledger/starfish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fstarfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fstarfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fstarfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fstarfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotaledger","download_url":"https://codeload.github.com/iotaledger/starfish/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotaledger%2Fstarfish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278197352,"owners_count":25946541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T16:50:25.057Z","updated_at":"2026-02-25T17:11:04.981Z","avatar_url":"https://github.com/iotaledger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starfish\n\n[![rustc](https://img.shields.io/badge/rustc-1.78+-blue?style=flat-square\u0026logo=rust)](https://www.rust-lang.org)\n[![license](https://img.shields.io/badge/license-Apache-blue.svg?style=flat-square)](LICENSE)\n\n## Overview\n\nThe code in this repository is a prototype of Starfish,\na partially synchronous BFT protocol in which validators employ an uncertified DAG.\nThe theoretical description of Starfish is available\nat https://eprint.iacr.org/2025/567.\n\nThree versions of Starfish are available in this repository:\n\n- **`starfish`**: Theory-aligned version\n  - Higher bandwidth usage (up to 4x)\n  - Better latency guarantees with Byzantine nodes under low load\n\n- **`starfish-pull`**: More scalable version\n  - Lower bandwidth usage in happy case\n  - Better handling of higher throughput and larger number of validators\n\n- **`starfish-s`**: Strong-vote optimistic variant\n  - Uses strong votes for optimistic transaction sequencing\n  - Lower latency when validators hold full leader payloads\n\nThe repository also supports other partially synchronous uncertified DAG-based consensus protocols:\n\n- **`mysticeti`**: Implementation of [Mysticeti](https://www.cs.cornell.edu/~babel/papers/mysticeti.pdf).\nValidators use a bandwidth efficient pull-based block dissemination strategy:\nthey push their own blocks and request the peers about missing ancestors only. A scalable BFT protocol.\n- **`cordial-miners`**: Implementation of [Cordial Miners](https://arxiv.org/pdf/2205.09174).\nValidators use a push-based block dissemination strategy,\npushing all unknown history of blocks to their peers.\nDue to the push strategy, Cordial Miners can tolerate Byzantine attacks,\nbut it is overall a less scalable solution.\n\n## Key Features of Starfish\n\n- Starfish is a Byzantine Fault Tolerant protocol capable of tolerating up to 1/3 of Byzantine nodes in a partially synchronous network.\n- It uses push-based dissemination strategy that incorporates Reed-Solomon coding for the transaction data to amortize communication costs\n- It provides a linear amortized communication complexity for a large enough transaction load\n- It achieves high throughput (~200-300K tx/sec for 10-100 validators) and subsecond end-to-end latency for up to 150K tx/sec\n\n## Byzantine strategies\n\nThe testbed implements several Byzantine behaviors to evaluate consensus robustness.\nThe number of Byzantine nodes can be set using `--num-byzantine-nodes`\nand has to be less than 1/3 of the total number of validators.\nThe Byzantine strategies include:\n\n- `timeout-leader`: Byzantine validators time out when elected as leader to slow down consensus\n- `leader-withholding`: Byzantine leaders withhold block proposals and send it to only a few other validators to delay the commit rule\n- `chain-bomb`: Attackers attempt to disrupt the network by flooding some validators with their generated chains of blocks\n- `equivocating-two-chains`: Byzantine validators create two equivocating blocks\nand disseminate them to half of network, not allowing to directly skip their proposals\n- `equivocating-chains`: Malicious validators create equivocating blocks and disseminate them to the respected validators\n- `equivocating-chains-bomb`: Byzantine validator create chains of equivocating blocks\nand send the chain just before the respected validator is elected as a leader.\nRecommend to use 1 Byzantine validator as they are not coordinated\n- `random-drop`: Byzantine validators randomly drop outgoing messages with probability `1/n` where `n` is the committee size\n\n## Implementation Details\n\nStarfish is implemented in Rust, building upon the [Mysticeti testbed](https://github.com/asonnino/mysticeti/tree/paper). The implementation includes:\n\n- **Networking**: [tokio](https://tokio.rs) for asynchronous programming with direct TCP socket communication (no RPC frameworks)\n- **Cryptography**:\n  - [ed25519-consensus](https://docs.rs/ed25519-consensus/) for digital signatures\n  - [blake3](https://docs.rs/blake3/) for high-performance cryptographic hashing\n- **Data Handling**:\n  - [bincode](https://docs.rs/bincode/) for efficient serialization of protocol messages\n  - [RocksDB](https://rocksdb.org/) for persistent storage of consensus data (replacing Mysticeti's WAL storage)\n- **Transaction Encoding**: [Reed-Solomon-SIMD](https://crates.io/crates/reed-solomon-simd) implementing:\n  - Erasure codes over field `F_{2^16}`\n  - Fast-Fourier transform-based decoding\n  - SIMD instruction optimization for larger shards\n\nLike other consensus testbed, our prototype focuses solely on consensus performance measurement without execution or ledger storage components.\n\n## Requirements\n\n### Dependencies\n\nStarfish requires the following core dependencies:\n\n- **Rust 1.78+**: For building and running the project\n- **Build essentials**: `build-essential`, `libssl-dev`, `pkg-config`\n- **Clang tools**: `clang`, `libclang-dev` (for compiling RocksDB and other native dependencies)\n\n### Mac\n\n```bash\n# Install Rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# Install dependencies via Homebrew\nbrew install \\\n    curl \\\n    openssl \\\n    pkg-config \\\n    llvm\n```\n\n### Ubuntu\n\n```bash\n# Install Rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# Update package index\nsudo apt-get update\n\n# Install essential dependencies\nsudo apt-get install -y \\\n    build-essential \\\n    curl \\\n    libssl-dev \\\n    pkg-config \\\n    clang \\\n    libclang-dev\n```\n\nFor more advanced usage scenarios (distributed testing, metrics visualization, etc.), additional tools may be required.\n\n## Quick Start\n\n```bash\n# Clone and build\ngit clone https://github.com/iotaledger/starfish.git\ncd ./starfish\ncargo build --release\n```\n\n### Run local benchmark and output the basic metrics\n\n```bash\ncargo run --release --bin starfish -- local-benchmark \\\n        --committee-size 7 \\\n        --load 10000 \\\n        --consensus starfish \\\n        --num-byzantine-nodes 0 \\\n        --byzantine-strategy chain-bomb \\\n        --mimic-extra-latency \\\n        --duration-secs 100\n```\n\n### Local dryrun with monitoring\n\nThe dryrun script launches a Docker-based local testbed with Prometheus and Grafana:\n\n```bash\n./scripts/dryrun.sh\n```\n\nConfiguration via environment variables:\n\n```bash\nNUM_VALIDATORS=10 DESIRED_TPS=100 CONSENSUS=starfish-s \\\n  NUM_BYZANTINE_NODES=2 BYZANTINE_STRATEGY=random-drop \\\n  TEST_TIME=300 ./scripts/dryrun.sh\n```\n\n| Variable | Default | Description |\n|---|---|---|\n| `NUM_VALIDATORS` | 10 | Number of validators (recommend \u003c physical cores, max 128) |\n| `DESIRED_TPS` | 100 | Target transactions per second |\n| `CONSENSUS` | starfish | Protocol: `starfish`, `starfish-s`, `starfish-pull`, `cordial-miners`, `mysticeti` |\n| `NUM_BYZANTINE_NODES` | 2 | Must be \u003c `NUM_VALIDATORS / 3` |\n| `BYZANTINE_STRATEGY` | random-drop | See [Byzantine strategies](#byzantine-strategies) |\n| `TEST_TIME` | 300 | Duration in seconds |\n| `UNIFORM_LATENCY_MS` | _(unset)_ | Uniform network latency in ms; overrides AWS RTT table |\n| `CLEAN_MONITORING` | 0 | Set to 1 to wipe Prometheus/Grafana data between runs |\n| `REMOVE_VOLUMES` | 1 | Set to 0 to preserve RocksDB volumes between runs |\n\nGrafana is available at `http://localhost:3000` (admin/admin). Ctrl+C stops validators but preserves the monitoring stack.\n\n### Docker\n\nBuild locally:\n\n```bash\ndocker build -t starfish .\n```\n\nOr pull the latest image from GHCR:\n\n```bash\ndocker pull ghcr.io/iotaledger/starfish:latest\n```\n\nRun a local benchmark via Docker:\n\n```bash\ndocker run --rm starfish local-benchmark \\\n    --committee-size 7 --load 10000 --consensus starfish \\\n    --duration-secs 60\n```\n\nPre-built Linux binaries are published as\n[nightly releases](https://github.com/iotaledger/starfish/releases/tag/nightly)\n(extracted from the Docker image).\n\n### Distributed Testing using Orchestrator\n\nTo run tests on a geo-distributed network, look at instructions in [crates/orchestrator/readme.md](./crates/orchestrator/readme.md).\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotaledger%2Fstarfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotaledger%2Fstarfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotaledger%2Fstarfish/lists"}