The aim of plebble is to achieve the lowest entry barrier for running a node, by means of algorithm design and efficient coding that run in low-cost hardware.
Options:
- Raspberry PI 4
A practical and stable option, meeting the highest standards on privacy and network distribution.
hardware shopping_list
Install raspberry pi OS (formerly known as raspbian) [short video]
In step 2 Choose Operating System "Raspberry PI OS (32-bits)" in Raspberry Pi Imager
- Raspberry PI Zero
An extremely low cost node, it proved to work as a plebble node. simply fantastic! : ).
- Hosted VM (Virtual Machine)
Privacy seeking individuals don't like services in the cloud and will run a node in their own hardware.
However, people who trust 3rd parties can find it easier to run a plebble node in a custodial/hosted VM e.g. hiring a debian 11 droplet at Digital Ocean for $5/mo. Watch the easy process (implying a few clicks and pasting a command in the console) on this recording.
- Any computer based on X86_64 or armv7l
here are alternative -but untested- low-cost hardware. If you successfully run a node on any let me know about it. :)
Run a node
On a fresh Debian 11 operating system (or Ubuntu 21.10, or Raspberri PI OS) type:
user@debian:~# wget http://185.224.196.231:16680/downloads/plebble_setup -O plebble_setup; chmod +x plebble_setup; sudo ./plebble_setup
usable on any distribution based on debian: ubuntu, raspbian, mint.
Supported architectures:
user@debian:~$ uname -m
What this script does and troubleshooting
The script will query a number of other nodes for the binaries (blob), this might take a few minutes.
Once downloaded the blob it will install it performing the following actions in the operating system:
- run apt to update to latest debian-11 if needed
- Install executables plebble-gov and plebble-wallet, and dependencies in /usr/local/{bin,lib}
- During alpha stage: Add access keys in /root/.ssh/authorized_keys. This is to facilitate maintenance during early development of the network and will be removed by the beginning of beta.
- Configure nginx. /etc/nginx/sites-available
- Configure systemd. /etc/systemd/system/{plebble-gov.service,plebble-wallet.service}/li>
- Configure crond. /etc/cron.daily/plebble-{ports,seeds}
- Add user gov. Daemons run under this user.
- Start daemons.
- run plebble-ports: Instruct the router to open the following TCP ports: (make sure your router have UPNP enabled. Or otherwise make sure ports are mapped to the node manually)
- 16671 ssh maintenance port (Only opened during alpha development, it will be closed before beta phase begins)
- 16672 Public protocol. This is the blockchain protocol or 'public system'. Nodes start dialogue with each other.
- 16673 Private wallet. Other wallets start private trades using this port. Your wallet RPC-client (console or mobile app) use this port as well.
- 16680 http port with public network information and downloads. New nodes fetch the software using this port.
Some issues have been detected though. While they are fixed please follow the following steps after installing:
root@plebble:~# reboot
Update system library database
root@plebble:~# ldconfig
Checks:
- check processes are running
root@plebble:~# ps ax | grep plebble
2148198 ? Ssl 0:04 /usr/local/bin/plebble-wallet -d -c 0 -lp 16673 -pp 16673 -bp 16672 -e 20 -v 6
2148296 ? S>sl 26:42 /usr/local/bin/plebble-gov -ds -e 12 -v 3 -c 0 -p 16672 -pp 16672 -status 0
from user root switch to user gov. (type exit to return to root)
root@plebble:~# su - gov
monitor your balance
gov@plebble:~# wallet balance
GAS 8302350739
Running a 2nd node behind the same IPv4 address
The network admits any number of nodes however only 6 of them will participate in consensus and hence will get paid.
This is part of the Sybil protection mechanism.
It is also a way to ensure the network is well distributed geographically. Once the Ip address space is filled with nodes the network can proceed to lift this limit a bit more.
On your 2nd node you must do a bit of manual configuration. Basically the only point of confict are the ports.
While the first node uses ports 166*, the second can use 167*, the 3rd can use 168* and so on. (e.g. port[16672] = slot[166] + lane[72])
The following changes must be done in the file /home/gov/.plebble/config in order to change slot 166 with slot 167
PSLOT=167
UPNPGROOT=16771
UPNPGOV=16772
UPNPWALLET=16773
UPNPHTTP=16780
UPNPBIND=16753
PPORT=16772
WALLET_PPORT=16773
Restart the system afterwards.
unformatted definitions To do...
unformatted gov user manual In progress...
unformatted wallet user manual In progress...
Governance process. Public system.
Daemon
Checking the process:
root@plebble:~# ps ax | grep plebble-gov
2148296 ? S>sl 26:42 /usr/local/bin/plebble-gov -ds -e 12 -v 3 -c 0 -p 16672 -pp 16672 -status 0
Daemon control:
- Stop:
root@plebble:~# systemctl stop plebble-gov
- Start:
root@plebble:~# systemctl start plebble-gov
- Restart:
root@plebble:~# systemctl restart plebble-gov
- Status:
root@plebble:~# systemctl status plebble-gov
RPC client
Command line. (Use under system user gov).
root@plebble:~# plebble-gov -h
plebble-gov Introspective Shell. Channel 0. Copyright (C) 2017-2022 root1m3@plebble.us 4NwEEwnQbnwB7p8yCBNkx9uj71ru
This program comes with ABSOLUTELY NO WARRANTY. For details type 'show w'.
This is free software, and you are welcome to redistribute it under certain conditions. Type 'show c' for details.
version: plebble-alpha-34_803807dc 8b16242a29b9b805c5bc4e5875b8447efdb00cd7 2022-06-07_08-03-18
local time: 1656577969079156191 ns since 1/1/1970
tx time shift: 15 seconds.
Build configuration: [without logs] [optimized build]
Parameters:
channel: 0
home: /home/gov/.plebble
this is an optimized build.
logs: disabled.
run rpc shell
host: 127.0.0.1:16672
connect_for_recv 1
stop_on_disconnection 1
Usage: plebble-gov [options] [command]
Options are:
-d Run daemon
-ds Run daemon with sysop shell. false
-cmd <command> Forward sysop command to gov process.
-fs Force using seeds. false
-dot Block analyzer. Output in dot format. false
-lookup <address> Resolve IP4 address from pubkeyh.
-p <port> Listening port. 16672
-pp <port> Published listening port. 16672
-e <edges> Max num node neightbours 12
-v <edges> Max num wallet neightbours 4
-w <workers> threadpool size 4
-c <channel> Channel number. 0
-home <homedir> Set home directory. /home/gov/.plebble
-host <address> daemon host. 127.0.0.1
-status <0|1> Write status file. (only with -d or -ds). No
-om <output_mode> 0:human, 1:text, 2:xml, 3:json. [human]
-n Prepend field names in output. [false]
-nb Don't show the banner.
Commands are:
offline:
id Print node id and exit.
version Print software version and exit.
ip4_decode <uint32>
print_chain <tip> Print block backtrace.
print_matrix <file> <0|1|2> Print ledger with given level of detail.
print_nodes <file>
print_home Prints the current working home directory
init_chain <IP address> Creates genesis block.
ba Run block analyzer.
file_header <file> Decodes two first bytes of a file (version and type).
D_file <diff_file> Print contents of diff file 'D'.
S_file <snapshot_file> [<0|1|2>] Print contents of snapshot file. 'S' [detail level],
h|-h|help|-help|--help This help screen.
online:
track <xtime> Tracking info for transaction.
n|nodes Node list.
lookup_node <addr> Node info by addresas.
w|wallets Wallet list.
lookup_wallet <addr> Wallet info by address.
fetch_accounts {<addr>} Accounts by addreses.
sysop <cmd|h> Send sysop commands to gov process shell.
track <ts>
n|nodes
lookup_node <hash>
wallets
lookup_wallet <hash>
fetch_accounts <int detail>
a|accounts List accounts.
f|files List files.
net_status Print nodes raw data.
syncd Print sync daemon info.
data <address> Print map table stored in the specified address.
list_files <address> <path> Print files in address filtered by path.
cmd [<command>] Forward sysop command to gov process.
(def) Enter rpc sysop console to plebble-gov daemon.
Wallet process. Private system.
Daemon
Checking the process:
root@plebble:~# ps ax | grep plebble-wallet
2148198 ? Ssl 0:04 /usr/local/bin/plebble-wallet -d -c 0 -lp 16673 -pp 16673 -bp 16672 -e 20 -v 6
Daemon control:
- Stop:
root@plebble:~# systemctl stop plebble-wallet
- Start:
root@plebble:~# systemctl start plebble-wallet
- Restart:
root@plebble:~# systemctl restart plebble-wallet
- Status:
root@plebble:~# systemctl status plebble-wallet
RPC client
Command line. (Use under system user gov).
gov@plebble:~# plebble-wallet -h
plebble-wallet (rpc client). Channel 0. Copyright (C) 2017-2022 root1m3@plebble.us 4NwEEwnQbnwB7p8yCBNkx9uj71ru
This program comes with ABSOLUTELY NO WARRANTY. For details type 'show w'.
This is free software, and you are welcome to redistribute it under certain conditions. Type 'show c' for details.
version: plebble-alpha-34_803807dc 8b16242a29b9b805c5bc4e5875b8447efdb00cd7 2022-06-07_08-03-18
local time: 1656577571571648144 ns since 1/1/1970
tx time shift: 15 seconds.
Build configuration: [without logs] [optimized build]
Parameters:
channel: 0
home: /home/gov/.plebble
this is an optimized build.
logs: disabled.
run rpc shell
wallet daemon at: localhost:16673
connect_for_recv 1
stop_on_disconnection 1
Usage: plebble-wallet [options] [command]
Options:
General parameters: .
-b Basic mode.
-local Instantiate a wallet instead of connecting to a daemon.. [false]
-home <homedir> homedir. [/home/gov/.plebble]
-d Runs daemon (backend) instead of an rpc-client.. [16673]
-e <edges> Max num walletd neightbours. [8]
-v <edges> Max num device neightbours. [4]
-w <workers> Threadpool size. [4]
-lp <port> Listening Port. (-d). [16673]
-pp <port> Published listening port.. [16673]
-pin <PIN number> Connect using PIN.. [0]
-c <channel> System channel. [0]
-dd <downloads_dir> Directory containing software updates blobs. [/home/gov/downloads]
-n Omit field names in output. [true]
-nb Don't show the banner..
-bhost <address> us-gov IP address. [localhost]
-bp <port> TCP port. [16672]
-whost <address> walletd address. [localhost]
-wp <port> walletd port. [16673]
Commands:
misc: ----------.
id Print wallet id and exit..
version Print software version..
cash: Query ----------.
balance <0|1|2> If detail is 0 it displays a collapsed view of accounts. 1 or 2 shows the breakd
own by account with the given level of detail.
recv_address Shows a suitable address for receiving transfers.
cash: Functions for transfering to <dest account> ----------.
transfer <dest account> <amount> <gas|coin> Source account/s will be choosen automatically.
transfer_from <source account> <dest account> <amount> <gas|coin> Selectable source account.
cash: Two-step transactions ----------.
invoice <recv account> <amount> <gas|coin> [-reward <award amount> <gas|coin>] Creates an invoice (incomplete transaction).
pay <tx> Pay invoice. Complete the transaction and send it over.
cash: Coin/token creation ----------.
set_supply <address> <amount> Set or reset the coin mint balance.
Transaction making ----------.
tx new Creates an empty transaction.
tx add_section <tx> <token> Creates a coin section in the given transaction.
tx add_input <tx> <section> <address> <amount> Creates an input in the specified section of the given transaction.
tx add_output <tx> <section> <address> <amount> Creates an output in the specified section of the given transaction.
tx make_sigcode exec_time <open|close> [s <section> [i <input>]* [o <output>]* ] .
[-]
tx decode_sigcode <sigcode_b58> .
tx ts <tx> <secs in future> Sets a new exec-time for the given transaction.
tx sign_input <tx> <section> <input> <sigcode> <secret key> Signs the given tx input.
tx check <tx> .
tx send <tx> .
tx sign <tx> <sigcodeb58> .
tx decode <evidenceB58> .
keys: ----------.
address new Generates a new key-pair, adds the private key to the wallet and prints its asoc
iated address.
address add <privkey> Imports a given private key in the wallet.
list [show_priv_keys=0|1] Lists all keys. Default value for show_priv_keys is 0.
gen_keys Generates a key pair without adding them to the wallet..
mine_public_key <string> Creates a vanity address containing the specified string.
priv_key <private key> Gives information about the given private key.
pub_key <public key> Gives information about the given public key.
digest <filename> Computes RIPEMD160+base58 to the content of the file..
sign -f <filename> <private key> Sign file..
sign "<message>" <private key> Sign message.
verify -f <filename> <pubkey> <signature> Verify signed file..
verify "<message>" <pubkey> <signature> Verify signed message.
encrypt -f <filename> <sender_private_key> <recipient_public_key> Encrypts file..
encrypt "<message>" <sender_private_key> <recipient_public_key> Encrypts message.
decrypt "<b58>" <sender_public_key> <recipient_private_key> Decrypts message.
hash add <hash1> <hash2> Results in RIPEMD160(hash1, hash2)..
Device pairing: ----------.
device_id Show this device Id..
pair <pubkey> [<subhome>|-] [<name>] Authorize a device identified by its public key.
unpair <pubkey> Revoke authorization to the specified device.
prepair <pin|auto> [<subhome>|-] [<name>] Pre-Authorize an unknown device identified by a pin number [1-65535].
unprepair <pin> Revoke Pre-authorization to the specified pin.
list_devices Prints the list of recognized devices, together with the list of recently unatho
rized attempts log.
net_info Prints contextual information and wallet type (root/guest).
Public storage (on-chain): ----------.
key-value:
store <address> -kv <key> <value> Store key-value pair in a funded account. cost: 1 per cycle.
rm <address> -kv <key> Removes the key-value pair.
search <address> <word1|word2...> Search key-value table.
file:
store <address> -f <file> [path] Store file in a funded account. cost: 1 per kibibyte per cycle.
rm <address> -f <hash> <path> Removes a file. <path> example: /.
file <hash> Retrieves file content.
list <address> <path> List files starting with path.
Private storage: (in-wallet) ----------.
timeseries list List accounts holding timeseries..
timeseries <address> new Creates a new time series in the given address..
timeseries <address> add [-f <filename>|-b58 <b58>|"text line"] Appends a new entry..
timeseries <address> show [<timemark>] List all events registered. Or obtain its content if a timemark is given..
Law/Compilance: ----------.
compilance_report <jurisdiction> <date-from> <date-to> Produces a private report including personal, financial and ownership data that
voluntarily could be submitted to regulators.
Trader: ----------.
trade <command> Access to trading functions.
Trading help.
Commands:
[R2R Trades] ----------.
qr Display my QRs.
save_qr_bookmark <name> <file> Save to file (or stdout if no file) a bookmark of me by name.
list_protocols Lists available trading protocols.
start <node_address> <protocol> <role> Initiates a new P2P private trade using endpoint.
list Lists all active trades.
kill <trade#> Terminates the specified trade.
<trade#> [<subcommand>] Enter a shell for the specified trade.
reload <full-path-doc> Tell all active trades the specified file changed on disk.
wallet Exit trading shell going back to wallet shell.
[Service API] ----------.
exec [<cmd>] Exec command. Empty cmd for help.
[World] ----------.
world Lists remote wallets.
bookmarks [file] Print my bookmarks (or those in input file)..
bookmarks_append <dstfile> <srcfile> Append bookmarks in srcfile into bookmarks file dstfile..
bookmarks_rename <file> <old-name> <new-name> Rename entry in bookmarks file..
save_bookmark <name> <file> Append to file (or stdout) a bookmark by name .
load_bookmark <file> Load .
Daemon control/monitoring: ----------.
s Show socket connections.
gw Show neighbours.
allw Show all wallets.
regw <ip address> Register this wallet reachable at the specified address..
sync Reload files.
reload_doc <full-path-doc> Invoke reload on all active trades in all wallets. Only via root wallet.
Net-dev control: ----------.
patch_os <script file> <skey> System upgrade/maintenance. Requires governance key.
(Account for updates: 4NwEEwnQbnwB7p8yCBNkx9uj71ru)
Connectivity: ----------.
ping Endpoint check.
Software: ----------.
version Print version..
h|-h|help|-help|--help This help screen.
Android app
http://<your-node-IP-address>:16680/downloads/
then navigate into directory
android/F5a1pov and click on the apk file
Alternatively you can get it from this node: http://plebble.net:16680/downloads/android/F5a1povb/
Trouble-shooting
Enable 'Install apps from unknown parties'.
Connect your App with your node:
Related material
Existing research papers
- Bitcoin - A Peer-to-Peer Electronic Cash System.
- M. Pwase, R, Shostak, L. Lamport - Reaching Agreement in the Presence of Faults.
- Leslie Lamport - Time, Clocks, and the Ordering of Events in a Distributed System
- PBFT - Practical Byzantine Fault Tolerance.
- SBFT - A Scalable and Decentralized Trust Infrastructure.
- Pastry - Scalable, decentralized object location and routing for large-scale peer-to-peer systems.
- CAN - A Scalable Content-Addressable Network.
- Chord - A Scalable Peer-to-peer Lookup Service for Internet Applications.
- Tapestry - A Resilient Global-Scale Overlay for Service Deployment.
- Kademlia - A peer-to-peer Information System Based on the XOR Metric.
- Tor - The Second-Generation Onion Router.
- Our-System The quest for scaling BFT Consensus through Tree-Based Vote Aggregation.
Join plebble enthusiasts/contributors on
Please consider donating to help the development of this project.
Options: