Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obd #2

Merged
merged 113 commits into from
Dec 20, 2022
Merged

Obd #2

merged 113 commits into from
Dec 20, 2022

Conversation

wxf4150
Copy link
Collaborator

@wxf4150 wxf4150 commented May 31, 2022

the master is too old with upstream lightningnetwork/lnd
the pull request will upgrade to master-branch to lnd-v0.14.2-beta(Feb 4, 2022) ,
and add more omni-asset functions from obd.

Brief:

This release bases Omni-HTLC on the lnd commit and omnicore codebases. Where in omnicore, a new transaction type 7 is introduced to transfer multiple tokens of one property id to multiple receivers in Omnicore.

This release is a sub-project of OmniBOLT, and supports exclusive mode only, adding asset-aware interfaces and commands to lnd's gRPC API and CLI set.

The newly added API and commands are maintained in the following document:
https://omnilaboratory.github.io/obd/#/grpc-api

Environment

OS: Win10, Ubuntu 20.04
golang: 1.9
gcc: 9.3(for compiling Omnicore)
network: Regtest

Notes

Currently, supported functions are:
https://omnilaboratory.github.io/obd/#/grpc-api?id=list-of-asset-related-interfaces

The table listing the interfaces also compares the BTC-only lnd interfaces:

Integrators only need to specify an asset ID and amount in related lnd interfaces, when ID=0, it is bitcoin, when ID >=1, it is an omni asset.

What can you do?

Run Omnicore on Regtest mode, and then you can:

  1. Create asset channels and fund them;
  2. Create invoices for certain assets and ask the other party to pay;
  3. Pay invoices;
  4. Close channels and withdraw funds to the main chain;

You can connect an obd node to all known lightning applications. But without customizing(minimum effort), these applications can only be aware of Bitcoin.

We also built docker images for easier drag-drop building your local OmniBolt lightning network by Polar(will release in Jun).

You MUST not:

  1. Run Omnicore on the mainnet, which will cause permanent fund loss.

wxf4150 and others added 24 commits April 20, 2022 10:12
Mark an invalid import
add mark to a possible invalide import: lnd does not have omnicore integrated.
mark a possible invalid import.
parseRequest: MUST test asset funding request, not just btc only.
unc openChannel: MUST test asset funding amount, not merely Bitcoin amount.
handle funding and funding acceptor: several place need to pay attention. For example, MUST check the asset amount(reserve) is within the Max-Min range. NOT only the bitcoin.
When the asset is bitcoin, this is the same to milli-satoshi, using 11 decimal, 
when the asset is omni-asset, this is a simple unsigned 64 int, 8 decimal when translats to string.
 check it, may error if set 1
… && go test -run TestFundingManagerNormalWorkflow -v; \n cd routing && go test -run TestFindRoutesWithFeeLimit -v;
fix a typo in comments of asset related cli
@neocarmack neocarmack linked an issue Jun 2, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

funding asset err with ob-lnd
2 participants