{"id":23472744,"url":"https://github.com/farcasterxyz/snapchain","last_synced_at":"2025-04-05T14:03:07.412Z","repository":{"id":269542335,"uuid":"862790626","full_name":"farcasterxyz/snapchain","owner":"farcasterxyz","description":"The open-source, canonical implementation of Farcaster's Snapchain network.","archived":false,"fork":false,"pushed_at":"2025-04-04T19:10:41.000Z","size":1900,"stargazers_count":110,"open_issues_count":29,"forks_count":34,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-04T20:23:38.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farcasterxyz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-25T07:38:47.000Z","updated_at":"2025-04-04T19:10:43.000Z","dependencies_parsed_at":"2024-12-24T10:48:38.031Z","dependency_job_id":"525a96ab-a10f-40f1-8924-bd463680cdcc","html_url":"https://github.com/farcasterxyz/snapchain","commit_stats":null,"previous_names":["farcasterxyz/snapchain"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcasterxyz%2Fsnapchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcasterxyz%2Fsnapchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcasterxyz%2Fsnapchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcasterxyz%2Fsnapchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farcasterxyz","download_url":"https://codeload.github.com/farcasterxyz/snapchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345849,"owners_count":20924102,"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","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":"2024-12-24T17:13:01.786Z","updated_at":"2025-04-05T14:03:07.397Z","avatar_url":"https://github.com/farcasterxyz.png","language":"Rust","readme":"# Snapchain\n\nThe open-source, canonical implementation of Farcaster's [Snapchain](https://github.com/farcasterxyz/protocol/discussions/207) network. \n\n![snapchain](https://github.com/user-attachments/assets/e5a041db-e3ae-4250-ad6b-7043ad648d34)\n\n\n\u003c!-- TODO:  links to installation, user docs, contributor docs --\u003e\n\n## What is Snapchain?\n\nSnapchain is a data storage layer for the Farcaster social protocol. It is a blockchain-like decentralized p2p network that stores data created by Farcaster users. Learn more about Snapchain's design from the [whitepaper](https://github.com/farcasterxyz/protocol/discussions/207).\n\nThe main goals of this implementation are:\n\n1. **High Throughput**: Written in Rust and will process at least 10,000 transactions per second. \n\n2. **Data Availability**: Can be run for \u003c $1,000/month and provide real-time access to user data. \n\n3. **Canonical Implementation**: Is the most accurate reference for how Snapchain and Farcaster should work. \n\n## Status \n\nSnapchain is in the migration phase. Please check the [release docs](https://www.notion.so/warpcast/Snapchain-Mainnet-Public-1b96a6c0c101809493cfda3998a65c7a) for more details on timelines. \n\n## Running a Node\n\nA snapchain node lets you read and write messages to the network. You will need a machine with the following system requirements to get started: \n\n- 16 GB of RAM\n- 4 CPU cores or vCPUs\n- 1TB of free storage\n- A public IP address\n- Ports 3381 - 3383 exposed on both TCP and UDP. \n\nYou can start a new node or upgrade an existing node with the following commands: \n\n```bash\nmkdir snapchain\ncd snapchain\ndocker compose down # If you have a previous version running\nwget https://raw.githubusercontent.com/farcasterxyz/snapchain/refs/heads/main/docker-compose.mainnet.yml -O docker-compose.yml\ndocker compose up  # append -d to run in the background\n```\n\nA brand new node will download historical snapshots to catchup to the latest state before it begins sync. This can take up to 2 hours. Check the node's status by running `curl http://localhost:3381/v1/info`. You should see `maxHeight` increasing and `blockDelay` decreasing until it approaches zero. \n\n## Contributing \n\nWe welcome contributions from developers of all skill levels. Please look for issues labeled with \"help wanted\" to find good tickets to work on. If you are working on something that is not explicitly a ticket, we may or may not accept it. We encourage checking with someone on the team before spending a lot of time on something. \n\nWe will ban and report accounts that appear to engage in reputating farming by using LLMs or automated tools to generate PRs. \n\n## Installation\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n- Rust (latest stable version)\n- Cargo (comes with Rust)\n- Protocol Buffers compiler (`brew install protobuf`)\n- cmake (`brew install cmake`) \n\n### Installation\n\nClone the snapchain and dependent repos and build snapchain:\n```\ngit clone git@github.com:CassOnMars/eth-signature-verifier.git\ngit clone git@github.com:informalsystems/malachite.git\ncd malachite\ngit checkout 13bca14cd209d985c3adf101a02924acde8723a5\ncd ..\ngit clone git@github.com:farcasterxyz/snapchain.git\ncd snapchain\ncargo build\n```\n\n### Testing\n\nAfter setting up your Rust toolchain above, you can run tests with:\n\n```\ncargo test\n```\n\n### Running the Application\n\nFor development, you can run multiple nodes by running:\n```\nmake dev\n```\n\nThese will be configured to communicate with each other.\n\nTo query a node, you can run `grpcurl` from within the container:\n\n```\ndocker compose exec node1 grpcurl -import-path proto -proto proto/rpc.proto list\n```\n\nIf you need fresh keypairs for your node, you can generate them with:\n\n```\ncargo run --bin generate_keys\n```\n\n### Clean up\n\nYou can remove any cached items by running:\n\n```\nmake clean\n```\n\n## Publishing\n\n1. Update `package.version` in `Cargo.toml`\n2. Commit the change.\n3. Tag the commit using `snapchain_version=$(awk -F '\"' '/^version =/ {print $2}' Cargo.toml) git tag -s -m \"$snapchain_version\" \"v$snapchain_version\"`\n4. Push the commit and tag to trigger an automated build.\n5. Once automated build is complete, confirm the Docker image was [published](https://hub.docker.com/r/farcasterxyz/snapchain)\n","funding_links":[],"categories":["\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarcasterxyz%2Fsnapchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarcasterxyz%2Fsnapchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarcasterxyz%2Fsnapchain/lists"}