{"id":13823299,"url":"https://github.com/lightninglabs/neutrino","last_synced_at":"2025-05-13T19:03:15.644Z","repository":{"id":21531063,"uuid":"91413880","full_name":"lightninglabs/neutrino","owner":"lightninglabs","description":"Privacy-Preserving Bitcoin Light Client","archived":false,"fork":false,"pushed_at":"2025-05-08T22:06:31.000Z","size":1767,"stargazers_count":946,"open_issues_count":36,"forks_count":199,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-05-08T23:20:34.464Z","etag":null,"topics":["bitcoin","cryptocurrency","distributed-systems","lightning-network","mobile","peer-to-peer"],"latest_commit_sha":null,"homepage":"","language":"Go","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/lightninglabs.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":"2017-05-16T04:27:16.000Z","updated_at":"2025-05-08T22:06:36.000Z","dependencies_parsed_at":"2024-04-25T11:48:16.271Z","dependency_job_id":"fb181900-18b0-4312-8313-c64b2bdebfff","html_url":"https://github.com/lightninglabs/neutrino","commit_stats":{"total_commits":661,"total_committers":29,"mean_commits":22.79310344827586,"dds":0.6384266263237519,"last_synced_commit":"1ea6f5238577ada9bc0952b9915ae22a8f1cc4ce"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fneutrino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fneutrino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fneutrino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fneutrino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightninglabs","download_url":"https://codeload.github.com/lightninglabs/neutrino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010793,"owners_count":21998993,"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","cryptocurrency","distributed-systems","lightning-network","mobile","peer-to-peer"],"created_at":"2024-08-04T09:00:28.361Z","updated_at":"2025-05-13T19:03:15.622Z","avatar_url":"https://github.com/lightninglabs.png","language":"Go","funding_links":[],"categories":["Go","Privacy Preserving Light Client Designs"],"sub_categories":["Using other cryptographic primitives"],"readme":"# Neutrino: Privacy-Preserving Bitcoin Light Client\n\n[![Build Status](https://github.com/lightninglabs/neutrino/actions/workflows/main.yml/badge.svg)](https://github.com/lightninglabs/neutrino/actions/workflows/main.yml)\n[![Godoc](https://godoc.org/github.com/lightninglabs/neutrino?status.svg)](https://godoc.org/github.com/lightninglabs/neutrino)\n[![Coverage Status](https://coveralls.io/repos/github/lightninglabs/neutrino/badge.svg?branch=master)](https://coveralls.io/github/lightninglabs/neutrino?branch=master)\n\nNeutrino is a Bitcoin light client written in Go and designed with mobile\nLightning Network clients in mind. It uses a\n[new proposal](https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-June/014474.html)\nfor compact block filters to minimize bandwidth and storage use on the client\nside, while attempting to preserve privacy and minimize processor load on full\nnodes serving light clients.\n\n## Mechanism of operation\nThe light client synchronizes only block headers and a chain of compact block\nfilter headers specifying the correct filters for each block. Filters are loaded\nlazily and stored in the database upon request; blocks are loaded lazily and not\nsaved.\n\n## Usage\nThe client is instantiated as an object using `NewChainService` and then\nstarted. Upon start, the client sets up its database and other relevant files\nand connects to the p2p network. At this point, it becomes possible to query the\nclient.\n\n### Queries\nThere are various types of queries supported by the client. There are many ways\nto access the database, for example, to get block headers by height and hash; in\naddition, it's possible to get a full block from the network using\n`GetBlockFromNetwork` by hash. However, the most useful methods are specifically\ntailored to scan the blockchain for data relevant to a wallet or a smart\ncontract platform such as a [Lightning Network node like \n`lnd`](https://github.com/lightningnetwork/lnd). These are described below.\n\n#### Rescan\n`Rescan` allows a wallet to scan a chain for specific TXIDs, outputs, and\naddresses. A start and end block may be specified along with other options. If\nno end block is specified, the rescan continues until stopped. If no start block\nis specified, the rescan begins with the latest known block. While a rescan\nruns, it notifies the client of each connected and disconnected block; the\nnotifications follow the\n[btcjson](https://github.com/btcsuite/btcd/blob/master/btcjson/chainsvrwsntfns.go)\nformat with the option to use any of the relevant notifications. It's important\nto note that \"recvtx\" and \"redeemingtx\" notifications are only sent when a\ntransaction is confirmed, not when it enters the mempool; the client does not\ncurrently support accepting 0-confirmation transactions.\n\n#### GetUtxo\n`GetUtxo` allows a wallet or smart contract platform to check that a UTXO exists\non the blockchain and has not been spent. It is **highly recommended** to\nspecify a start block; otherwise, in the event that the UTXO doesn't exist on\nthe blockchain, the client will download all the filters back to block 1\nsearching for it. The client scans from the tip of the chain backwards, stopping\nwhen it finds the UTXO having been either spent or created; if it finds neither,\nit keeps scanning backwards until it hits the specified start block or, if a\nstart block isn't specified, the first block in the blockchain. It returns a\n`SpendReport` containing either a `TxOut` including the `PkScript` required to\nspend the output, or containing information about the spending transaction,\nspending input, and block height in which the spending transaction was seen.\n\n### Stopping the client\nCalling `Stop` on the `ChainService` client allows the user to stop the client;\nthe method doesn't return until the `ChainService` is cleanly shut down.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightninglabs%2Fneutrino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightninglabs%2Fneutrino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightninglabs%2Fneutrino/lists"}