Skip to content

[feature]: use future/promise design for interaction with lnd #1893

@jtobin

Description

@jtobin

lightningnetwork/lnd#10400 presents a problematic lnd / tapd interaction that can occur when the two are running in integrated mode (summary):

When running LND with Taproot Assets Aux units, currently we call into the tapd software and we do not timeout the calls to the daemon, instead there is a possibility that some goroutines on the LND site hang up, and it is only now visible via other side effects we do not see immediately what the problem is

talked with @ffranr and we should implement the fix on both sides:

  1. We implement the Future<=>Promise design from lightningnetwork/lnd@9bd73c6
  2. Ask for a specific behaviour of the Aux Unit which then resturns a future
  3. This future as a context we can cancel if we timeout and it just takes too long

That way we don't have to do some retry logic, we ask for the AuxUnit to do a specific thing, it gives us the result and the timeout if it takes too long.

On tapd's end, this basically requires doing what lnd wants us to do. Per @ffranr:

I think the other thing that's worth adding is a "not ready" error defined in LND. Tapd could return that rather than wait for the timeout and then LND could decide to re-try based on that error.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions