Git Product home page Git Product logo

rapid-gossip-sync-server's Introduction

rapid-gossip-sync-server

This is a server that connects to peers on the Lightning network and calculates compact rapid sync gossip data.

These are the components it's comprised of.

Modules

config

A config file where the Postgres credentials and Lightning peers can be adjusted. Most adjustments can be made by setting environment variables, whose usage is as follows:

Name Default Description
RAPID_GOSSIP_SYNC_SERVER_DB_HOST localhost Domain of the Postgres database
RAPID_GOSSIP_SYNC_SERVER_DB_USER alice Username to access Postgres
RAPID_GOSSIP_SYNC_SERVER_DB_PASSWORD None Password to access Postgres
RAPID_GOSSIP_SYNC_SERVER_DB_NAME ln_graph_sync Name of the database to be used for gossip storage
RAPID_GOSSIP_SYNC_SERVER_NETWORK mainnet Network to operate in. Possible values are mainnet, testnet, signet, regtest
BITCOIN_REST_DOMAIN 127.0.0.1 Domain of the bitcoind REST server
BITCOIN_REST_PORT 8332 HTTP port of the bitcoind REST server
BITCOIN_REST_PATH /rest/ Path infix to access the bitcoind REST endpoints
LN_PEERS Wallet of Satoshi Comma separated list of LN peers to use for retrieving gossip

downloader

The module responsible for initiating the scraping of the network graph from its peers.

persistence

The module responsible for persisting all the downloaded graph data to Postgres.

snapshot

The snapshotting module is responsible for calculating and storing snapshots. It's started up as soon as the first full graph sync completes, and then keeps updating the snapshots at a 24-hour-interval.

lookup

The lookup module is responsible for fetching the latest data from the network graph and Postgres, and reconciling it into an actionable delta set that the server can return in a serialized format.

It works by collecting all the channels that are currently in the network graph, and gathering announcements as well as updates for each of them. For the updates specifically, the last update seen prior to the given timestamp, the latest known updates, and, if necessary, all intermediate updates are collected.

Then, any channel that has only had an announcement but never an update is dropped. Additionally, every channel whose first update was seen after the given timestamp is collected alongside its announcement.

Finally, all channel update transitions are evaluated and collected into either a full or an incremental update.

License

Apache 2.0 or MIT, at your option.

rapid-gossip-sync-server's People

Contributors

thebluematt avatar arik-so avatar andrei-21 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.