-
Notifications
You must be signed in to change notification settings - Fork 132
RPC: Add Ignore Tree Endpoints #1554
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 16072230475Details
💛 - Coveralls |
asset/asset.go
Outdated
@@ -569,6 +606,10 @@ func (id PrevID) Hash() [sha256.Size]byte { | |||
return *(*[sha256.Size]byte)(h.Sum(nil)) | |||
} | |||
|
|||
// OutPoint is a type alias for an asset outpoint. It links the anchor outpoint | |||
// to the asset it secures. | |||
type OutPoint = PrevID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrevOut
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or AnchorPoint
(to be used as asset.AnchorPoint
which reads nicely IMO) to not confuse it with a purely on-chain wire.OutPoint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, did a quick first pass.
asset/asset.go
Outdated
@@ -569,6 +606,10 @@ func (id PrevID) Hash() [sha256.Size]byte { | |||
return *(*[sha256.Size]byte)(h.Sum(nil)) | |||
} | |||
|
|||
// OutPoint is a type alias for an asset outpoint. It links the anchor outpoint | |||
// to the asset it secures. | |||
type OutPoint = PrevID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or AnchorPoint
(to be used as asset.AnchorPoint
which reads nicely IMO) to not confuse it with a purely on-chain wire.OutPoint
?
661466c
to
32da29f
Compare
I've rebased on to branch |
32da29f
to
6fbc382
Compare
d7efd50
to
c2c394f
Compare
37bdcfa
to
b5a6c5e
Compare
b5a6c5e
to
c59b408
Compare
Current status
Remaining work before we can merge this PR
|
71fcd9f
to
4c23905
Compare
Add `DeriveNextKey` method to `LndRpcWalletAnchor`, enabling it to satisfy the `supplycommit.Wallet` interface.
Add context argument to `SupplyTreeView` interface methods to allow `tapdb.SupplyTreeStore` to satisfy the interface.
Introduces `DefaultCommitConfTarget`, a constant for the default confirmation target (in blocks) for a supply commitment transaction. This constant provides a sensible default for fee estimation, ensuring that the commitment transaction is confirmed in a timely manner without overpaying. Centralizing this value makes it easier to manage and adjust in the future.
The state machine that curates a supply commit transaction is specific to an asset group key. To manage multiple such state machines across asset groups at the RPC layer, introduce the MultiStateMachineManager. The manager caches separate state machines for each asset group.
Populate the SupplyCommitManager field in the config so that the rpcserver can invoke methods on the supply commitment manager.
Allows deriving a supply commit TxOut without specifying all RootCommitment fields.
Refactor newRootCommitment to ensure the commit transaction is fully defined before it is set as a field in RootCommitment.
This allows derivation of PSBT BIP32 paths for a keychain.KeyDescriptor using network-specific parameters. The new field is unread in this commit but will be used later.
chain_bridge.go now contains multiple Lightning clients: invoices, transport, and router. The new name lnd_services.go reflects this richer scope and improves discoverability.
I'm going to split this PR into smaller PRs. Here's the first: #1638 |
* Bump lnd to latest master commit. * Point lnd/sqldb to same commit for local replace compatibility. * Fix taprootassets.Server implementation to satisfy upgraded htlcswitch.AuxTrafficShaper. We bump LND here because the next commit requires access to chainntnfs.DefaultNotifierOptions and similar functionality that is currently private.
Introduce LndFsmDaemonAdapters, a struct implementing the protofsm.DaemonAdapters interface. This is passed into supplycommit.NewMultiStateMachineManager, which then propagates it to each asset group-specific state machine.
Update the FetchUnspentPrecommits SQL query to retrieve the full internal key descriptor for pre-commitment outputs. This enables BIP32 derivation when spending these outputs.
SignAndFinalizePsbt can't currently handle tapd family keys.
FetchSupplyCommit now returns the full key descriptor for the internal key. RootCommitment struct now includes the full internal key descriptor instead of just the public key. This enables specifying BIP32 derivations when spending supply commitment transactions during the creation of a new supply commitment transaction. And also specifying BIP32 derivations in PSBT outputs, and so on.
Add PSBT output with BIP32 derivation. This makes use of the full internal key descriptor that we made available in the previous commit.
When creating a supply commitment transaction, there are two types of inputs that can be spent: * Pre-commitment outputs from mint anchor transactions * Outputs from previous supply commitment transactions This commit adds support for a PSBT input to handle the latter case, allowing spending of a previous supply commitment transaction output.
Adds a method to generate a Schnorr signature over the TLV serialization of an IgnoreTuple.
Introduce a new RPC endpoint to add an asset outpoint to the asset's ignore tree. This allows asset issuers to explicitly exclude certain asset outpoints.
Refactored handleEvents by extracting the handleSubEventChan function. handleSubEventChan now accepts an event channel directly. The original handleEvents function delegates to handleSubEventChan.
This introduces a new RPC endpoint, `SubscribeSupplyCommitEvents`, allowing clients to stream event notifications from the supply commitment state machine. Subscribing to these events is beneficial for real-time monitoring, testing, and debugging of the supply commitment process. For example, it enables developers to trace the lifecycle of a commitment and diagnose issues without relying solely on logs.
4c23905
to
0ed7096
Compare
Closes #1534
Sharing early to get early feedback on naming and architecture. Still missing itests and query RPC endpoint.
This PR will not include the verifier, I will add that in a separate PR.
This PR adds RPC endpoints to populate and query from ignore trees.