{"id":26848198,"url":"https://github.com/plebhash/tower-stratum","last_synced_at":"2025-03-30T20:53:29.437Z","repository":{"id":284603907,"uuid":"906835212","full_name":"plebhash/tower-stratum","owner":"plebhash","description":"🦀 Rust tower middleware for Bitcoin mining over Stratum Reference Implementation ⛏️","archived":false,"fork":false,"pushed_at":"2025-03-26T18:09:57.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T18:40:30.823Z","etag":null,"topics":["bitcoin","mining","mining-pool","mining-pool-development","stratum","stratum-pool","stratum-protocol","stratum-proxy","tokio","tower"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plebhash.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}},"created_at":"2024-12-22T03:38:07.000Z","updated_at":"2025-03-26T18:10:00.000Z","dependencies_parsed_at":"2025-03-26T18:40:41.396Z","dependency_job_id":"5a9c79ca-1f2d-414b-b716-f3ec41a1528d","html_url":"https://github.com/plebhash/tower-stratum","commit_stats":null,"previous_names":["plebhash/tower-stratum"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebhash%2Ftower-stratum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebhash%2Ftower-stratum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebhash%2Ftower-stratum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebhash%2Ftower-stratum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plebhash","download_url":"https://codeload.github.com/plebhash/tower-stratum/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379378,"owners_count":20767696,"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":["bitcoin","mining","mining-pool","mining-pool-development","stratum","stratum-pool","stratum-protocol","stratum-proxy","tokio","tower"],"created_at":"2025-03-30T20:53:29.106Z","updated_at":"2025-03-30T20:53:29.428Z","avatar_url":"https://github.com/plebhash.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg width=\"300\" src=\"tower-stratum.png\"\u003e\n  \u003cbr\u003e\ntower-stratum\n\u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n🦀 Tower middleware for Bitcoin mining over \u003ca href=\"https://github.com/stratum-mining/stratum\"\u003eStratum V2 Reference Implementation\u003c/a\u003e ⛏️\n\u003c/p\u003e\n\nThis crate aims to provide a robust middleware API for building Bitcoin mining apps based on:\n- [Tower](https://docs.rs/tower/latest/tower/): an asynchronous middleware framework for Rust\n- [Tokio](https://tokio.rs/): an asynchronous runtime for Rust\n- [Stratum V2 Reference Implementation](https://github.com/stratum-mining/stratum): the reference implementation of the Stratum V2 protocol\n\nThe goal is to provide a \"batteries-included\" approach to implement stateful Sv2 applications.\n\nNote: currently development focus is on Stratum V2 (Sv2). While theoretically possible, Sv1 integration is not planned for the near future.\n\n# Scope\n\n`tower-stratum` provides [`tower::Service`](https://docs.rs/tower/latest/tower/trait.Service.html)s and [`tower::Layer`](https://docs.rs/tower/latest/tower/trait.Layer.html)s for building apps to be executed under `tokio` runtimes.\n\nThey can be divided in two categories:\n- Client-side (`Sv2ClientService`)\n- Server-side (`Sv2ServerService`)\n\nThe user is expected to implement handlers for the different Sv2 subprotocols, and use simple high-level APIs to compose Sv2 applications that are able to exchange Sv2 messages and behave according to the handler.\n\n## Client-side\n\n`Sv2ClientService\u003cM, J, T\u003e` is a `tower::Service` representing a Sv2 Client.\n\nIt's able to establish a TCP connection with the Server and exchange `SetupConnection` messages to negotiate the Sv2 Connection parameters according to the user configurations.\n\nIt can listen for messages from the server and trigger `Service` `Request`s from them.\n\nThe user is expected to set the different generic parameters `\u003cM, J, T\u003e` with implementations for the handler traits of the different subprotocols:\n- `trait Sv2MiningClientHandler` (example app: Sv2 CPU miner, Sv2 Proxy)\n- `trait Sv2JobDeclarationClientHandler` (example app: Sv2 Job Declarator Client)\n- `trait Sv2TemplateDistributionClientHandler` (example apps: Sv2 Pool, Sv2 Job Declarator Client, Sv2 Solo Mining Server)\n\nFor the subprotocols that are not supported, `Null*` implementations are provided.\n\n## Server-side\n\n`Sv2ServerService\u003cM, J, T\u003e` is a `tower::Service` representing a Sv2 Server.\n\nIt's able to listen for TCP connections and exchange `SetupConnection` messages to negotiate the Sv2 Connection parameters according to the user configurations.\n\nIt can listen for messages from the server and trigger `Service` `Request`s from them.\n\nInactive clients have their connections killed and are removed from memory after some predefined time.\n\nThe user is expected to set the different generic parameters `\u003cM, J, T\u003e` with implementations for the handler traits of the different subprotocols:\n- `Sv2MiningServerHandler` (example app: Sv2 Proxy, Sv2 Pool, Sv2 Solo Mining Server)\n- `Sv2JobDeclarationServerHandler` (example app: Sv2 Job Declarator Server)\n- `Sv2TemplateDistributionServerHandler` (example app: Sv2 Template Provider)\n\nFor the subprotocols that are not supported, `Null*` implementations are provided.\n\n# Licence\n\n[`MIT`](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebhash%2Ftower-stratum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplebhash%2Ftower-stratum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebhash%2Ftower-stratum/lists"}