Commit Graph

13276 Commits

Author SHA1 Message Date
eugene
eeedb09e0f
release-notes: update for 0.15.0 2022-04-29 16:40:19 -04:00
eugene
f7b3da4bb2
htlcswitch+lntest: modify Switch to persist resolution messages
Include unit tests for the Switch, and integration tests that
exercise the persistence logic.
2022-04-29 16:40:19 -04:00
eugene
bfed7a088f
htlcswitch: introduce resolutionStore to persist cnct messages 2022-04-29 16:40:16 -04:00
Oliver Gugger
9bbee09497
Merge pull request #6361 from guggero/musig2
Musig2: add new MuSig2 RPC methods to `signrpc`
2022-04-29 12:55:52 +02:00
Oliver Gugger
93e069f3bd
docs: add MuSig2 doc and release notes 2022-04-29 11:42:47 +02:00
Oliver Gugger
63e93ae572
itest: add taproot SignOutputRaw Bip86 signing test 2022-04-29 11:42:46 +02:00
Oliver Gugger
3ba6421d5c
itest: add MuSig2 end-to-end tests 2022-04-29 11:42:43 +02:00
Oliver Gugger
e31aab5af6
multi: fix inclusion proof size
The inclusion proof field in the TapscriptPartialReveal function was
incorrect. An inclusion proof can be zero or more elements of 32-byte
slices. So an empty inclusion proof can be valid too for a tree that
only consists of a single leaf.
2022-04-29 11:41:09 +02:00
Oliver Gugger
f7275c7fc4
multi: implement MuSig2 RPCs and remote signing 2022-04-29 11:41:09 +02:00
Oliver Gugger
8fc99fba00
input+btcwallet: add MuSig2 signing operations
With this commit we add the high-level MuSig2 signing methods to the
btcwallet which will later be exposed through an RPC interface.
2022-04-29 11:41:08 +02:00
Oliver Gugger
fee2b28d1b
itest: refactor taproot test 2022-04-29 11:41:05 +02:00
Oliver Gugger
dfac94bf9b
tools+lint: fix linter for Go 1.18 2022-04-29 09:34:14 +02:00
Oliver Gugger
be704b09b2
mod: bump btcec to MuSig2 version, require go 1.17 2022-04-29 09:34:02 +02:00
Olaoluwa Osuntokun
de6fcf15b6
Merge pull request #6419 from Crypt-iQ/shutdown_coop_restart
peer: allow restart during cooperative close
2022-04-28 17:59:06 -07:00
eugene
caeb650e87
release-notes: update for 0.15.0 2022-04-26 12:52:49 -04:00
eugene
5ec6aafce3
peer: make linter happy 2022-04-26 12:52:49 -04:00
eugene
d881679de0
peer+chancloser: allow restarting coop close process
On startup, we'll check whether we have the coop close chan status
and have already broadcasted a coop close txn, and then make a
decision on whether to restart the process based on that.
2022-04-26 12:52:48 -04:00
eugene
a94466e936
peer: add createChanCloser function to de-dupe NewChanCloser sites 2022-04-26 12:52:46 -04:00
Oliver Gugger
0845c4daeb
Merge pull request #6454 from bottlepay/require-interceptor-info
rpcserver: expose interceptor required flag on info call
2022-04-25 12:11:29 +02:00
Joost Jager
caf11d2607
rpcserver: expose interceptor required flag on info call 2022-04-25 11:05:18 +02:00
Joost Jager
3ad9a42e65
rpcserver: remove unnecessary conversion 2022-04-25 11:05:04 +02:00
Olaoluwa Osuntokun
9572b49922
Merge pull request #6064 from dongcarl/2021-12-admin-cli-args
config: Add bitcoind.{config,rpccookie} configuration options
2022-04-21 16:52:45 -07:00
Carl Dong
1c16f40a0d Add release-notes entry for #6064 2022-04-21 16:04:48 -04:00
Carl Dong
89209ec596 config: Add bitcoind.{config,rpccookie} configuration options
Currently, the Bitcoind.Dir configuration option is used as the base
directory for locating both the bitcoind configuration file and the RPC
cookie file. However, it is quite common for Bitcoin Core to be packaged
in such a way that the configuration file and the RPC cookie file reside
in different directories: "/etc/bitcoin/bitcoin.conf" and
"/var/lib/bitcoind/.cookie".

This change makes it such that --bitcoind.config and
--bitcoind.rpccookie options can be specified to override the default
auto-detection logic, and if either is unspecified, the auto-detection
logic will still do its job.
2022-04-21 14:01:51 -04:00
Olaoluwa Osuntokun
9c97d26cfb
scripts: add gpg key for ellemouton [skip ci] (#6429) 2022-04-20 10:27:30 -07:00
Oliver Gugger
3d7d9361f8
Merge pull request #6422 from hieblmi/lncli-socks-proxy
#4939 Add socks proxy support to lncli
2022-04-20 18:58:09 +02:00
ErikEk
b2646edc52 neutrinorpc: logger 2022-04-20 10:36:45 +02:00
ErikEk
0ce449f99b neutrinorpc: config 2022-04-20 10:07:42 +02:00
Oliver Gugger
b6c5603e00
Merge pull request #5157 from orbitalturtle/addPeer-flag
lnd: Adds addpeer flag
2022-04-20 10:03:21 +02:00
eugene
0f74c6b775
release-notes: update for 0.15.0 2022-04-19 17:24:21 -04:00
eugene
ef83370dcf
contractcourt: deadlock fix via temporary unmerged map
The main idea is that NotifyContractUpdate adds the ContractUpdate to
a map called unmerged. It is populated in Start by shallow-copying the
activeHTLCs map values (htlcSet). The htlcSets underlying maps are not
copied, and so unmerged will just contain pointers to them. This should
be fine since unmerged will not modify them. At the call-sites of
activeHTLCs, it is updated to include the unmerged sets. This happens
with a mutex and should not cause any data race, even though it is
copying the underlying map pointers. No persistence should be
necessary since on restart, activeHTLCs and unmerged will just be
populated again.
2022-04-19 17:24:21 -04:00
asvdf
1e04f191a1
Merge pull request #6402 from asvdf/master
docs: warn about selecting synchronous replication mode [skip ci]
2022-04-19 11:20:10 -07:00
Orbital
565e94a8b3 Update release notes with peering config option 2022-04-19 12:40:00 -05:00
Turtle
8d11a90d72 itest: test config option for picking particular peers 2022-04-19 12:37:44 -05:00
Turtle
747161a1f4 lnd: add config option for specifying particular peers to connect to 2022-04-19 12:37:44 -05:00
yyforyongyu
591dbb180b
docs: add release note for revocation log removal 2022-04-20 01:19:41 +08:00
yyforyongyu
b288284566
channeldb: use BigSize to encode htlc amount
This commit uses bigsize record to encode the htlc amount, which could
save us 3 more bytes if the encoded value is no greater than roughly
0.043 bitcoin. The uint test has been updated with a more realistic
values to reflect the actual gain.
2022-04-20 01:19:40 +08:00
yyforyongyu
7c5daaf7c2
mod: update tlv's package version 2022-04-20 01:19:30 +08:00
yyforyongyu
22d98ca6d5
multi: use new revocation log when creating breach retribution
This commit changes the `NewBreachRetribution` to use the new revocation
log format, while maintaining the compatibilty to use an older
revocation log format. Unit tests have been added to make sure a breach
retribution can be created in both log formats.

This also means the watch tower needs to pass the relevant commit tx at
its backup height when creating the breach retribution during backing
up. This is achieved by recording the current remote commitment state
before advancing the remote commitment chain.
2022-04-20 01:18:14 +08:00
yyforyongyu
953767961e
multi: use txid instead of tx in BreachRetribution
This commit replaces the field `BreachTransaction` with `BreachTxHash`
as there's no need to pass that large raw transaction.
2022-04-20 01:18:14 +08:00
yyforyongyu
37b11c4503
channeldb+lnwallet: store revocation log using the new format
This commit removes the usage of the old revocation log bucket and
starts to perform db operations using the new sub-bucket.
2022-04-20 01:18:14 +08:00
yyforyongyu
df810114cf
lnwallet: add method to compute output indexes
This commit adds a new method, findOutputIndexesFromRemote to compute
the our/their output indexes. As we will see in the following commit,
saving these two fields(4+4=8 bytes) will end up saving us some disk
space.
2022-04-20 01:18:13 +08:00
yyforyongyu
a129930a95
channeldb: add unit test for revocation log 2022-04-20 01:18:13 +08:00
yyforyongyu
dc137bed8b
channel: move deprecated log handling into the new file 2022-04-20 01:18:13 +08:00
yyforyongyu
c41175f233
channeldb: re-introduce revocationLogBucket
This commit adds `revocationLogBucket` using the new sub-bucket key
"revocation-log" to store the minimal info needed. Two structs,
`RevocationLog` and `HTLCEntry` are created to represent the disk
records.
2022-04-20 01:18:13 +08:00
yyforyongyu
4609ac2008
channeldb: deprecate old revocation log bucket
This commit marks the sub-bucket identified by "revocation-log-key" as
deprecated.
2022-04-20 01:18:13 +08:00
yyforyongyu
f42d1f2d62
multi: remove function BalancesAtHeight
This commit deletes the function `BalancesAtHeight` since its only
usague is to find the push amount, which can be achieved by saving the
initial balances.
Another reason to remove it is to pave the way to incooperate our new
revocation log. If we ever need this function again, we can add it back
by visiting all the revocation logs to calculate the balances at a given
height.
2022-04-20 01:18:13 +08:00
yyforyongyu
7eaf0d0089
channeldb+migration: add migration test for patching balances 2022-04-20 01:18:13 +08:00
yyforyongyu
c9843fd206
channeldb+migration: add migration to save the initial balances
This commit adds a migration to patch the newly added fields,
`InitialLocalBalance` and `InitialRemoteBalance` to channel info.
2022-04-20 01:18:12 +08:00
yyforyongyu
8b289e79f5
channeldb+migration: export commonly used methods
This commit exports several commonly used methods that can be used by
later migrations. It also adds a channel commit deserializer.
2022-04-20 01:18:12 +08:00