Giter Club home page Giter Club logo

desktop-wallet's Introduction

Alephium

codecov Discord

This repository contains the reference implementation of Alephium, a sharded blockchain that makes programmable money scalable and secure. For more information, please visit the wiki.

Overview

The protocol's innovations extend battle-tested ideas from Bitcoin and Ethereum:

  • BlockFlow algorithm based on UTXO model enables sharding and scalability for today (code + algorithm paper)
    • The first sharding algorithm that supports single-step cross-shard transactions, offering the same user experience as single chain
    • Simple and elegant PoW based sharding, does not rely on beacon chain
  • Stateful UTXO model combines the advantages of both eUTXO model and account model (see code, wiki to come)
    • Tokens are first-class citizens and UTXO-based, which are owned by users directly instead of contracts
    • Offer the same expressiveness as account model. DApps can be easily built on top of it with better security
    • Support multiple participants in a single smart contract transaction. Multiple calls can be packed into a single transaction too.
  • Novel VM design resolves many critical challenges of dApp platforms (see code, wiki to come)
    • Less IO intensive
    • Flash loan is not available by design
    • Eliminate many attack vectors of EVM, including unlimited authorization, double dip issue, reentrancy attack, etc
    • UTXO style fine-grained execution model reduces risk-free arbitrage
  • PoLW algorithm reduces the energy consumption of PoW in the long term (research paper)
    • Adaptive rewards based on hashrate and timestamp are designed and implemented
    • Internal mining cost through burning will be activated when hashrate and energy consumption is significantly high

Installation

Prerequisites

The following dependencies must be installed in order to run the JAR deliverable:

  • java (11+)

Running

You can obtain our latest single JAR distribution from the GitHub releases and start the application using the following command:

java -jar alephium-<VERSION>.jar

Build From Source

Requirements

In order to build the project from source the following dependencies must be installed on your system:

  • java (11+)
  • SBT

Single JAR

Use the following command to build a single runnable JAR :

make assembly

The resulting assembly file will appear in /app/target/scala-2.13/ directory.

Universal Zip distribution

Use the following command to build a zip distribution including launch scripts:

make package

The resulting package file will appear in the app/target/scala-2.13/universal directory.

Docker Image

Use the following command to build a docker image:

make docker

Configuration

You can define user specific settings in the file $ALEPHIUM_HOME/user.conf, where by default $ALEPHIUM_HOME points to ~/.alephium.

Testing

There are two kinds of tests:

  1. Unit tests and property based tests, which can be run with the make test command.
  2. Integration tests, which can be run with the make itest command.

Contribution

Have a look at our contribution guide described in CONTRIBUTING.md

Acknowledgements

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

desktop-wallet's People

Contributors

0xjac avatar aloiscochard avatar deathmumi avatar h0ngcha0 avatar iix avatar iwalkingcat avatar killerwhile avatar lbqds avatar leealephium avatar lessismore10 avatar lf94 avatar montaill avatar mvaivre avatar nop33 avatar polarker avatar redokazda avatar ross-weir avatar tdroxler avatar vdaodao avatar waldi28 avatar ykris45 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

desktop-wallet's Issues

UX improvements

The mainnet launch is DONE and we've successfully delivered all needed features.
Now is the time for some UX polish ✨

We're focusing on removing little inconsistencies, clearing confusions and giving a bit more control through advanced features.

New features

Bugs

Slf4jLogger started

Do we need to be concerned about the full node running this logger? It seems to be a hot topic these days.

Web extension: enable opening the wallet as a tab instead of a popup

When clicking the web extension toolbar icon it shows the wallet as a popup. Problem is that this popup is modal, so you can’t do anything else on the computer while the wallet is open; doing so will close the popup. It would be nice if there was a button to open the wallet as a browser tab.

Using alephium-wallet 0.10.2 in Firefox.

Click here to view screen recording

Screen recording demonstrating the problem

Discreet mode: obfuscate all amounts

When used in public, some users may like to hide amounts for privacy reason.

A discreet mode toggle situated in the top toolbar could automatically obfuscate all amounts (which could be replaced by stars "*") for instance.

Implement tests

src/pages/Wallet/WalletHomePage.tsx

  • Correctly fetches and displays latest balance and number of transactions on initial load
  • Correctly fetches and displays latest transactions on initial load
  • Snackbar is displayed when there is an error fetching initial data
  • Correctly updates balance and number of transactions when refresh button is pressed
  • Correctly fetches and displays latest transactions when refresh button is pressed
  • Snackbar is displayed when there is an error refreshing data
  • If there are pending transactions, ensure that it keeps fetching data every 2 seconds until no more pending transactions exist
  • The settings modal opens when clicking the settings button
  • The spinner is displayed while refreshing data
  • Clicking the "Show address" action button opens the correct modal
  • Clicking the "Send token" action button opens the correct modal
  • Clicking the "Lock account" action button locks the wallet
  • Correct footer message is displayed based on the number of transactions
  • "Load more" button fetches and displays the next page of transactions

Creating transaction

  • Displays a pending transaction in the list of transactions when a new one is created
  • Displays an error message if the address validation failed
  • Disables the submit button if there is no address
  • Disables the submit button if there is no amount
  • Disables the submit button if there is an error
  • Converts the amount into a qALPH string

Switching network settings

  • Transaction list gets updated when switching networks
  • Balance gets updated when switching networks
  • Number of transactions is updated when switching networks

Address page

  • Button to copy the address correctly copies the address and displays a success message
  • Clicking "Show in explorer" opens the correct link in the browser

Aggregate pending TXs per network

Previous pending TX are still displayed if the user switch from one network to another.
Either find a better way to fetch pending queries (best option, check with @tdroxler) or store pending TXs per network config.

Provide checksums of release binaries

It would be great if a checksum file could be provided alongside the binaries of releases to check the integrity of the files.

Ideally if the binaries could be signed as well, it would be awesome!

Improve the help menu

The help menu is empty 😞 (see screenshot below)
It would be nice to have:

  1. The wallet version
  2. A "Report a bug" link which points to a new issue on this repo (i.e. https://github.com/alephium/alephium-wallet/issues/new) to let users easily provide feedback
  3. Optionally a help/support link which points either to some documentation or to the discord chat

Also the "File" and especially the "Window" menus feel a bit useless and could be hidden.

2021-10-30-033016_1916x1056_scrot

Note: This is inspired by the MyCrypto desktop wallet help menu

Allow deriving new addresses

Users need to be able to derive multiple addresses, for multiple groups.
This will be especially useful when interacting with dApps.

Here are the 3 scenarios we foresee for address derivation:

  • Derive address in random group (by default)
  • Derive address in defined group
  • Derive one address per group (mining purposes)
    Derive address for defined path

Design

  • Create mockups (goal is to keep friction low, by hiding advanced features)

Other tasks

App is unresponsive when restarted with localhost services down (in dev mode)

Steps to reproduce:

  1. Start local services (node, miner, explorer-backend)
  2. Run the wallet app and set the network settings to "Localhost"
  3. Quit the app and all local services
  4. Restart the app

Error:

api-alephium.js:106 GET http://localhost:12973/infos/self-clique net::ERR_CONNECTION_REFUSED
HttpClient.customFetch @ api-alephium.js:106

api-alephium.js:106  Uncaught (in promise) TypeError: Failed to fetch
    at CliqueClient.HttpClient.customFetch

Dark theme

The explorer has a pretty dark theme. It would be nice if the wallet had a similar theme.

Make Gas configurable

Gas could be an advanced setting configurable in the "send transaction" modal.

This need to be designed, and validated with the backend team.

Ability to sign smart contracts' transactions (dApp interaction)

The main goal of this task is to open up the wallet to dApps interaction, the first of which being our voting demo app (PoC), followed by the future swap service.

The main "basic" feature needed is a signer: a way to validate and sign smart contract transactions.

In order to do that, we first wanted to "duplicate" the desktop wallet into a new browser extension, but other solutions exist and need to be discussed. Ideally, we would like to make our Desktop Wallet the go-to solution in order to keep our ecosystem accessible.

Let's use this issue to talk about the different approaches we can follow and their respective pros and cons.

cc/ @nop33 @lf94

Open the explorer in web browser by default

In the Electron app, when clicking a transaction, or when clicking “Show address → Show in explorer”, the explorer is opened in a separate Electron window. It would be nice to have an option to open it in the user’s web browser instead.

Packing the extension is broken (because of zip)

Trying to build the extension with npm run-script extension-pack fails for me with: sh: line 1: zip: command not found.

full log
$ npm run-script extension-pack

> [email protected] extension-pack
> rm alephium-wallet.zip; npm run-script extension-build && cd build && zip -r ../alephium-wallet.zip *


> [email protected] extension-build
> rm -rf build; INLINE_RUNTIME_CHUNK=false npm run-script build;  cp public/background.js public/manifest.json build


> [email protected] build
> cross-env REACT_APP_VERSION=$npm_package_version INLINE_RUNTIME_CHUNK=false react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  781.44 KB  build/static/js/2.dc6bb90c.chunk.js
  173.42 KB  build/static/js/main.84b8e747.chunk.js
  2.6 KB     build/static/css/2.05131dc2.chunk.css
  782 B      build/static/js/runtime-main.8cf0c569.js
  440 B      build/static/css/main.72438ba0.chunk.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

sh: line 1: zip: command not found

Looking at the npm run script:

rm alephium-wallet.zip; npm run-script extension-build && cd build && zip -r ../alephium-wallet.zip *

I think this is due to zip missing on my system.

I'd suggest switching from zip which can be missing on many systems, esp. Linux which uses tar/bsdtar by default to web-ext which is designed to build extensions.

Hopefully it is as straightforward as changing the above script to:

npm run-script extension-build && web-ext build --source-dir=build --artifacts-dir=. --filename=alephium-wallet.zip --overwrite-dest

and adding web-ext to devDependencies 😉

Let me know if you want a PR for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.