Skip to content

Commit fb94e12

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 7031d08 + 5d9678a commit fb94e12

File tree

161 files changed

+3757
-2332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+3757
-2332
lines changed

.cirrus.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -223,42 +223,43 @@ task:
223223
binaries_artifacts:
224224
path: "dist/*"
225225

226-
task:
227-
name: MacOS build
228-
macos_instance:
229-
image: catalina-xcode-11.3.1
230-
env:
231-
TARGET_OS: macOS
232-
pip_cache:
233-
folder: ~/Library/Caches/pip
234-
fingerprint_script:
235-
- echo $CIRRUS_TASK_NAME
236-
- git ls-files -s contrib/deterministic-build/*.txt
237-
- git ls-files -s contrib/osx/
238-
build2_cache:
239-
folder: contrib/osx/.cache
240-
fingerprint_script:
241-
- echo $CIRRUS_TASK_NAME
242-
- cat contrib/make_libsecp256k1.sh | shasum -a 256
243-
- cat contrib/make_libusb.sh | shasum -a 256
244-
- cat contrib/make_zbar.sh | shasum -a 256
245-
- git ls-files -s contrib/osx/
246-
install_script:
247-
- git fetch --all --tags
248-
build_script:
249-
- ./contrib/osx/make_osx.sh
250-
sum_script:
251-
- ls -lah dist
252-
- shasum -a 256 dist/*.dmg
253-
binaries_artifacts:
254-
path: "dist/*"
226+
## mac build disabled, as Cirrus CI no longer supports Intel-based mac builds
227+
#task:
228+
# name: MacOS build
229+
# macos_instance:
230+
# image: catalina-xcode-11.3.1
231+
# env:
232+
# TARGET_OS: macOS
233+
# pip_cache:
234+
# folder: ~/Library/Caches/pip
235+
# fingerprint_script:
236+
# - echo $CIRRUS_TASK_NAME
237+
# - git ls-files -s contrib/deterministic-build/*.txt
238+
# - git ls-files -s contrib/osx/
239+
# build2_cache:
240+
# folder: contrib/osx/.cache
241+
# fingerprint_script:
242+
# - echo $CIRRUS_TASK_NAME
243+
# - cat contrib/make_libsecp256k1.sh | shasum -a 256
244+
# - cat contrib/make_libusb.sh | shasum -a 256
245+
# - cat contrib/make_zbar.sh | shasum -a 256
246+
# - git ls-files -s contrib/osx/
247+
# install_script:
248+
# - git fetch --all --tags
249+
# build_script:
250+
# - ./contrib/osx/make_osx.sh
251+
# sum_script:
252+
# - ls -lah dist
253+
# - shasum -a 256 dist/*.dmg
254+
# binaries_artifacts:
255+
# path: "dist/*"
255256

256257
task:
257258
name: AppImage build
258259
container:
259260
dockerfile: contrib/build-linux/appimage/Dockerfile
260261
cpu: 2
261-
memory: 1G
262+
memory: 2G
262263
pip_cache:
263264
folder: contrib/build-linux/appimage/.cache/pip_cache
264265
fingerprint_script:

RELEASE-NOTES

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# Release 4.3.3 - (January 3, 2023)
2+
* Lightning:
3+
- fix handling failed HTLCs in gossip-based routing (#7995)
4+
- fix LN cooperative-chan-close to witness v1 addr (#8012)
5+
* PSBTs:
6+
- never put ypub/zpub in psbts, only plain xpubs (#8036)
7+
- for witness v0 txins, put both UTXO and WIT_UTXO in psbt (#8039)
8+
* Hardware wallets:
9+
- Trezor: optimize signing speed by not serializing tx (#8058)
10+
- Ledger:
11+
- modify plugin to support new bitcoin app v2.1.0 (#8041),
12+
- added a deprecation warning when using Ledger HW.1 devices.
13+
Ledger itself stopped supporting HW.1 some years ago, and it is
14+
becoming a maintenance burden for us to keep supporting it.
15+
Please migrate away from these devices. Support will be removed
16+
in a future release.
17+
* Binaries:
18+
- tighten build system to only use source pkgs in more places
19+
(#7999, #8000)
20+
- Windows:
21+
- use debian makensis instead of upstream windows exe (#8057)
22+
- stop using debian sid, build missing dep instead (98d29cba)
23+
- AppImage: fix failing to run on certain systems (#8011)
24+
* commands:
25+
- getinfo() to show if running in testnet mode (#8044)
26+
- add a "convert_currency" command (for fiat FX rate) (#8091)
27+
* Qt wizard: fix QR code not shown during 2fa wallet creation (#8071)
28+
* rework Tor-socks-proxy detection to reduce Tor-log-spam (#7317)
29+
* Android: add setting to enable debug logs (#7409)
30+
* fix payserver (merchant) js for electrum 4.3 invoice api (0fc90e07)
31+
* bip21: more robust handling of URIs that include a "lightning" key
32+
(ac1d53f0, 2fd762c3, #8047)
33+
34+
135
# Release 4.3.2 - (September 26, 2022)
236
* When creating new requests, reuse addresses of expired requests
337
(fixes #7927).

contrib/android/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ RUN cd /opt \
179179
&& git remote add accumulator https://github.com/accumulator/python-for-android \
180180
&& git fetch --all \
181181
# commit: from branch accumulator/electrum_20210421d
182-
&& git checkout "a16a3dd5cf8fe0f846663bce9e248e5432dbbf2d^{commit}" \
182+
&& git checkout "d33e07ba4c7931da46122a32f3807709a73cb7f6^{commit}" \
183183
&& python3 -m pip install --no-build-isolation --no-dependencies --user -e .
184184

185185
# build env vars

contrib/android/make_apk.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ if [[ "$2" == "all" ]] ; then
9393
make $TARGET
9494
#export APP_ANDROID_ARCH=x86
9595
#make $TARGET
96+
export APP_ANDROID_ARCH=x86_64
97+
make $TARGET
9698
else
9799
export APP_ANDROID_ARCH=$2
98100
make $TARGET
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import os
2+
13
from pythonforandroid.recipes.qt5 import Qt5Recipe
24

5+
from pythonforandroid.util import load_source
6+
7+
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
38

49
assert Qt5Recipe._version == "9b43a43ee96198674060c6b9591e515e2d27c28f"
510
assert Qt5Recipe.depends == ['python3']
611
assert Qt5Recipe.python_depends == []
712

8-
recipe = Qt5Recipe()
13+
class Qt5RecipePinned(util.InheritedRecipeMixin, Qt5Recipe):
14+
pass
15+
16+
recipe = Qt5RecipePinned()

contrib/build-linux/appimage/make_appimage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$CACHEDIR"
6161
--enable-ipv6 \
6262
--enable-shared \
6363
-q
64-
make -j4 -s || fail "Could not build Python"
64+
make "-j$CPU_COUNT" -s || fail "Could not build Python"
6565
)
6666
info "installing python."
6767
(
@@ -111,7 +111,7 @@ XCB_UTIL_VERSION="acf790d7752f36e450d476ad79807d4012ec863b"
111111
git checkout "${XCB_UTIL_VERSION}^{commit}"
112112
./autogen.sh
113113
./configure --enable-shared
114-
make -j4 -s || fail "Could not build libxcb-util1"
114+
make "-j$CPU_COUNT" -s || fail "Could not build libxcb-util1"
115115
) || fail "Could build libxcb-util1"
116116
cp "$CACHEDIR/libxcb-util1/util/src/.libs/libxcb-util.so.1" "$APPDIR/usr/lib/libxcb-util.so.1"
117117

contrib/build-wine/deterministic.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ hiddenimports = []
1515
hiddenimports += collect_submodules('pkg_resources') # workaround for https://github.com/pypa/setuptools/issues/1963
1616
hiddenimports += collect_submodules('trezorlib')
1717
hiddenimports += collect_submodules('safetlib')
18-
hiddenimports += collect_submodules('btchip')
18+
hiddenimports += collect_submodules('btchip') # device plugin: ledger
19+
hiddenimports += collect_submodules('ledger_bitcoin') # device plugin: ledger
1920
hiddenimports += collect_submodules('keepkeylib')
2021
hiddenimports += collect_submodules('websocket')
2122
hiddenimports += collect_submodules('ckcc')

contrib/build_tools_util.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ fi
130130

131131
export GCC_STRIP_BINARIES="${GCC_STRIP_BINARIES:-0}"
132132

133+
if [ -n "$CIRRUS_CPU" ] ; then
134+
# special-case for CI. see https://github.com/cirruslabs/cirrus-ci-docs/issues/1115
135+
export CPU_COUNT="$CIRRUS_CPU"
136+
else
137+
export CPU_COUNT="$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
138+
fi
139+
info "Found $CPU_COUNT CPUs, which we might use for building."
140+
133141

134142
function break_legacy_easy_install() {
135143
# We don't want setuptools sneakily installing dependencies, invisible to pip.

contrib/make_libsecp256k1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ info "Building $pkgname..."
5959
--disable-static \
6060
--enable-shared || fail "Could not configure $pkgname. Please make sure you have a C compiler installed and try again."
6161
fi
62-
make -j4 || fail "Could not build $pkgname"
62+
make "-j$CPU_COUNT" || fail "Could not build $pkgname"
6363
make install || fail "Could not install $pkgname"
6464
. "$here/$pkgname/dist/lib/libsecp256k1.la"
6565
host_strip "$here/$pkgname/dist/lib/$dlname"

contrib/make_libusb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ info "Building $pkgname..."
4747
$AUTOCONF_FLAGS \
4848
|| fail "Could not configure $pkgname. Please make sure you have a C compiler installed and try again."
4949
fi
50-
make -j4 || fail "Could not build $pkgname"
50+
make "-j$CPU_COUNT" || fail "Could not build $pkgname"
5151
make install || warn "Could not install $pkgname"
5252
. "$here/$pkgname/libusb/.libs/libusb-1.0.la"
5353
host_strip "$here/$pkgname/libusb/.libs/$dlname"

contrib/make_zbar.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ info "Building $pkgname..."
8181
--disable-static \
8282
--enable-shared || fail "Could not configure $pkgname. Please make sure you have a C compiler installed and try again."
8383
fi
84-
make -j4 || fail "Could not build $pkgname"
84+
make "-j$CPU_COUNT" || fail "Could not build $pkgname"
8585
make install || fail "Could not install $pkgname"
8686
. "$here/$pkgname/dist/lib/libzbar.la"
8787
host_strip "$here/$pkgname/dist/lib/$dlname"

contrib/osx/osx.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ hiddenimports = []
2222
hiddenimports += collect_submodules('pkg_resources') # workaround for https://github.com/pypa/setuptools/issues/1963
2323
hiddenimports += collect_submodules('trezorlib')
2424
hiddenimports += collect_submodules('safetlib')
25-
hiddenimports += collect_submodules('btchip')
25+
hiddenimports += collect_submodules('btchip') # device plugin: ledger
26+
hiddenimports += collect_submodules('ledger_bitcoin') # device plugin: ledger
2627
hiddenimports += collect_submodules('keepkeylib')
2728
hiddenimports += collect_submodules('websocket')
2829
hiddenimports += collect_submodules('ckcc')

contrib/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#
2424
# Note: steps before doing a new release:
2525
# - update locale:
26-
# 1. cd /opt/electrum-locale && ./update && push
26+
# 1. cd /opt/electrum-locale && ./update && git push
2727
# 2. cd to the submodule dir, and git pull
2828
# 3. cd .. && git push
2929
# - update RELEASE-NOTES and version.py
30-
# - git tag
30+
# - $ git tag -s $VERSION -m $VERSION
3131
#
3232

3333
set -e

electrum/address_synchronizer.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ def __init__(self, db: 'WalletDB', config: 'SimpleConfig', *, name: str = None):
8484
self.unverified_tx = defaultdict(int) # type: Dict[str, int] # txid -> height. Access with self.lock.
8585
# Txs the server claims are in the mempool:
8686
self.unconfirmed_tx = defaultdict(int) # type: Dict[str, int] # txid -> height. Access with self.lock.
87-
# true when synchronized
88-
self._up_to_date = False # considers both Synchronizer and Verifier
8987
# thread local storage for caching stuff
9088
self.threadlocal_cache = threading.local()
9189

@@ -210,9 +208,9 @@ async def stop(self):
210208
def add_address(self, address):
211209
if address not in self.db.history:
212210
self.db.history[address] = []
213-
self.set_up_to_date(False)
214211
if self.synchronizer:
215212
self.synchronizer.add(address)
213+
self.up_to_date_changed()
216214

217215
def get_conflicting_transactions(self, tx_hash, tx: Transaction, include_self=False):
218216
"""Returns a set of transaction hashes from the wallet history that are
@@ -538,6 +536,7 @@ def get_history(self, domain) -> Sequence[HistoryItem]:
538536
# sanity check
539537
c, u, x = self.get_balance(domain)
540538
if balance != c + u + x:
539+
self.logger.error(f'sanity check failed! c={c},u={u},x={x} while history balance={balance}')
541540
raise Exception("wallet.get_history() failed balance sanity-check")
542541
return h2
543542

@@ -676,17 +675,14 @@ def get_tx_height(self, tx_hash: str) -> TxMinedInfo:
676675
# local transaction
677676
return TxMinedInfo(height=TX_HEIGHT_LOCAL, conf=0)
678677

679-
def set_up_to_date(self, up_to_date):
680-
with self.lock:
681-
status_changed = self._up_to_date != up_to_date
682-
self._up_to_date = up_to_date
678+
def up_to_date_changed(self) -> None:
683679
# fire triggers
684680
util.trigger_callback('adb_set_up_to_date', self)
685-
if status_changed:
686-
self.logger.info(f'set_up_to_date: {up_to_date}')
687681

688682
def is_up_to_date(self):
689-
return self._up_to_date
683+
if not self.synchronizer or not self.verifier:
684+
return False
685+
return self.synchronizer.is_up_to_date() and self.verifier.is_up_to_date()
690686

691687
def reset_netrequest_counters(self) -> None:
692688
if self.synchronizer:

electrum/base_wizard.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ def failed_getting_device_infos(name, e):
313313
continue
314314
# see if plugin recognizes 'scanned_devices'
315315
try:
316-
# FIXME: side-effect: unpaired_device_info sets client.handler
317-
device_infos = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices,
318-
include_failing_clients=True)
316+
# FIXME: side-effect: this sets client.handler
317+
device_infos = devmgr.list_pairable_device_infos(
318+
handler=None, plugin=plugin, devices=scanned_devices, include_failing_clients=True)
319319
except HardwarePluginLibraryUnavailable as e:
320320
failed_getting_device_infos(name, e)
321321
continue
@@ -622,7 +622,7 @@ def create_wallet(self):
622622
password = k.get_password_for_storage_encryption()
623623
except UserCancelled:
624624
devmgr = self.plugins.device_manager
625-
devmgr.unpair_xpub(k.xpub)
625+
devmgr.unpair_pairing_code(k.pairing_code())
626626
raise ChooseHwDeviceAgain()
627627
except BaseException as e:
628628
self.logger.exception('')

0 commit comments

Comments
 (0)