From c55f4c634e3687c89ebaa8a0934f9b9b548f31bb Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 11:44:25 +0200 Subject: [PATCH 1/8] Update Tor to 0.4.6.6 --- Dockerfile | 4 ++-- Dockerfile.windows | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d77723a..c24034c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -230,9 +230,9 @@ RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \ # Tor: Optional for Feather (-DTOR_BIN) # Binary can be embedded in Feather ENV TOR_BIN=/usr/local/tor/bin/tor -RUN git clone -b tor-0.4.5.7 --depth 1 https://git.torproject.org/tor.git && \ +RUN git clone -b tor-0.4.6.6 --depth 1 https://git.torproject.org/tor.git && \ cd tor && \ - git reset --hard 83f895c015de55201e5f226f84a866f30f5ee14b && \ + git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \ ./autogen.sh && \ ./configure \ --disable-asciidoc \ diff --git a/Dockerfile.windows b/Dockerfile.windows index cf1a2b9..fedc93d 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -154,9 +154,9 @@ RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.11-s make -j$THREADS install && \ rm -rf $(pwd) -RUN git clone -b tor-0.4.5.7 --depth 1 https://git.torproject.org/tor.git && \ +RUN git clone -b tor-0.4.6.6 --depth 1 https://git.torproject.org/tor.git && \ cd tor && \ - git reset --hard 83f895c015de55201e5f226f84a866f30f5ee14b && \ + git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \ ./autogen.sh && \ ./configure --host=x86_64-w64-mingw32 \ --disable-asciidoc \ From 1c798c77f04a83c681f9065b3d9c30981e479633 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 11:50:24 +0200 Subject: [PATCH 2/8] Update BUILDING.md --- BUILDING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index dc855d4..b22beb1 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -30,14 +30,14 @@ Replace `master` with the desired version tag (e.g. `beta-8`) to build the relea docker build --tag feather:linux --build-arg THREADS=4 . ``` -Building the base image takes a while. You only need to build the base image once. +Building the base image takes a while. You only need to build the base image once per release. #### 3. Build ##### Standalone binary ```bash -docker run --rm -it -v $PWD:/feather -w /feather feather:linux sh -c 'CHECK_UPDATES=On make release-static -j4' +docker run --rm -it -v $PWD:/feather -w /feather feather:linux sh -c 'WITH_SCANNER=Off make release-static -j8' ``` If you're re-running a build make sure to `rm -rf build/` first. @@ -46,9 +46,9 @@ The resulting binary can be found in `build/bin/feather`. ##### AppImage -First create the standalone binary using the Docker command in the previous step. - ```bash +rm -rf build +docker run --rm -it -v $PWD:/feather -w /feather feather:linux sh -c 'make release-static -j8' docker run --rm -it -v $PWD:/feather -w /feather/build feather:linux ../contrib/build-appimage.sh ``` @@ -77,7 +77,7 @@ Building the base image takes a while. You only need to build the base image onc #### 3. Build ```bash -docker run --rm -it -v $PWD:/feather -w /feather feather:win sh -c 'CHECK_UPDATES=On make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j4' +docker run --rm -it -v $PWD:/feather -w /feather feather:win sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j4' ``` If you're re-running a build make sure to `rm -rf build/` first. From 91b86b949b531c45818452322f3e7955f172fb51 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 18:39:47 +0200 Subject: [PATCH 3/8] AppImage: fix build --- contrib/build-appimage.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/contrib/build-appimage.sh b/contrib/build-appimage.sh index 6c7ff9c..3692c43 100755 --- a/contrib/build-appimage.sh +++ b/contrib/build-appimage.sh @@ -17,15 +17,29 @@ cp "$PWD/bin/feather" "$APPDIR/usr/bin/feather" chmod +x "$APPDIR/usr/bin/feather" export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu/:/usr/local/lib/$LD_LIBRARY_PATH -linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -bundle-non-qt-libs +linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs pushd feather.AppDir/usr/plugins ln -s ../lib/ gstreamer popd -cp -r /usr/lib/x86_64-linux-gnu/gstreamer-1.0/* feather.AppDir/usr/plugins/gstreamer/ +GST_PLUGINS=("libgstcamerabin.so libgstcoreelements.so libgstvolume.so libgstapp.so libgstvideoconvert.so + libgstvideoscale.so libgstvideo4linux2.so libgstencoding.so libgstmultifile.so libgstmatroska.so + libgstvpx.so libgstjpegformat.so libgstjpeg.so libgstautodetect.so libgstaudiotestsrc.so + libgstvorbis.so libgstaudiorate.so libgstaudioconvert.so libgstaudioresample.so libgstvideocrop.so") + +for plugin in ${GST_PLUGINS[*]}; do + cp /usr/lib/x86_64-linux-gnu/gstreamer-1.0/$plugin feather.AppDir/usr/plugins/gstreamer/ + + # linuxdeployqt doesn't set RUNPATH on libs that are only loaded at runtime + patchelf --set-rpath "\$ORIGIN" feather.AppDir/usr/plugins/gstreamer/$plugin +done + cp /usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner feather.AppDir/usr/plugins/gstreamer/ +# Need second deploy for gstreamer dependencies +linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs + rm "$APPDIR/AppRun" cp "$PWD/../contrib/AppImage/AppRun" "$APPDIR/" chmod +x "$APPDIR/AppRun" From 8345fd2b0143fb626ac2dbf7f961e4fe0c3d9253 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 22:28:37 +0200 Subject: [PATCH 4/8] Node list: remove v2 .onions --- src/assets/nodes.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/assets/nodes.json b/src/assets/nodes.json index 7c99388..adf4787 100644 --- a/src/assets/nodes.json +++ b/src/assets/nodes.json @@ -1,13 +1,10 @@ { "mainnet": { "tor": [ - "xmrag4hf5xlabmob.onion:18081", "monero26mmldsallmxok2kwamne4ve3mybvvn2yijsvss7ey63hc4yyd.onion:18081", - "monero5sjoz5xmjn.onion:18081", "mxcd4577fldb3ppzy7obmmhnu3tf57gbcbd4qhwr2kxyjj2qi3dnbfqd.onion:18081", "moneroxmrxw44lku6qniyarpwgznpcwml4drq7vb24ppatlcg4kmxpqd.onion:18089", "3hvpnd4xejtzcuowvru2wfjum5wjf7synigm44rrizr3k4v5vzam2bad.onion:18081", - "aytzr6aoxsegx2y6.onion:18081", "rbpgdckle3h3vi4wwwrh75usqtoc5r3alohy7yyx57isynvay63nacyd.onion:18089" ], "clearnet": [ From 70e4e91a15dfb76d0d7982d4a828b318f3baa7c4 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 23:26:55 +0200 Subject: [PATCH 5/8] Node list: add more Tor nodes --- src/assets/nodes.json | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/assets/nodes.json b/src/assets/nodes.json index adf4787..2ca37fc 100644 --- a/src/assets/nodes.json +++ b/src/assets/nodes.json @@ -5,23 +5,22 @@ "mxcd4577fldb3ppzy7obmmhnu3tf57gbcbd4qhwr2kxyjj2qi3dnbfqd.onion:18081", "moneroxmrxw44lku6qniyarpwgznpcwml4drq7vb24ppatlcg4kmxpqd.onion:18089", "3hvpnd4xejtzcuowvru2wfjum5wjf7synigm44rrizr3k4v5vzam2bad.onion:18081", - "rbpgdckle3h3vi4wwwrh75usqtoc5r3alohy7yyx57isynvay63nacyd.onion:18089" + "rbpgdckle3h3vi4wwwrh75usqtoc5r3alohy7yyx57isynvay63nacyd.onion:18089", + "6dsdenp6vjkvqzy4wzsnzn6wixkdzihx3khiumyzieauxuxslmcaeiad.onion:18081", + "56wl7y2ebhamkkiza4b7il4mrzwtyvpdym7bm2bkg3jrei2je646k3qd.onion:18089" ], "clearnet": [ - "eu-west.node.xmr.pm:18089", - "eu-west-2.node.xmr.pm:18089", - "usa-east-va.node.xmr.pm:18089", + "node.melo.tools:18081", + "node-1.sethsimmons.me:18089", + "selsta1.featherwallet.net:18081", + "selsta2.featherwallet.net:18081", + "xmr-node-eu.cakewallet.com:18081", + "xmr-node-usa-east.cakewallet.com:18081", "canada.node.xmr.pm:18089", "singapore.node.xmr.pm:18089", "nodes.hashvault.pro:18081", "node.supportxmr.com:18081", - "xmr-node-eu.cakewallet.com:18081", - "xmr-node-usa-east.cakewallet.com:18081", - "node.xmr.ru:18081", - "selsta1.featherwallet.net:18081", - "selsta2.featherwallet.net:18081", - "node-1.sethsimmons.me:18089", - "node.melo.tools:18081" + "node.xmr.ru:18081" ] }, "testnet": { From 5262e388f1654ff1261a72dba303a9f7ac8557b7 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 23:43:59 +0200 Subject: [PATCH 6/8] Send: clear all lines on data paste --- src/SendWidget.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SendWidget.cpp b/src/SendWidget.cpp index c767170..846d6b5 100644 --- a/src/SendWidget.cpp +++ b/src/SendWidget.cpp @@ -279,12 +279,9 @@ void SendWidget::onDataPasted(const QString &data) { if (!data.isEmpty()) { QVariantMap uriData = m_ctx->wallet->parse_uri_to_object(data); if (!uriData.contains("error")) { - if (uriData.contains("address")) - ui->lineAddress->setText(uriData.value("address").toString()); - if (uriData.contains("amount")) - ui->lineAmount->setText(uriData.value("amount").toString()); - if (uriData.contains("tx_description")) - ui->lineDescription->setText(uriData.value("tx_description").toString()); + ui->lineAddress->setText(uriData.value("address").toString()); + ui->lineDescription->setText(uriData.value("tx_description").toString()); + ui->lineAmount->setText(uriData.value("amount").toString()); } else { ui->lineAddress->setText(data); } From f818812c12e5d327899c6ccb10339fceff1c3d3a Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 9 Jul 2021 23:48:43 +0200 Subject: [PATCH 7/8] Trezor: handle PIN requests in MainWindow --- src/MainWindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index e1c7b96..8d5aa73 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1170,9 +1170,20 @@ void MainWindow::onDeviceError(const QString &error) { } void MainWindow::onDeviceButtonRequest(quint64 code) { + qDebug() << "DeviceButtonRequest, code: " << code; + if (m_ctx->wallet->isTrezor()) { switch (code) { + case 1: + { + m_splashDialog->setMessage("Action required on device: Enter your PIN to continue"); + m_splashDialog->setIcon(QPixmap(":/assets/images/key.png")); + m_splashDialog->show(); + m_splashDialog->setEnabled(true); + break; + } case 8: + default: { // Annoyingly, this code is used for a variety of actions, including: // Confirm refresh: Do you really want to start refresh? From 2525decdbeeebc6a18506e14317cf4f1dbe60573 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 10 Jul 2021 00:25:13 +0200 Subject: [PATCH 8/8] Disconnect wallet on close --- src/MainWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 8d5aa73..8e6fd3f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -874,6 +874,10 @@ void MainWindow::closeEvent(QCloseEvent *event) { m_updateBytes.stop(); m_txTimer.stop(); + m_ctx->stopTimers(); + + // Wallet signal may fire after AppContext is gone, causing segv + m_ctx->wallet->disconnect(); this->saveGeo(); m_windowManager->closeWindow(this);