Commit graph

136 commits

Author SHA1 Message Date
Elle Mouton
6dd03c0edc
multi: update lnd, aperture and lndclient deps
This includes upgrading the logging framework to the V2 framework. This
new framework lets us deprecate the `maxlogfiles` and
`maxlogfilesize` config options.
2025-03-05 12:31:15 +02:00
Oliver Gugger
85f81be29a
multi: bump lnd compile time dependency to v0.18.4-beta 2024-10-14 16:41:48 +02:00
Oliver Gugger
352b8da4b3
account: split mocks
This commit prepares for a change in lndclient, where each sub server
client needs to implement a specific method.
Because of that requirement we cannot have a single mock that implements
two of those methods and we need to split the wallet and signer mocks
apart.
2024-10-14 16:33:44 +02:00
Oliver Gugger
d78921b6ff
multi: switch gomock to go.uber.org 2024-05-31 10:39:24 +02:00
Oliver Gugger
36e4629078
multi: bump lnd to v0.18.0-beta 2024-05-31 10:39:23 +02:00
Andras Banki-Horvath
948dbca84e
multi: bump aperture and rename L402 to LSAT where possible 2024-05-23 14:07:48 +02:00
Oliver Gugger
4002d0979d
order+account: use new MuSig2 v1.0.0-rc2 account version 2023-03-08 17:42:06 +01:00
Oliver Gugger
fbab2b25a4
poolscript: add new MuSig2 v1.0.0-rc2 account version 2023-03-08 17:42:06 +01:00
Oliver Gugger
1b1d0b69e0
multi: add new account version 2023-03-08 17:42:06 +01:00
Oliver Gugger
41fd69fa80
account: fix nits 2023-03-08 17:42:06 +01:00
Oliver Gugger
30c7ef6531
multi: bump lnd+lndclient compile time dependency
This commit bumps the compile time dependency of lnd and lndclient to
the 0.16.x branch. This makes the code forward compatible but does not
yet change anything with respect to the minimum required version the
user needs to run.
2023-03-08 17:42:04 +01:00
Oliver Gugger
34af866ce9
multi: fix linter issues 2023-02-23 11:26:42 +01:00
Robyn
cd632058b0
account: expose historical account modification fees via RPC
This commit adds a new RPC endpoint which returns a per-account list of account modification fees.
2022-11-15 12:54:28 +00:00
ffranr
2679396615
account: transaction labels code cleanup 2022-11-07 12:53:11 +00:00
Robyn
d76f0f1111
account: improve account on-chain transaction labels
This commit reformulates transaction labels as JSON strings. The JSON contains the following fields:

* An `action` field which takes one of the following values: create, deposit, withdraw, renew, or close.

* `key` which is the account key.

* `expiry_height` which is an integer block height at which the account expires. This value is important to ease the process of account recovery.

* `output_index` which is an integer denoting the account balance transaction output.

* `expiry_spend` which is a boolean denoting whether the transaction spends via the expiry output path.

* `tx_fee` which is the onchain transaction fee for executing the account action.

* `balance_diff` which is a signed integer denoting the difference (+/-) in the account balance as a result of the transaction.

The poold specific transaction label prefix tag is also modified such that its prefixes spaces are removed.
2022-11-03 21:17:45 +00:00
positiveblue
d30a0b213c
multi: update lnd and lndclient v0.15.1-beta 2022-10-18 04:34:20 -07:00
positiveblue
037671287e
account/manager: fix np2wkh deposits
The `.UnsignedTx` of a psbt does not include the related
SignatureScripts. Because SignatureScripts are not part of the signed
data, the partial signature for a psbt that does not include them is a
valid signature. However, the `TxHash` will change between a tx that has
SignatureScripts set and one that does not.

This behaviour led the auctioneer and the client to record the wrong
outpoint when using np2wkh.
2022-09-12 17:20:12 +02:00
Oliver Gugger
312e206dac
multi: implement taproot accounts 2022-09-12 17:20:11 +02:00
Oliver Gugger
355e0577f8
account: refactor account manager tests 2022-09-12 17:20:11 +02:00
Oliver Gugger
bec62efa71
account: refactor away spend package
With this commit we streamline the signing code somewhat to make it
easier to understand. With the new flow the spendPkg struct is no longer
needed as we directly pass back the (partially) signed TX.
2022-09-12 17:20:11 +02:00
Oliver Gugger
b6013e34e6
account: use spend witness type everywhere 2022-09-12 17:20:11 +02:00
Oliver Gugger
a63985d614
multi: add account version to RPCs and manager 2022-09-12 17:20:10 +02:00
Oliver Gugger
69d3ad6d44
poolscript+account+log: add new Taproot scripts 2022-09-12 17:20:10 +02:00
Oliver Gugger
7bc48a7a7d
account+clientdb: add version to account 2022-09-12 17:20:10 +02:00
Oliver Gugger
986d889b74
multi: fix linter issues 2022-08-03 20:33:06 +02:00
Oliver Gugger
fd3676f056
account: assert min lnd version for np2wkh 2022-06-30 16:18:32 +02:00
Oliver Gugger
232578a7ac
account+poolscript: assert minimum relay fee 2022-06-30 16:18:32 +02:00
Oliver Gugger
685a13daf1
account: refactor expiry witness path 2022-06-30 15:39:48 +02:00
Oliver Gugger
74d2ae48b2
account: use PSBT for account signing 2022-06-30 15:39:44 +02:00
Oliver Gugger
7571464968
multi: add chain params and lnd version to account manager 2022-06-30 13:46:59 +02:00
Oliver Gugger
56eb099eb2
multi: bump to latest lnd and lndclient versions 2022-06-17 14:50:58 +02:00
Oliver Gugger
1ba717c741
account+rpcserver: bump account key index on recovery
Fixes #372.
This commit fixes the issue that if the lnd node the trader client is
connected to was also restored from seed, it is starting at account key
derivation index 0. So when recovering accounts we need to make sure we
re-derive the right number of keys from the wallet in order to allow
properly creating new accounts with the recovered node.
2022-06-15 13:23:31 +02:00
Oliver Gugger
3508d7b9a4
multi: bump to latest lndclient and lnd versions 2022-06-01 16:16:57 +02:00
positiveblue
573f86dc83
mod: update lndclient to use new SignOutputRaw 2022-04-04 11:35:20 +02:00
positiveblue
6027ccd3d6
multi: bump btcec/v2 and btcutil to new versions 2022-03-28 15:22:41 +02:00
Oliver Gugger
d962f6624a
account: fix log message 2022-01-28 12:24:36 +01:00
positiveblue
18b9efdff6
account: add tests for account recovery 2022-01-27 23:37:29 -08:00
positiveblue
ac0a554d7d
account: implement client side recovery process 2022-01-27 23:37:24 -08:00
positiveblue
baf2042a0b
account: client side recovery skeleton 2022-01-27 23:01:37 -08:00
positiveblue
7f849b3248
account/recovery: add struct for auctioneer data
Add a new type (`auctioneerData`) containing the auctioneer data for
each evironment (mainnet, testnet and regtest).
2022-01-26 01:17:31 -08:00
positiveblue
da2108cc82
account: add target to GenerateRecoveryKeys
The default value for server assisted is 500 but the user is able to
give us a hint of how many accounts we are looking for.
2022-01-26 01:17:31 -08:00
positiveblue
65157959b0
account: generate mocks for account/interfaces.go 2021-12-14 20:40:02 -08:00
positiveblue
29135cf864
account: add the account Manager interface 2021-12-14 20:40:02 -08:00
positiveblue
1856f798fc
account/watcher: add ExpiryWatcher tests 2021-12-07 12:22:38 -08:00
positiveblue
17e77c380f
account/watcher: add controller tests 2021-12-07 12:22:37 -08:00
positiveblue
739498543a
mocks: add account/watcher mocks 2021-12-07 12:22:37 -08:00
positiveblue
7b53791997
account/watcher: delete expiryReq 2021-12-07 12:22:37 -08:00
positiveblue
abd603d765
account/watcher: add ExpiryWatcher and EventHandler interfaces
Split watcher logic in three pices:
    - Controller: API + message dispatching
    - ExpiryWatcher: handle account expirations
    - EventHandler: implementation for each handler
2021-12-07 12:22:27 -08:00
positiveblue
a34790e494
account/watcher: add Controller interface
Use the new watcher interface in the account manager instead of of a specific
struct type.
2021-12-07 11:58:40 -08:00
positiveblue
2e724ad4d6
account: disable renewAccount for StatePendingBatch status
If the account is currently participating in a batch
(`StatePendingBatch`) we disable the renewAccount command. After
enabling account autorenew it could be problematic to renew your
account before the batch is confirmed and you account expiry height
gets updated.
2021-12-02 22:54:12 -08:00