Skip to content

Commit d2ae3d4

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents c8f8001 + 7a6a39d commit d2ae3d4

4 files changed

Lines changed: 27 additions & 1 deletion

File tree

contrib/release.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ do
161161
if [ ! -z "$RELEASEMANAGER" ] ; then
162162
./contrib/android/build.sh qml $arch release $password
163163
else
164-
./contrib/android/build.sh qml $arch release-unsigned
164+
if test -f "dist/$apk_unsigned"; then
165+
# has already been built separately before
166+
info "found unsigned: $apk_unsigned"
167+
else
168+
./contrib/android/build.sh qml $arch release-unsigned
169+
fi
165170
mv "dist/$apk_unsigned" "dist/$apk"
166171
fi
167172
fi

electrum_grs/lnworker.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,6 +3610,20 @@ def create_channel_backup(self, channel_id: bytes):
36103610
)
36113611

36123612
def export_channel_backup(self, channel_id):
3613+
"""Historically, we allowed watching-only wallets and hardware wallets
3614+
to have lightning channels. Since these wallets do not have
3615+
private keys, we use their master public key to encrypt
3616+
channel backups. This allows users to import channel backups
3617+
in these wallets. Note that these are static backups: they
3618+
only allow to request a force close (and, in some scenarios,
3619+
to sweep funds after a channel has been force closed).
3620+
3621+
The creation of lightning channels in watching-only wallets
3622+
has been disabled for anchor channels. Note that it is still
3623+
possible to create non-anchor channels, see
3624+
config.ENABLE_ANCHOR_CHANNELS.
3625+
3626+
"""
36133627
xpub = self.wallet.get_fingerprint()
36143628
backup_bytes = self.create_channel_backup(channel_id).to_bytes()
36153629
assert backup_bytes == ImportedChannelBackupStorage.from_bytes(backup_bytes).to_bytes(), "roundtrip failed"

electrum_grs/plugins/labels/labels.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ def push(self, wallet: 'Abstract_Wallet'):
212212
return asyncio.run_coroutine_threadsafe(self.push_thread(wallet), wallet.network.asyncio_loop).result()
213213

214214
def start_wallet(self, wallet: 'Abstract_Wallet'):
215+
"""Labels have the same level of privacy as the wallet transaction
216+
history. Since the wallet master public key(s) give access to
217+
the transaction history, we also use it to encrypt labels.
218+
"""
215219
if not wallet.network:
216220
return # 'offline' mode
217221
mpk = wallet.get_fingerprint()

electrum_grs/wallet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,9 @@ def init_lightning(self, *, password) -> None:
548548
ln_xprv = self.keystore.get_lightning_xprv(password)
549549
self.db.put('lightning_xprv', ln_xprv)
550550
else:
551+
# bip39 seeds and imported zprv.
552+
# also, watching-only and hw wallets, if the user disables anchors.
553+
# todo: we should kill that branch, it is a footgun.
551554
seed = os.urandom(32)
552555
node = BIP32Node.from_rootseed(seed, xtype='standard')
553556
ln_xprv = node.to_xprv()

0 commit comments

Comments
 (0)