{"id":21336819,"url":"https://github.com/dan-da/brb_node_snfs","last_synced_at":"2025-07-12T12:32:53.101Z","repository":{"id":72068092,"uuid":"339889816","full_name":"dan-da/brb_node_snfs","owner":"dan-da","description":"sn_fs implemented as a brb node for securely syncing data in p2p fashion.","archived":false,"fork":false,"pushed_at":"2023-12-20T21:02:13.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-16T22:29:22.828Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan-da.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-BSD","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":"2021-02-18T00:11:54.000Z","updated_at":"2024-04-16T22:29:22.828Z","dependencies_parsed_at":"2023-12-20T21:50:09.140Z","dependency_job_id":null,"html_url":"https://github.com/dan-da/brb_node_snfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fbrb_node_snfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fbrb_node_snfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fbrb_node_snfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Fbrb_node_snfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan-da","download_url":"https://codeload.github.com/dan-da/brb_node_snfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820222,"owners_count":17529139,"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-11-21T23:55:29.560Z","updated_at":"2024-11-21T23:55:30.177Z","avatar_url":"https://github.com/dan-da.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brb_node_snfs\n\n[MaidSafe website](http://maidsafe.net) | [Safe Network Forum](https://safenetforum.org/)\n:-------------------------------------: | :---------------------------------------------:\n\n## About\n\nThis crate is an attempt to build an async P2P distributed filesystem.  This is work-in-progress research and nowhere near ready for any real use.\n\nKey components are:\n* [sn_fs](https://github.com/maidsafe/sn_fs/) - Safe Network filesystem library\n* [brb](https://github.com/maidsafe/brb/) - Byzantine reliable broadcast\n* [qp2p](https://github.com/maidsafe/qp2p/) - Quic protocol P2P library\n\n## Building\n\nOn ubuntu:\n\n```\n$ sudo apt install build-essential\n$ sudo apt install libfuse-dev\n$ sudo apt install pkg-config\n$ cargo build\n```\n\n## Running\n\nA node can be started in genesis (host) mode or client mode.\n\nA genesis node will trust itself and establish a new BRB voting group with itself as the only peer.\n\nA client node accepts the IP of a peer, trusts the peer, and requests to join its voting group.  The peer then sponsors the new client and proposes to the voting group that it be added to the group.  If all goes well, the proposal will be approved, and the client joins the group as a voting peer.\n\nAlso, an empty directory must be created to serve as a filesystem mount point.  We use `/tmp/safe` here.\n\nTo start a genesis node, behind NAT, with local IP 192.168.0.250 and public IP 207.45.36.125:\n\n```\n$ mkdir /tmp/safe\n$ brb_node_snfs --local-ip 192.168.0.250 --local-port 12000 --external-ip 207.45.36.125 --external-port 12000 /tmp/safe``\n```\n\nNote that if local IP matches the public IP then --external-ip and --external-port can be omitted.\n\nPort can be any number, but make sure your firewall is not blocking incoming UDP packets.\n\nTo start a client node, behind NAT, with local IP 192.168.0.251 and public IP 207.45.36.126 and connecting to (genesis) peer 207.45.36.125.\n\n```\n$ mkdir /tmp/safe\n$ brb_node_snfs --local-ip 192.168.0.251 --local-port 12000 --external-ip 207.45.36.126\n --external-port 12000 /tmp/safe 207.45.36.125:12000\n```\n\nIf all goes well, in a few seconds the client will connect to the host and exchange BRB messages.  After a few seconds, you should be able to issue the `peers` command on either side, and see that there are 2 peers, and both are considered voting members.  Eg:\n\n```\n\u003e peers\ni:541914@168.235.79.83:12000 (voting)\ni:64c372@18.116.32.207:12000 (voting) (self)\n```\n\nUse the `help` command for a list of other available commands.\n\nAt this point, you can create a file in /tmp/safe and verify that it appears on both nodes.  Also directories, symlinks, etc.  Just use regular filesystem commands, eg:\n\n```\n$ echo \"Mr. Watson come here, I want you\" \u003e /tmp/safe/bell.txt\n```\n\nJust be aware that all writes are being stored in memory (including history) and transferred (kinda slowly) over the network, so don't get too carried away.\n\nAn interesting test is to modify a file at the same time on both ends in different ways and verify that the conflict resolves in the same way on both sides.\n\nWhen finished, use `fusermount -u /tmp/safe` to unmount the filesystem and CTRL-C or kill to end the process.\n\n## License\n\nThis Safe Network software is dual-licensed under the Modified BSD (\u003cLICENSE-BSD\u003e \u003chttps://opensource.org/licenses/BSD-3-Clause\u003e) or the MIT license (\u003cLICENSE-MIT\u003e \u003chttps://opensource.org/licenses/MIT\u003e) at your option.\n\n## Contributing\n\nWant to contribute? Great :tada:\n\nThere are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!\n\nFor instructions on how to contribute, see our [Guide to contributing](https://github.com/maidsafe/QA/blob/master/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Fbrb_node_snfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-da%2Fbrb_node_snfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Fbrb_node_snfs/lists"}