Silkaj v0.7.0 release: DuniterPy, click, transactions history, Debian, website¶
Six months after the previous major release, I am pleased to announce the release of Silkaj v0.7.0 for the thirteenth Free Currency Meeting.
This release comes with 157 commits, the migration to DuniterPy and Click, the display of transaction history, the packaging into Debian Buster and Ubuntu 19.04, and a new website.
Those two migrations bring few new features as the goal was to migrate to better libraries while keeping the same functionalities.
DuniterPy migration¶
DuniterPy is a Python library which implements methods to request from and send information to the Duniter nodes. It also has authentication methods to sign documents such as transactions and certifications. DuniterPy was initially written for the Sakia client. Silkaj and Sakia are now sharing the same common code. The migration to DuniterPy was tough, but it was worth it: It will allow the implementation of new features in future versions.
There were many challenges: keeping the same functionalities, making Silkaj’s code asynchronous, and replacing the authentication and the network code by the ones implemented in DuniterPy. One struggling issue was that the intermediaries transactions were no longer working, because, the equality method of the transaction output source was not implemented, as they used to be stored in a string and are now stored into an OutputSource
object. So, the equality had to be implemented.
Check-out DuniterPy versions from v0.50.0 to v0.54.1 to follow the evolution of DuniterPy. These versions were specially made for Silkaj. In the future, following functionalities are planned: sending identity, membership, and revocation documents, the usage of authentication methods implemented in DuniterPy, and the usage of the planned GVA API.
Click migration¶
Since Debian Buster freeze was going to happen very soon and commandlines
library wasn’t packaged into Debian, the migration to Click “Command Line Interface Creation Kit” had to be done quickly. I decided to migrate to this really nice library, since it is much more maintained, comes with a better code, and is less buggy. Here you can see the new command line interface:
Usage: silkaj [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
-v, --version Show the version and exit.
-p, --peer TEXT Default endpoint will reach Ğ1 currency with
`https://g1.duniter.org` endpoint. Custom endpoint
can be specified with `-p` option followed by
<domain>:<port>
-gt, --gtest ĞTest: `https://g1-test.duniter.org` endpoint
--auth-scrypt, --scrypt Scrypt authentication: default method
--nrp TEXT Scrypt parameters: defaults N,r,p: "4096,16,1"
-af, --auth-file Authentication file. Defaults to: './authfile'
--file TEXT Path file specification with '--auth-file'
[default: authfile]
--auth-seed, --seed Seed hexadecimal authentication
--auth-wif, --wif WIF and EWIF authentication methods
Commands:
about Display program information
argos Display currency information formatted for Argos or BitBar
authfile Generate authentication file
balance Get wallet balance
blocks Display blocks: default: 0 for current window size
cert Send certification
diffi Display the current Proof of Work difficulty level to generate...
history Display transaction history
id Find corresponding identity or pubkey from pubkey or identity
info Display information about currency
license Display Ğ1 license
net Display network view
tx Send transaction
wot Check received and sent certifications and consult the...
The command line interface has changed. General parameters (options and arguments) should be placed in between the command and the sub-command. Specific parameters should be placed after the sub-command.
For instance, in previous command --gtest
and --auth-file
are general parameters, where --amount
and --output
are specific parameters separated by tx
sub-command.
You can display general parameters with silkaj --help
and specific parameters with silkaj tx --help
for instance.
CLI changes¶
issuers
,amount
, andgenerate_auth_file
commands have been respectively renamed toblocks
,balance
, andauthfile
.- The long sub-commands
certification
,transaction
,network
,identities
have been removed. Now the small ones have to be used:cert
,tx
,net
,id
. blocks
defaults to0
which stands for the current windows size and now has a limit of 5.000 blocks as set by BMA.balance
: public keys separator does no longer use colons:
, it uses spaces instead.- Additionally, there are the new smaller authentication options:
--scrypt
,-af
,--seed
,--wif
, without the--auth
prefix.
You might discover other breaking changes. For more details regarding these changes check out this list.
Transaction history¶
It is now possible to display the transactions history of a wallet:
silkaj history GfKERHnJTYzKhKUma5h1uWhetbA8yHKymhVH2raf2aCP --uids
Transactions history from: moul GfKERHnJTYzKhKUma5h1uWhetbA8yHKymhVH2raf2aCP
Current balance: 17296.86 Ğ1, 1717.66 UD Ğ1 on the 2019-05-12 13:32:30
+---------------------+------------------------+------------+--------------+-----------------------+
| Date | Issuers/Recipients | Amounts Ğ1 | Amounts UDĞ1 | Comment |
+=====================+========================+============+==============+=======================+
| 2019-04-23 21:31:27 | CvrMiUhAJpNyX5sdAy | 100.700 | 10 | Silkaj sur Ubuntu c |
| | | | | est une tres belle |
| | | | | surprise. Merci ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-22 18:59:34 | HugoTrentesaux - | 100.700 | 10 | Merci pour Duniter |
| | 55oM6F9ZE2MGi | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 14:35:15 | ArthurLutz - | 200 | 19.861 | pour les paquets |
| | 4C4jsvxmFQBoH | | | yunohost ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 10:40:11 | SonqoZEfZXHDBxi4Kx | 30.210 | 3 | [G1SMS] VIREMENT 300 |
| | | | | LOVE (30.21 G1) |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 08:04:58 | fbuland - | 200 | 19.861 | merci resolution bug |
| | 4bD7J3uA5pH2N | | | |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-13 16:37:20 | Vivakvo - | 100.700 | 10 | Merci pour Duniter |
| | 4wUdA1dx1NCZU | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-12 08:59:04 | C4pUj26pVgPVPLEZ96 | 50 | 4.965 | Bravo pour le bug |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 16:48:04 | 73ArdqtsQScypV35H4 | 100.700 | 10 | Merci pour Duniter |
| | | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 15:58:06 | Lucas - HY2nJUyxpzyrw | 100.700 | 10 | Merci pour Duniter |
| | | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 15:10:25 | BenoitLavenier - | 100.700 | 10 | Merci pour Duniter |
| | 38MEAZN68Pz1D | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 14:11:00 | 4sfQWXBBy811CCDV6J | 100.700 | 10 | 1.7.16 |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 22:59:00 | elois - D9D2zaJoWYWve | 100 | 9.930 | merci pour le debug |
| | | | | de duniter et du |
| | | | | process de release |
| | | | | aussi |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 21:51:41 | Matograine - | 100.700 | 10 | V1.7.16 |
| | CmFKubyqbmJWb | | | |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 01:18:44 | cgeek - 2ny7YAdmzReQx | 1007 | 100 | Duniter v1.7.16 |
+---------------------+------------------------+------------+--------------+-----------------------+
Debian and Ubuntu package¶
Silkaj v0.6.5 was packaged for Debian Buster v10, which is planned te be released on July 6th 2019. This package greatly benefits all Debian-based distributions. Moreover, Silkaj was also added into Ubuntu 19.04 repository, which was published on March 2019. For more details check-out where Silkaj was included into the Debian-based distributions. Silkaj v0.6.5 now comes with Click migration, auto-completion, and bug fixes, however it does not include DuniterPy migration and v0.7.0 features.
You can install Silkaj with following command:
This work have been made possible thanks to jonas, a Debian developer.
Proof-of-Work difficulty level¶
Since we are using DuniterPy which includes WebSocket management, this latter can be used to improve the network connection. Previously, Silkaj was sending queries every five seconds to check if a new block was added to the blockchain. Now, Silkaj gets a notification every time a new block is appended to the blockchain. This improvement dramatically reduces traffic network.
To better monitor the network, the header was improved and now displays current block’s number and its date of generation:
Current block: n°219981, generated on the 2019-05-12 14:36:35
Generation of next block n°219982 possible by at least 31/44 members
Common Proof-of-Work difficulty level: 89, hash starting with `00000[0-6]*`
New website¶
At the beginning of the project, a simple website was made. Since then, Silkaj evolved and have brought new features which should be reflected on the website.
More content was added to the website, which now has three pages: a main one, one for the features and the other one for the installation.
Attilax worked to give the website a new black style, to make it looks like a terminal. He also translated it in French which makes the website available in two languages.
Thanks¶
Attilax, Bernard, cebash, jonas, matograine, vit
Install and upgrade¶
Future development cycles¶
Future releases will add new features based on DuniterPy such as new authentication methods as well as being able to send WoT documents: identity publication, membership publication and renewal, and revocation. It is also planned to use features brought by Click usage, to set-up a CI/CD pipeline, and locking the code with tests.
Contribute¶
If you are pleased with the achievement, please contribute by reporting bugs, contributing to the code or giving to Duniter developers libre units to improve our little world.