Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Initial commit. Refactored to XZC
Browse files Browse the repository at this point in the history
  • Loading branch information
sn-ntu committed Feb 18, 2018
1 parent c9ffe8d commit 727b459
Show file tree
Hide file tree
Showing 184 changed files with 8,711 additions and 9,263 deletions.
4 changes: 3 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ Genjix - Porting pro-mode functionality to lite-gui and worked on server
Slush - Work on the server. Designed the original Stratum spec.
Julian Toash (Tuxavant) - Various fixes to the client.
rdymac - Website and translations.
kyuupichan - Miscellaneous.
kyuupichan - Miscellaneous.
pooler - Litecoin port.
sn-ntu - Zcoin port.
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<array>
<dict>
<key>CFBundleURLName</key>
<string>bitcoin</string>
<string>zcoin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bitcoin</string>
<string>zcoin</string>
</array>
</dict>
</array>
Expand Down
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include LICENCE RELEASE-NOTES AUTHORS
include README.rst
include electrum.conf.sample
include electrum.desktop
include electrum-xzc.conf.sample
include electrum-xzc.desktop
include *.py
include electrum
include electrum-xzc
recursive-include lib *.py
recursive-include gui *.py
recursive-include plugins *.py
Expand Down
53 changes: 33 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
Electrum - Lightweight Bitcoin client
=====================================
Electrum-XZC - Lightweight Zcoin client
=======================================

::

Licence: MIT Licence
Author: Thomas Voegtlin
Original Author: Thomas Voegtlin
Port Maintainer: Pooler, SN
Language: Python
Homepage: https://electrum.org/


.. image:: https://travis-ci.org/spesmilo/electrum.svg?branch=master
:target: https://travis-ci.org/spesmilo/electrum
:alt: Build Status
.. image:: https://coveralls.io/repos/github/spesmilo/electrum/badge.svg?branch=master
:target: https://coveralls.io/github/spesmilo/electrum?branch=master
:alt: Test coverage statistics
Homepage: https://electrum.zcoin.io/



Expand All @@ -34,7 +27,7 @@ Electrum from its root directory, without installing it on your
system; all the python dependencies are included in the 'packages'
directory. To run Electrum from its root directory, just do::

./electrum
./electrum-xzc

You can also install Electrum on your system, by running this command::

Expand All @@ -53,28 +46,47 @@ Version".
Development version
===================

ElectrumX developer decided to use newer Python 3 which isn't installed on many operating systems by default. Let's install it manually::

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update && sudo apt-get install python3.6 python3.6-dev python3-pip python3-pyqt5

To make python3 use the new installed python 3.6 instead of the default 3.5 release, run following 3 commands::

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3

Install dependencies::

sudo apt-get install pyqt5-dev-tools protobuf-compiler python-requests gettext
pip3 install --upgrade pip setuptools wheel

Check out the code from Github::

git clone git://github.com/spesmilo/electrum.git
cd electrum
git clone git://github.com/sn-ntu/electrum-xzc.git
cd electrum-xzc

Install lyra2z lib::

cd ./exlib/lyra2z-py/
sudo python3 setup.py install
cd ../../

Run install (this should install dependencies)::

python3 setup.py install

Compile the icons file for Qt::

sudo apt-get install pyqt5-dev-tools
pyrcc5 icons.qrc -o gui/qt/icons_rc.py

Compile the protobuf description file::

sudo apt-get install protobuf-compiler
protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto

Create translations (optional)::

sudo apt-get install python-requests gettext
./contrib/make_locale


Expand All @@ -93,12 +105,13 @@ This directory contains the python dependencies used by Electrum.
Mac OS X / macOS
--------

See `contrib/build-osx/`.
See `contrib/build-osx/README`.


Windows
-------

See `contrib/build-wine/`.
See `contrib/build-wine/README` file.


Android
Expand Down
47 changes: 0 additions & 47 deletions RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
# Release 3.1 - (to be released)

* Mempory pool based fee estimates. If this option is activated,
users can set transaction fees that target a desired depth in the
memory pool. This feature might be controversial, because miners
could conspire and fill the memory pool with expensive transactions
that never get mined. However, our current time-based fee estimates
results in sticky fees, which cause inexperienced users to overpay,
while more advanced users visit (and trust) websites that display
memorypool data, and set their fee accordingly.
* Local transactions: Transactions that have not been broadcasted can
be saved in the wallet file, and their outputs can be used in
subsequent transactions. Transactions that disapear from the memory
pool stay in the wallet, and can be rebroadcasted. This feature can
be combined with cold storage, to create several transactions
before broadcasting.
* The initial headers download was replaced with hardcoded
checkpoints, one per retargeting period. Past headers are
downloaded when needed.
* The two coin selection policies have been merged, and the policy
choice was removed from preferences. Previously, the 'privacy'
policy has been unusable because it was was not prioritizing
confirmed coins.
* The 'Send' tab of the Qt GUI displays how transaction fees are
computed from transaction size.
* RBF is enabled by default. This might cause some issues with
merchants that use wallets that do not display RBF transactions
until they are confirmed.
* Watching-only wallets and hardware wallets can be encrypted.
* Semi-automated crash reporting
* The SSL checkbox option was removed from the GUI.
* Capital gains: For each outgoing transaction, the difference
between the acquisition and liquidation prices of outgoing coins is
displayed in the wallet history. By default, historical exchange
rates are used to compute acquisition and liquidation prices. These
value can also be entered manually, in order to match the actual
price realized by the user. The order of liquidation of coins is
the natural order defined by the blockchain; this results in
capital gain values that are invariant to changes in the set of
addresses that are in the wallet. Any other ordering strategy (such
as FIFO, LIFO) would result in capital gain values that depend on
the set of addresses in the wallet.


# Release 3.0.6 :
* Fix transaction parsing bug #3788

# Release 3.0.5 : (Security update)

This is a follow-up to the 3.0.4 release, which did not completely fix
Expand Down
27 changes: 13 additions & 14 deletions contrib/build-wine/build-electrum-git.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

NAME_ROOT=electrum
NAME_ROOT=electrum-xzc
PYTHON_VERSION=3.5.4

# These settings probably don't need any change
Expand All @@ -18,27 +18,27 @@ set -e

cd tmp

for repo in electrum electrum-locale electrum-icons; do
for repo in electrum-xzc electrum-xzc-locale electrum-xzc-icons; do
if [ -d $repo ]; then
cd $repo
git pull
git checkout master
cd ..
else
URL=https://github.com/spesmilo/$repo.git
URL=https://github.com/sn-ntu/$repo.git
git clone -b master $URL $repo
fi
done

pushd electrum-locale
pushd electrum-xzc-locale
for i in ./locale/*; do
dir=$i/LC_MESSAGES
mkdir -p $dir
msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
done
popd

pushd electrum
pushd electrum-xzc
if [ ! -z "$1" ]; then
git checkout $1
fi
Expand All @@ -48,17 +48,16 @@ echo "Last commit: $VERSION"
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
popd

rm -rf $WINEPREFIX/drive_c/electrum
cp -r electrum $WINEPREFIX/drive_c/electrum
cp electrum/LICENCE .
cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
rm -rf $WINEPREFIX/drive_c/electrum-xzc
cp -r electrum-xzc $WINEPREFIX/drive_c/electrum-xzc
cp electrum-xzc/LICENCE .
cp -r electrum-xzc-locale/locale $WINEPREFIX/drive_c/electrum-xzc/lib/
cp electrum-xzc-icons/icons_rc.py $WINEPREFIX/drive_c/electrum-xzc/gui/qt/

# Install frozen dependencies
$PYTHON -m pip install -r ../../deterministic-build/requirements.txt
$PYTHON -m pip install -r ../../deterministic-build/requirements-hw.txt
$PYTHON -m pip install -r ../../requirements.txt

pushd $WINEPREFIX/drive_c/electrum
pushd $WINEPREFIX/drive_c/electrum-xzc
$PYTHON setup.py install
popd

Expand All @@ -79,7 +78,7 @@ popd
wine "$WINEPREFIX/drive_c/Program Files (x86)/NSIS/makensis.exe" /DPRODUCT_VERSION=$VERSION electrum.nsi

cd dist
mv electrum-setup.exe $NAME_ROOT-$VERSION-setup.exe
mv electrum-xzc-setup.exe $NAME_ROOT-$VERSION-setup.exe
cd ..

echo "Done."
Expand Down
4 changes: 3 additions & 1 deletion contrib/build-wine/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ echo "Clearing $here/build and $here/dist..."
rm "$here"/build/* -rf
rm "$here"/dist/* -rf

$here/prepare-wine.sh || exit 1
$here/prepare-wine.sh && \
$here/prepare-pyinstaller.sh && \
$here/prepare-hw.sh || exit 1

echo "Resetting modification time in C:\Python..."
# (Because of some bugs in pyinstaller)
Expand Down
30 changes: 16 additions & 14 deletions contrib/build-wine/deterministic.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,38 @@ else:
raise BaseException('no name')


home = 'C:\\electrum\\'
home = 'C:\\electrum-xzc\\'

# see https://github.com/pyinstaller/pyinstaller/issues/2005
hiddenimports = []
hiddenimports += collect_submodules('trezorlib')
hiddenimports += collect_submodules('btchip')
hiddenimports += collect_submodules('keepkeylib')
hiddenimports += ['_scrypt']

datas = [
(home+'lib/currencies.json', 'electrum'),
(home+'lib/servers.json', 'electrum'),
(home+'lib/checkpoints.json', 'electrum'),
(home+'lib/servers_testnet.json', 'electrum'),
(home+'lib/checkpoints_testnet.json', 'electrum'),
(home+'lib/wordlist/english.txt', 'electrum/wordlist'),
(home+'lib/locale', 'electrum/locale'),
(home+'plugins', 'electrum_plugins'),
(home+'lib/currencies.json', 'electrum_xzc'),
(home+'lib/servers.json', 'electrum_xzc'),
(home+'lib/checkpoints.json', 'electrum_xzc'),
(home+'lib/servers_testnet.json', 'electrum_xzc'),
(home+'lib/checkpoints_testnet.json', 'electrum_xzc'),
(home+'lib/wordlist/english.txt', 'electrum_xzc/wordlist'),
(home+'lib/locale', 'electrum_xzc/locale'),
(home+'plugins', 'electrum_xzc_plugins'),
]
datas += collect_data_files('trezorlib')
datas += collect_data_files('btchip')
datas += collect_data_files('keepkeylib')

# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
a = Analysis([home+'electrum',
a = Analysis([home+'electrum-xzc',
home+'gui/qt/main_window.py',
home+'gui/text.py',
home+'lib/util.py',
home+'lib/wallet.py',
home+'lib/simple_config.py',
home+'lib/bitcoin.py',
home+'lib/blockchain.py',
home+'lib/dnssec.py',
home+'lib/commands.py',
home+'plugins/cosigner_pool/qt.py',
Expand Down Expand Up @@ -77,7 +79,7 @@ exe_standalone = EXE(
a.scripts,
a.binaries,
a.datas,
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name + ".exe"),
name=os.path.join('build\\pyi.win32\\electrum-xzc', cmdline_name + ".exe"),
debug=False,
strip=None,
upx=False,
Expand All @@ -90,7 +92,7 @@ exe_portable = EXE(
a.scripts,
a.binaries,
a.datas + [ ('is_portable', 'README.md', 'DATA' ) ],
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name + "-portable.exe"),
name=os.path.join('build\\pyi.win32\\electrum-xzc', cmdline_name + "-portable.exe"),
debug=False,
strip=None,
upx=False,
Expand All @@ -104,7 +106,7 @@ exe_dependent = EXE(
pyz,
a.scripts,
exclude_binaries=True,
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name),
name=os.path.join('build\\pyi.win32\\electrum-xzc', cmdline_name),
debug=False,
strip=None,
upx=False,
Expand All @@ -121,4 +123,4 @@ coll = COLLECT(
debug=False,
icon=home+'icons/electrum.ico',
console=False,
name=os.path.join('dist', 'electrum'))
name=os.path.join('dist', 'electrum-xzc'))
Loading

0 comments on commit 727b459

Please sign in to comment.