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 #6597

Closed
wants to merge 164 commits into from
Closed

Obd #6597

wants to merge 164 commits into from

Conversation

wxf4150
Copy link

@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 some obd omni-asset function .

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)

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.

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. 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.

guggero and others added 30 commits January 25, 2022 16:56
We use a GitHub Action for sending the coverage to coveralls.io and
don't need the goveralls binary anymore.
Instead of hard coding a commit to use for a binary tool that we use
during the build process, we now only use "go install" to install the
binaries and the golang builtin versioning system to pin the exact
version/commit we want to use in go.mod.
when payment_hash or final_cltv_delta and payment_request was set, the error message showed that the parameters shouldn't be set with dest instead of payment_request

[skip ci]
Since bbolt returns references to internally stored data when storing
locally it's best to copy the byte slices returned or alternatively
convert them to string (which also makes a copy) to avoid crashes casued
by memory corruption.
This commit exposes the ChanStatusFlags inside waitingCloseResp such
that the channel close type is exposed.
This change avoids enforcing new reserved value when PSBT funding is not
finished yet as new inputs and outputs may still be added that could
change the outcome of the check.

This originally failed in the scenario when funding a channel from
external wallet *and depositing to on-chain wallet* was done
simultaneously in a single transaction. If such transaction confirms
then reserved UTXO is guaranteed to be available but the check didn't
take it into account.

The enforcement still occurs in the final step of PSBT funding flow, so
it is safe. It also occurs in case of non-PSBT funding.
This adds an integration test that makes sure channel can be funded from
empty wallet using PSBT if the funding transaction contains an output
belonging to the wallet, satisfying the reserve.
The minimum relay fee is always ensured to be above our fee floor except
in the very first min relay fee query to bitcoind. This commit ensures
that the fee floor is respected in this first query.
In this commit, we switch to always sending a channel type when we're in
explicit mode. This is compatible with prior versions of lnd as they
won't send a channel type, and we'll just arrive at the same type via
the existing implicit funding.

Fixes lightningnetwork#6067
Roasbeef and others added 26 commits February 3, 2022 12:19
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
@bhandras
Copy link
Collaborator

Wrong repo?

@yyforyongyu
Copy link
Member

Closed as it's irrelevant. Looks like you've created the PR in the wrong repo.

@wxf4150
Copy link
Author

wxf4150 commented May 31, 2022

sorry! error resp

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.