omnilaboratory / obd

OmniBOLT daemon, a golang implementation of OmniBOLT spec, the smart assets lightning network.
MIT License
216 stars 21 forks source link
bitcoin blockchain-technology lightning-network omnilayer usdt

OmniBOLT Daemon | Smart Asset Lightning Network

OmniBOLT-banner

OBD implements the OmniBOLT specification, and it is an open source, off-chain decentralized platform, build upon BTC/OmniLayer network, implements basic multi hop HTLC payment, multi-currency atomic swap, and more off-chain contracts on the network of smart assets lightning channels.

None Custodial OmniBOLT Daemon

To know how obd works, jump to the OmniBOLT - Architecture.

The latest features and ETA is here: OmniBOLT - Features and Roadmap.

Quick Start on Regtest:

Users can get quickly started with graphic or command line tools:

Polar

The graphic terminal is provided by Polar, and is customized for obd: Polar - GUI Terminal Customized.

Polar helps Lightning Network application developers quickly build networks locally on their computers. Here is a short video demo: https://twitter.com/omni_bolt/status/1549709303921410048?s=20&t=-M9Y4L0Bw_VialiSVPgqmA

Docker

Docker helps people to quickly interact with obd and omnicore via command line tools. OBD uses docker-compose to package obd, omnicored, and btcd together to make deploying these daemons easily. Please check the docker-compose.yml config file for all the configurations under:

https://github.com/omnilaboratory/lnd/tree/obd/docker/obtest

We compiled and deployed images for your testing:

Now we can:

Mint tokens

Using omnicore to issue tokens with fixed amount or manageable supply:

For example, use omni_sendissuancefixed to issue 1000000 Quantum Miner tokens on the Bitcoin mainchain:

$ omnicore-cli "omni_sendissuancefixed" \
    "3Ck2kEGLJtZw9ENj2tameMCtS3HB7uRar3" 2 1 0 "Companies" "Bitcoin Mining" \
    "Quantum Miner" "" "" "1000000"

Please visit https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md to learn how to use omnicore to manage tokens on-chain.

Build obd network, and Lightning pay tokens

test-shell-template.md instructs how to start with command line tool to interact with obd, including:

The testing asset id is --asset_id = 2147483651.

To issue assets on the Bitcoin/Omnilayer mainnet, you should deploy an omnicore full node and execute the cli to mint. For non-developers, we recommend you to visit the official https://www.omniwallet.org/ (https://github.com/OmniLayer/omniwallet) for easier and quicker managing your assets.

Backend and Faucet(Regtest, Testnet)

The omnicore proxy offers the backend public anonymous omni/bitcoin services for obd nodes.
It is specified in the parameter omnicoreproxy.rpchost when an OBD node starts. For example, as in the docker/lnd/start-a.sh, docker/obtest/docker-compose.yml, the regnet.oblnd.top:18332 is where the proxy deployed:

command: >-
      lnd-debug --noseedbackup --trickledelay=5000 --alias=alice
      --externalip=alice --tlsextradomain=alice --tlsextradomain=alice
      --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --restlisten=0.0.0.0:8080
      --bitcoin.active --bitcoin.regtest --bitcoin.node=omnicoreproxy
      --omnicoreproxy.rpchost=regnet.oblnd.top:18332 
      --omnicoreproxy.zmqpubrawblock=tcp://regnet.oblnd.top:28332
      --omnicoreproxy.zmqpubrawtx=tcp://regnet.oblnd.top:28333

The proxy decouples the lightning node and the full Bitcoin/Omnilayer node, to lower the barriers of OBD deployment, especially for mobile nodes.

The complete white-listed services are: https://github.com/omnilaboratory/omnicore-proxy/blob/master/whitelist_proxy/whitelist_proxy.go.

OBD supports three networks: regtest, testnet and mainnet; Each network supports three backends: bitcoind, omnicore proxy, and neutrino. For a neutrino backend, an omnicore proxy must be specified.

The network is specified by param: --bitcoin.xxxxxx:  

#regtest 
--bitcoin.regtest
#testnet 
--bitcoin.testnet
#mainnet 
--bitcoin.mainnet

The backend is specified by: --bitcoin.node=[bitcoind|omnicoreproxy|neutrino|]:
(Currently, we only support these 3 modes, each has different connection type and certification method.)

Depolyed Backends

On each network, not all 3 backends are deployed. We currently maintain the following backends for the community:

Liquidity nodes

Liquidity nodes offer token/BTC inbound/outbound liquidity to users' nodes, especially for OBWallet mobile nodes.

Community

Discord: http://discord.gg/2QYqzSMZuy
Slack: https://join.slack.com/t/omnibolt/shared_invite/zt-ad732myf-1G7lXpHPkFH_yRcilwT4Ig

Video Tutorials

Video tutorials can be found here:

Mainnet warning

OBD is still in an early stage, and sendToMany in omnicore is still under development. We do not recommend running it on mainnet with real money just yet, which may lead to loss of funds unless you want to take a reckless adventure.

Security

If you discover a vulnerability, weakness, or threat that can potentially compromise the security of obd, we ask you to keep it confidential and submit your concern directly to the team.