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

[WIP] Taproot Asset Loopouts #857

Draft
wants to merge 137 commits into
base: asset_loops
Choose a base branch
from

Conversation

sputn1ck
Copy link
Member

This PR adds taproot assets loop outs.

For now can mostly be ignored, as it is very WIP

bhandras and others added 29 commits December 12, 2024 17:52
loop: do not error out on context done in the executor
This commit adds a new notification to the proto, which is used by the
server to request signatures for a deposit of a static loop in.
…rpc-commits

StaticAddr: separate swapserverrpc commits
We remove the static address client and add its
rpcs into the SwapClient
bhandras and others added 26 commits February 5, 2025 18:28
…_modules/looprpc/golang.org/x/net-0.33.0

build(deps): bump golang.org/x/net from 0.27.0 to 0.33.0 in /looprpc
Mixed batches approach covers the case where all the inputs are cooperative
(function publishBatchCoop) and it is better than fully non-cooperative case
(function publishBatch), but it can also create such transaction if needed, i.e.
if all the sweeps are non-cooperative. So we can remove functions publishBatch,
publishBatchCoop, option WithMixedBatch and associated code in greedy batch
selection algorithm.
sweepbatcher: always enabled mixed batches
…set_chans

autoloop: ignore asset channels
…sy-wait

notifications: do not hog the CPU if there's no L402 token yet
github: update cache version from deprecated v1 to v4
…t-params

staticaddr: fix withdraw backwards compat
It should use the c variable passed into the lambda, not the parent t.
It should use assert, not require package.
Previously, if a completed batch was visited after a batch to which the
sweep was added, it was not deleted because the function returned early.

This has been separated into two loops: the first one removes completed batches,
and the second one adds the sweep to a batch.
This is needed to fix crashes in unit tests under -race.
Several structures were accessed without protection causing crashes under -race.
The code inside require.Eventually runs in parallel with the event loops
of the batcher and its batches. Accessing fields of the batcher and batches
must be done within an event loop.

To address this, testRunInEventLoop methods were added to the Batcher and batch
types. Unit tests were then rewritten to use this approach when accessing
batcher and batch fields.

Additionally, in many cases, receive operations from RegisterSpendChannel
were moved before require.Eventually. This prevents testRunInEventLoop from
getting stuck in an event loop while blocked on a RegisterSpendChannel send
operation.
Try to catch more race conditions in unit tests.
sweepbatcher: fix race conditions in unit tests
@sputn1ck sputn1ck force-pushed the tapas_loopout branch 2 times, most recently from 5797027 to 00fbd82 Compare March 7, 2025 18:41
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.

5 participants