{"id":20388360,"url":"https://github.com/limechain/fruzhin","last_synced_at":"2025-08-26T19:11:38.573Z","repository":{"id":174637739,"uuid":"605590309","full_name":"LimeChain/Fruzhin","owner":"LimeChain","description":"Java implementation of the Polkadot Host","archived":false,"fork":false,"pushed_at":"2025-08-18T09:08:24.000Z","size":164745,"stargazers_count":35,"open_issues_count":41,"forks_count":1,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2025-08-18T11:20:34.627Z","etag":null,"topics":["blockchain","java","libp2p","polkadot","wasm"],"latest_commit_sha":null,"homepage":"","language":"Java","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/LimeChain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-02-23T13:37:28.000Z","updated_at":"2025-07-07T09:52:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5371d0a-b4ee-4e4b-bf00-e56e1d872920","html_url":"https://github.com/LimeChain/Fruzhin","commit_stats":null,"previous_names":["limechain/fruzhin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LimeChain/Fruzhin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2FFruzhin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2FFruzhin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2FFruzhin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2FFruzhin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LimeChain","download_url":"https://codeload.github.com/LimeChain/Fruzhin/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LimeChain%2FFruzhin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272247715,"owners_count":24899629,"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-08-26T02:00:07.904Z","response_time":60,"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":["blockchain","java","libp2p","polkadot","wasm"],"created_at":"2024-11-15T03:09:18.478Z","updated_at":"2025-08-26T19:11:38.565Z","avatar_url":"https://github.com/LimeChain.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Fruzhin-Cover-Black](https://github.com/LimeChain/Fruzhin/assets/29047760/8e617c9a-005d-44b7-b2bc-d14cc6860726)\n\nFruzhin is a Java Implementation of the Polkadot Host. The ultimate goal for Fruzhin is to be able to function as an\nauthoring and relaying node, increasing security of the Polkadot Protocol. It's been funded by\n[Polkadot Pioneers Prize](https://polkadot.polkassembly.io/child_bounty/238).\n\u003e **Warning**\n\u003e Fruzhin is in pre-production state\n\n# Status\n\n- [x] Light Client\n- [x] Full Node\n- [x] Authoring Node\n- [ ] Relaying Node\n\n# Getting started\n\n## Clone\n\n```bash\ngit clone https://github.com/LimeChain/Fruzhin.git\ncd Fruzhin\n```\n\n## Setup \u0026 Build steps\n\n### Java Version\n\nFruzhin works with Java 22.\n\nIf you have multiple java version installed please make sure you're using 22:\n\n```\nexport JAVA_HOME=`/usr/libexec/java_home -v 22`\n```\n\n### Build\n\n```bash\n./gradlew build\n```\n\n## Running Fruzhin\n\n### Sync with official chain\n\n```bash\njava -jar build/libs/Fruzhin-0.1.0.jar -n polkadot --node-mode full --sync-mode full\n```\n\n- `-n`(network) could be `westend`, `polkadot`, `kusama` or `local`\n- `--node-mode` could be `full` or `light`\n- `--sync-mode` could be `full` or `warp`\n\nOptional program arguments:\n- `-dbc` cleans database\n- `-prometheus-port` can specify custom port for running prometheus server [default: 9090]\n\nOptional environment variables:\n- When `SHORT_HASH_LOGS` is set without a value, block hashes in logs are abbreviated from full form\n`0xb94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9` to a shortened format like `0xb94...efcde9`\n- `BABE_PUB_KEY`, `BABE_SURI`, `GRAN_PUB_KEY`, `GRAN_SURI`, `BEEF_PUB_KEY`, `BEEF_SURI` are available \n(not recommended for production) for injecting keys into the keystore.\n\n### Running as a Validator\nIf you're running a Fruzhin node as a validator, you need to inject the required session keys (`babe`, `gran`, `beef`) \nso the node can actively participate in all consensuses.\n\nThere are two main ways to provide these keys:\n1. Use author_insertKey via RPC after the node is started:\n```shell\ncurl -X POST http://127.0.0.1:9922 \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"author_insertKey\",\n    \"params\": [\n        \"gran\",\n        \"\u003csuri\u003e\",\n        \"\u003cpublic-key\u003e\"\n    ]\n}'\n```\n2. Use Environment variables (Not Recommended for Production)\nYou can set the keys via environment variables before starting the node. This may be convenient for local \ntesting or quick setups.\n```shell\nexport BABE_PUB_KEY=\u003ckey\u003e\nexport BABE_SURI=\u003csuri\u003e\nexport GRAN_PUB_KEY=\u003ckey\u003e\nexport GRAN_SURI=\u003csuri\u003e\nexport BEEF_PUB_KEY=\u003ckey\u003e\nexport BEEF_SURI=\u003csuri\u003e\n```\n\n### Running Validators on Local Network\nFruzhin supports running validators on a local network using the provided chainspecs in the `genesis/zombienet` \ndirectory. There are two chainspecs available:\n\n1. **Single Validator (Alice)**: This chainspec is configured with only Alice as a validator. \nIt's designed for single-validator setups where Alice can make progress independently since it meets the 2/3 + 1 \nthreshold requirement. The bootnodes array is empty in this configuration.\n\n2. **Multiple Validators (Alice and Bob)**: This chainspec includes both Alice and Bob as validators. Before \nusing this configuration:\n   - Start another node first\n   - Make an RPC call to get the node's address:\n     ```bash\n     curl -H \"Content-Type: application/json\" -d '{\"id\":1, \"jsonrpc\":\"2.0\", \"method\": \"system_localListenAddresses\"}' http://localhost:9944\n     ```\n   - Add the returned address to the bootnodes array in the chainspec\n   - Then start Fruzhin, which will connect to the other node\n\nYou can specify which chainspec to use by configuring the `application.properties` file.\n\nThe keys for Alice and Bob in these chainspecs are generated using the `subkey` tool with the following command:\n```bash\nsubkey inspect \u003cseed\u003e --scheme (sr25519 | ed25519 | ecdsa)\n```\n\n## Get docker image\n\n```bash\n  docker image pull limechain/fruzhin\n  docker volume create rocksdb\n  ```\n\n### Run Fruzhin on docker\n```bash\n  docker run -d -v rocksdb:/usr/app/rocks-db limechain/fruzhin -n polkadot --node-mode full --sync-mode full\n```\n\n### Local development\nIn order to use the Fruzhin node for local development you will first need to start another node that would serve as a\npeer. \n\nFor the sake of this example we will use [Paritytech's implementation](https://github.com/paritytech/polkadot-sdk).\nIf you are not familiar with how to run a node see [this](https://wiki.polkadot.network/docs/maintain-sync#setup-instructions).\n\nOnce you have successfully built the Polkadot project run the node via ``polkadot --dev``.\n(The node starts on port 9944 by default)\n\nNow you have 2 options:\n- Use the automated `local_dev.sh` script\n- Manual setup.\n\n#### Automated script\n1. Install [JQ](https://github.com/jqlang/jq).\n\n   `sudo apt-get install jq` Ubuntu\n   \n   `brew install jq` MacOS\n\n2. Head to the main directory of Fruzhin execute the script `./local_dev.sh`.\n\n#### Manual setup\n1. Fetch the chain spec\n\n   ```bash\n   curl -H \"Content-Type: application/json\" -d '{\"id\":1, \"jsonrpc\":\"2.0\", \"method\": \"sync_state_genSyncSpec\", \"params\": [true]}' http://localhost:9944\n   ```\n\n   The `lightSyncState` field is important for the light client to\n   work. Without it, the light client won't have a checkpoint to start from\n   and could be long-range attacked\n\n2. Create a new `westend-local.json` inside of the `genesis` project directory.\n3. Copy the contents of the `result` field from the fetched chain spec into the newly created `westend-local.json`.\n4. In order to comply with the project requirements change the json structured as follows:\n\nFetched chain spec\n```JSON\n{\n  \"genesis\": {\n    \"raw\": {\n      \"top\": {},\n      \"childrenDefault\": {}\n    }\n  }\n}\n```\n\nDesired chain spec\n```JSON\n{\n  \"genesis\": {\n     \"top\": {},\n     \"childrenDefault\": {}\n  }\n}\n```\n\n5. Fetch the local boot nodes.\n\n   ```bash\n   curl -H \"Content-Type: application/json\" -d '{\"id\":1, \"jsonrpc\":\"2.0\", \"method\": \"system_localListenAddresses\"}' http://localhost:9944\n   ```\n\n   Paste the response into the `bootNodes` field of the `westend-local.json` chain spec.\n\n#### Build \u0026 Run\n1. Build project\n   ```\n   ./gradlew build\n   ```\n2. Run Fruzhin\n   ```\n   java -jar build/libs/Fruzhin-0.1.0.jar -n 'local' --node-mode 'full'/'light' --sync-mode 'full'/'warp' --db-recreate true/false\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimechain%2Ffruzhin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimechain%2Ffruzhin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimechain%2Ffruzhin/lists"}