Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feather Atomic PR to open commentary #203

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
140547b
Plugin Tab placeholder copy of Calc
May 18, 2024
777ae42
Plugin Config outline work
May 19, 2024
da70287
Plugin Config outline work
May 19, 2024
435a75d
Swap tool auto downloader working.
May 22, 2024
e6aac4e
Swap tool auto downloader finished, browse finished, and ui updates
May 22, 2024
0018b5a
Offer Book updating half done. Need to fix refreshing gui to reflect …
May 27, 2024
ce38f3e
Offer Book updating finished. Minor ui additions.
May 29, 2024
a84ff2e
Bump to swap tool v 0.13.0
Jun 3, 2024
cba9eab
Atomic Swap UI to show progress of swap started
Jun 12, 2024
fd6b004
Update README to link to xmr-btc-swap-json-tests repo. To allow for e…
Jun 21, 2024
b9fde51
Update README again. Swap tool has not been set up to do btc testnet4…
Jun 27, 2024
513d832
Added AtomicFundDialog ui to make depositing btc for swap easy. Updat…
Jul 8, 2024
8744138
Added AtomicFundDialog ui to make depositing btc for swap easy. Updat…
Jul 8, 2024
08328d9
DONE:
Jul 23, 2024
06c43a7
DONE:
Aug 2, 2024
c67fedf
DONE:
Aug 5, 2024
41f78b5
Minor Refactoring and addition of behind the scene changes to swap se…
Aug 9, 2024
12bbc76
Version 0.9
Aug 11, 2024
441aa24
Version v1.0
Aug 22, 2024
ac3d072
Merge updates to upstream feather repository
Aug 22, 2024
f4d27d5
v1.0
Aug 24, 2024
049a770
Update README.md
BrandyJSon Aug 27, 2024
a530b1c
Fixes for Issues #1,#2,#3 and additionally fixes CMakeLists allow non…
Sep 11, 2024
fb07bb5
Merge remote-tracking branch 'origin/master'
Sep 11, 2024
ac89dfc
Merge main feather repo commits before release
Sep 16, 2024
971e5c4
Removed dead rendezvous points
Oct 7, 2024
5f26201
Merge feather 2.7.0
Oct 11, 2024
7ec47fd
Patch Atomicwidget
Oct 12, 2024
4b5800f
Clean up accidental changes to make PR cleaner
Oct 14, 2024
e705f43
Fix issues mentioned by tobtoht
Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@ cmake_policy(SET CMP0074 NEW)
option(STATIC "Link libraries statically, requires static Qt" OFF)
option(SELF_CONTAINED "Disable when building Feather for packages" OFF)
option(TOR_DIR "Directory containing Tor binaries to embed inside Feather" OFF)
option(CHECK_UPDATES "Enable checking for application updates" OFF)
option(CHECK_UPDATES "Enable checking for application updates" ON)
option(PLATFORM_INSTALLER "Built-in updater fetches installer (windows-only)" OFF)
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
option(USE_DEVICE_TREZOR "Trezor support compilation" OFF)
option(DONATE_BEG "Prompt donation window every once in a while" OFF)
option(WITH_SCANNER "Enable webcam QR scanner" ON)
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
option(STACK_TRACE "Dump stack trace on crash (Linux only)" OFF)
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved

# Plugins
#
option(WITH_PLUGIN_HOME "Include Home tab plugin" ON)
option(WITH_PLUGIN_TICKERS "Include Tickers Home plugin" ON)
option(WITH_PLUGIN_CROWDFUNDING "Include Crowdfunding Home plugin" ON)
option(WITH_PLUGIN_BOUNTIES "Include Bounties Home plugin" ON)
option(WITH_PLUGIN_REVUO "Include Revuo Home plugin" ON)
option(WITH_PLUGIN_CALC "Include Calc tab plugin" ON)
option(WITH_PLUGIN_XMRIG "Include XMRig plugin" ON)
option(WITH_PLUGIN_ATOMIC "Include Atomic plugin" ON)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
include(CheckCCompilerFlag)
Expand Down Expand Up @@ -112,8 +113,9 @@ if(WITH_SCANNER)
endif()

# libzip
if(CHECK_UPDATES)
if(CHECK_UPDATES OR WITH_PLUGIN_ATOMIC)
set(ZLIB_USE_STATIC_LIBS "ON")
message("libzip inclueded")
find_package(ZLIB REQUIRED)
find_path(LIBZIP_INCLUDE_DIRS zip.h)
find_library(LIBZIP_LIBRARIES zip)
Expand Down
59 changes: 28 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
# Feather Wallet
# Feather Atomic

Feather is a free Monero desktop wallet for Linux, Tails, macOS and Windows. It is written in C++ with the Qt framework.
Feather Atomic is a plugin for the free, open-source Monero wallet for Linux, Tails, macOS and Windows, Feather. It is written in C++ with the Qt framework.

- **easy-to-use**, **small** and **fast** - Feather runs well on any modern hardware, including virtual machines and live operating systems.
- **beginner friendly**, but also caters to advanced Monero users by providing a [feature set](https://docs.featherwallet.org/guides/features) that is on par with the official CLI.
- ships with **sane defaults** that suit most users, but can also be configured for high or uncommon threat models.
- serves as a testing grounds for **experimental features** that may later be adopted in the reference wallets.
## Usage
Make sure to click configure button in the atomic tab and either auto install the swap binary or select the already installed binary.
All files relevant to swap will be stored in feathers config directory including the binary if you auto install.

## Download
### If after installing the swap tool, refresh fails to show any swaps make sure to check that you have a version of GLIBC greater or equal to 2.32 or this plugin will not be able to run on your system.

You can download Feather from **[featherwallet.org](https://featherwallet.org/download/)** or **[GitHub](https://github.com/feather-wallet/feather/releases)**.
### Running a swap
1. Click refresh offers (may take a little if routing through tor)
2. Click the offer you would like to take from the table
3. Enter a BTC change address (make sure you are using a testnet address if feather is running stagenet mode)
4. Enter a XMR receive address
5. Click swap
6. Wait for fund dialog to appear, send at least the minimum BTC covering tx fees to the address and not more then the max BTC of the offer (if there is BTC from a previous uncompleted swap then this dialog may not appear)
7. Once the transaction is detected in the BTC mempool a different dialog will appear showing the status of confirmations for BTC and XMR side of swap
8. If all goes right after the BTC transaction reaches at least 1 confirmation and the XMR transaction reaches at least 10 confirmations the swap complete and both parties should be happy with their new coins

If you need help installing installing Feather, check the [installation documentation](https://docs.featherwallet.org/).
### Recovery
If for some reason the swap isn't able to be completed when ran, one party goes offline, application crashes, etc then a recovery dialog will automatically appear next time you launch feather atomic as long as the swap still can be resumed or canceled.
#### To cancel a swap
1. Make sure swap has had enough BTC confirmations to be able to be canceled (should take about 12 hours, gui reflect if it can be canceled)
2. Click the swap you wish to cancel then click the cancel button
3. A dialog will spawn and then after a moment the dialog should update to say the swap has been canceled

Releases are signed with our [release signing key](https://docs.featherwallet.org/guides/release-signing-key). The fingerprint is:
#### To resume a swap
1. Click the swap you wish to resume then click the resume button
2. If the seller is still online then the normal swap dialog will appear
3. The confirmations may not always be accurate when resuming so rely on the status message in the dialog to follow progress of the swap.
4. As long as both parties stay online the swap should continue as normal and end with both parties having their new coins

```
8185 E158 A333 30C7 FD61 BC0D 1F76 E155 CEFB A71C
```

We recommend that you verify downloads with GPG.
### Testnet4 swap demo

## Resources

* [Official Site](https://featherwallet.org)
* [Documentation](https://docs.featherwallet.org)
* [Git Repository](https://github.com/feather-wallet/feather)
* [Matrix](https://matrix.to/#/#feather:monero.social)
* IRC: `#feather` on [OFTC](https://www.oftc.net/)
* Mail: [email protected]

If you need help with your wallet, please contact us via Matrix or IRC.
If you don't have an IRC client, you can join the room via [webchat](https://webchat.oftc.net/?randomnick=1&channels=feather).
If you don’t receive a response immediately please idle in the room.

## Release Builds

To learn how to run a bootstrappable release build, see: [contrib/guix/README.md](https://github.com/feather-wallet/feather/blob/master/contrib/guix/README.md)

For release attestations, see the [feather-sigs](http://github.com/feather-wallet/feather-sigs) repo.
https://github.com/user-attachments/assets/b7871a2f-21d0-46e2-b575-b9ba885a810d

For release policy, see: [RELEASE.md](https://github.com/feather-wallet/feather/blob/master/RELEASE.md)

Expand Down
25 changes: 25 additions & 0 deletions contrib/depends/packages/libarchive.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package=libarchive
$(package)_version=3.7.4
$(package)_download_path=https://github.com/libarchive/libarchive/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.xz
$(package)_sha256_hash=f887755c434a736a609cbd28d87ddbfbe9d6a3bb5b703c22c02f6af80a802735

define $(package)_config_cmds
CC="$($(package)_cc)" \
CXX="$($(package)_cxx)" \
AR="$($(package)_ar)" \
RANLIB="$($(package)_ranlib)" \
LIBTOOL="$($(package)_libtool)" \
LDLAGS="$($(package)_ldflags)" \
CFLAGS="-fPIE" \
CXXFLAGS="-fPIE" \
./configure --host=$(host) --enable-static --prefix=$(host_prefix) --without-iconv
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved
endef

define $(package)_build_cmds
$(MAKE)
endef

define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
8 changes: 4 additions & 4 deletions contrib/depends/packages/packages.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
packages := boost openssl unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp
packages := boost openssl unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp libarchive
native_packages := native_qt native_abseil native_protobuf

linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
linux_native_packages =

x86_64_linux_packages := flatstart

darwin_packages :=
darwin_packages :=
darwin_native_packages = darwin_sdk native_cctools native_libtapi

mingw32_packages =
Expand All @@ -18,4 +18,4 @@ qt_mingw32_packages := qt

tor_linux_packages := libevent tor_linux
tor_darwin_packages := tor_darwin
tor_mingw32_packages := tor_mingw32
tor_mingw32_packages := tor_mingw32
3 changes: 3 additions & 0 deletions contrib/depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
SET(TOR_DIR @prefix@/Tor CACHE STRING "Tor dir")
SET(TOR_VERSION @tor_version@ CACHE STRING "Tor version")

SET(LibArchive_LIBRARIES @prefix@/lib/libarchive.a)
SET(LibArchive_INCLUDE_DIR @prefix@/include/)

SET(Readline_ROOT_DIR @prefix@)
SET(Readline_INCLUDE_DIR @prefix@/include)
SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
Expand Down
3 changes: 3 additions & 0 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
((gnu packages gettext) #:select (gettext-minimal))
(gnu packages gperf)
((gnu packages installers) #:select (nsis-x86_64))
(gnu packages backup)
((gnu packages libusb) #:select (libplist))
((gnu packages linux) #:select (linux-libre-headers-6.1 util-linux))
(gnu packages llvm)
Expand Down Expand Up @@ -303,6 +304,8 @@ chain for " target " development."))
python-minimal
;; Git
git-minimal
;; Libarchive
libarchive
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved
;; Xcb
xcb-util
xcb-util-cursor
Expand Down
1 change: 0 additions & 1 deletion external/feather-docs
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved
Submodule feather-docs deleted from 4cad45
Empty file added external/feather-docs
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ if (WITH_SCANNER)
)
endif()

if (WITH_PLUGIN_ATOMIC)
FIND_PACKAGE(LibArchive REQUIRED)
INCLUDE_DIRECTORIES(${LibArchive_INCLUDE_DIR})
target_link_libraries(feather PRIVATE ${LibArchive_LIBRARIES})
endif()

if(STATIC AND APPLE)
target_link_libraries(feather PRIVATE Qt6::QDarwinCameraPermissionPlugin)
endif()
Expand Down Expand Up @@ -342,4 +348,4 @@ if(APPLE)
file(COPY "${CMAKE_SOURCE_DIR}/src/assets/images/appicons/appicon.icns" DESTINATION "${CMAKE_SOURCE_DIR}/installed/feather.app/Contents/Resources/" )
endif()

qt_finalize_executable(feather)
qt_finalize_executable(feather)
1 change: 1 addition & 0 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ MainWindow::MainWindow(WindowManager *windowManager, Wallet *wallet, QWidget *pa
this->restoreGeo();

this->initStatusBar();

this->initPlugins();
this->initWidgets();
this->initMenu();
Expand Down
1 change: 0 additions & 1 deletion src/ReceiveWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ void ReceiveWidget::updateQrCode(){

void ReceiveWidget::showQrCodeDialog() {
SubaddressRow* row = this->currentEntry();
if (!row) return;

QString address = this->getAddress(row->getRow());
QrCode qr(address, QrCode::Version::AUTO, QrCode::ErrorCorrectionLevel::HIGH);
Expand Down
2 changes: 2 additions & 0 deletions src/assets.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
<file>assets/images/file.png</file>
<file>assets/images/file_manager_32px.png</file>
<file>assets/images/gnome-calc.png</file>
<file>assets/images/atomic-icon.png</file>
<file>assets/images/hint-icon.png</file>
<file>assets/images/hd_32px.png</file>
<file>assets/images/history.png</file>
<file>assets/images/i2p.png</file>
Expand Down
Binary file added src/assets/images/atomic-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/hint-icon.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A svg file would be preferable. Perhaps you can find a similar one on https://www.svgrepo.com/ ?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/plugins/PluginRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "Plugin.h"
#include "utils/config.h"
#include "constants.h"

class PluginRegistry {
public:
Expand Down Expand Up @@ -35,7 +36,7 @@ class PluginRegistry {
}

bool isPluginEnabled(const QString &id) {
if (!pluginMap.contains(id)) {
if (!pluginMap.contains(id) or (QString::compare(id,"atomic")==0 && constants::networkType==NetworkType::TESTNET)) {
BrandyJSon marked this conversation as resolved.
Show resolved Hide resolved
return false;
}

Expand Down
Loading