{"id":13629830,"url":"https://github.com/filecoin-project/cpp-filecoin","last_synced_at":"2025-04-17T09:36:48.641Z","repository":{"id":36747412,"uuid":"212043613","full_name":"filecoin-project/cpp-filecoin","owner":"filecoin-project","description":"C++17 implementation of Filecoin","archived":false,"fork":false,"pushed_at":"2023-06-19T11:56:14.000Z","size":15147,"stargazers_count":126,"open_issues_count":46,"forks_count":36,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-08T20:46:29.826Z","etag":null,"topics":["cpp","cpp17","filecoin","filecoin-protocol"],"latest_commit_sha":null,"homepage":"https://filecoin.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filecoin-project.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}},"created_at":"2019-10-01T08:08:40.000Z","updated_at":"2024-07-20T18:07:14.000Z","dependencies_parsed_at":"2024-01-14T06:56:28.670Z","dependency_job_id":null,"html_url":"https://github.com/filecoin-project/cpp-filecoin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"Warchant/cmake-hunter-seed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filecoin-project%2Fcpp-filecoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filecoin-project%2Fcpp-filecoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filecoin-project%2Fcpp-filecoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filecoin-project%2Fcpp-filecoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filecoin-project","download_url":"https://codeload.github.com/filecoin-project/cpp-filecoin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249331996,"owners_count":21252674,"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":["cpp","cpp17","filecoin","filecoin-protocol"],"created_at":"2024-08-01T22:01:20.998Z","updated_at":"2025-04-17T09:36:43.632Z","avatar_url":"https://github.com/filecoin-project.png","language":"C++","readme":"# Filecoin (cpp-filecoin)\n\n\u003e C++17 implementation of blockchain based digital storage\n\nFilecoin is a decentralized protocol described in [spec](https://filecoin-project.github.io/specs/)\n\n## Minimal hardware requirements\n### Node minimal parameters:\n**Hard disk space**: at least 200 GB  \n**RAM**: 8 GB  \n**OS**: Linux(Ubuntu), macOS. Other operating systems builds are not supported yet, so running on them may be unstable.  \n### Miner minimal parameters:\n**CPU**: 8+ cores  \n**Hard Disk space**: 256 GiB of very fast NVMe SSD memory space + 1 TiB of slow HDD memory space  \n**RAM**: 16 GB  \n**GPU**: GPU is highly recommended, it will speed up computations, but Mixing AMD CPUs and Nvidia GPUs should be avoided.\n\nYou can also read about lotus minimal requirements in [filecoin-docs](https://docs.filecoin.io/mine/hardware-requirements/#specific-operation-requirements \"Minimal requirements filecoin-specific-configuration\")\n## Dependencies\n\nAll C++ dependencies are managed using [Hunter](https://github.com/cpp-pm/hunter).\nIt uses cmake to download required libraries and do not require downloading and installing packages manually.\n\nTarget C++ compilers are:\n* GCC 9.3.0\n* Clang 9.0.1\n* AppleClang 12.0.0\n\n### Lotus CLI\n`fuhon-node` supports subset of `lotus` CLI commands.  \nYou may download [pre-built binaries](https://github.com/filecoin-project/lotus/releases) or build [lotus](https://github.com/filecoin-project/lotus) from source.  \nLotus CLI [introduction](https://docs.filecoin.io/get-started/lotus/installation/#interact-with-the-daemon).\n\n### Rust\n[filecoin-ffi](https://github.com/filecoin-project/filecoin-ffi) provides pre-built binaries for some platforms.  \nIf they are unavailable, you need Rust compiler to build them.  \nRust [installation instruction](https://www.rust-lang.org/tools/install).\n\n## Build\n```sh\n# clone project\ngit clone --recursive https://github.com/filecoin-project/cpp-filecoin\n# configure cmake\ncmake cpp-filecoin -B cpp-filecoin/build\n# build and install fuhon-node and fuhon-miner\ncmake --build cpp-filecoin/build --target install\n# check that fuhon-node and fuhon-miner are now available\nfuhon-node --help\nfuhon-miner --help\n```\n\n## Usage\n\n### Interopnet node\n\nCreate the following `fuhon-interopnet/config.cfg` file\n```properties\n# use interopnet profile, corresponds to \"make interopnet\" lotus target\nprofile=interopnet\n\n# enable debug logs to see sync progress\nlog=d\n\n# bootstrap peers from https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/interopnet.pi\nbootstrap=/dns4/bootstrap-0.interop.fildev.network/tcp/1347/p2p/12D3KooWLGPq9JL1xwL6gHok7HSNxtK1Q5kyfg4Hk69ifRPghn4i\nbootstrap=/dns4/bootstrap-1.interop.fildev.network/tcp/1347/p2p/12D3KooWFYS1f31zafv8mqqYu8U3hEqYvaZ6avWzYU3BmZdpyH3h\n```\n\nStart node\n```sh\nfuhon-node --repo fuhon-interopnet --genesis docker/interopnet/genesis.car\n# you can omit --genesis flag after first run\nfuhon-node --repo fuhon-interopnet\n```\n\nTo use lotus CLI add `--repo` flag\n```sh\nlotus --repo fuhon-interopnet net peers\n```\n\n### Mainnet node (from snapshot)\n\nDownload mainnet snapshot ([docs](https://docs.filecoin.io/get-started/lotus/chain)).\n```sh\nLATEST_SNAPSHOT=$(curl -sI https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car | perl -ne '/x-amz-website-redirect-location:\\s(.+\\.car)/ \u0026\u0026 print $1')\ncurl -o mainnet-snapshot.car $LATEST_SNAPSHOT\n```\n\nCreate following `fuhon-mainnet/config.cfg` file\n```properties\n# use downloaded snapshot file (do not delete that file)\nuse-snapshot=mainnet-snapshot.car\n\n# bootstrap peers from https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/mainnet.pi\nbootstrap=/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt\n```\n\nStart node (first run may take some time)\n```sh\nfuhon-node --repo fuhon-mainnet --genesis cpp-filecoin/core/docker/mainnet/genesis.car\n```\n\n### Docker-compose example\n\n```sh\ndocker-compose up\n```\n\n## CodeStyle\n\nWe follow [CppCoreGuidelines](https://github.com/isocpp/CppCoreGuidelines).\n\nPlease use clang-format 11.0.0 with provided [.clang-format](.clang-format) file to autoformat the code.\n\n## Maintenance\n\nMaintainers: @zuiris, @turuslan, @Elestrias, @ortyomka, @wer1st, @Alexey-N-Chernyshov\n\nTickets: Can be opened in GitHub Issues.\n\n## Hunter cache upload\n\nIf you have access and want to upload to [hunter-binary-cache](https://github.com/soramitsu/hunter-binary-cache), you need to add your GitHub token with `read:packages` and `write:packages` permissions.  \nTo generate GitHub token follow the [instructions](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).\n```sh\nexport GITHUB_HUNTER_USERNAME=\u003cgithub account name\u003e\nexport GITHUB_HUNTER_TOKEN=\u003cgithub token\u003e\n```\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilecoin-project%2Fcpp-filecoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilecoin-project%2Fcpp-filecoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilecoin-project%2Fcpp-filecoin/lists"}