Tuesday, 26 September 2017

useful crypto links

The following is a list of some prefixes which are in use in the reference Bitcoin codebase.
Base58 leading prefixes for coin addresses

universal paper wallet generator.

python script to generate burn addresses

scripts to auto-compile linux wallets etc

Tuesday, 22 August 2017

guide to staking,

The blockchain is a succesion of generated blocks, each block contains a number of transaction informations.

Proof of Work requires some computing power to generate these blocks, as the difficulty increases the computing power necessary increases, only some form of hardware (computing power) is required. A high difficulty network requires a large amount of computing power.

Proof of Stake also requires some computing power, but also requires some coins to be held. This requirement of holding coins creates a process which is far less computing intensive, even on a high difficulty network generic computers are sufficient.

Proof of Work can require substantial investment in computing power.
Proof of Stake can require substantial investment in purchasing coins.

A simple explanation to Proof of Stake : if you hold coins in your wallet whilst leaving it open, unlocked and online, your wallet will occasionally mine/stake/generate a block, this is added to the blockchain and you will receive a reward.

When a coin wallet is mining using Proof of Stake it needs to be online, unlocked, and have eligible coins available.

Inputs : Every transaction creates inputs and outputs, deposits are inputs and withdrawls are outputs, the inputs are the coins that are in your wallet. Also known as UTxO's

Eligibility : each PoS currency will have a Minimum Stake Age, (ExclusiveCoin is 24 hours, PeerCoin is 30 days) once an input is that old it will become eligible to stake.

Mining : Whilst staking your computer is doing work, similar to Proof of Work mining but vastly reduced,
each second all available inputs are hashed to create an output which is compared against the current network difficulty, if the hash is a good number your wallet will create a block and send it to the network.

Probability : each input has a probability of a succesful hash, the probability is based on the input characteristics.
ExclusiveCoin uses the input size (how many coins) and it's age, the greater those numbers the greater the probability and the more likely you are to generate a block.

Orphans : when you generate a block, it is possible that another block will be accepted by the network in preference to yours, your block then becomes an orphan and will appear in your wallet greyed out and with 0 confirmations.

Block creation : when you create a block the wallet will automaticatlly do a number of things, including adding all the unconfirmed transactions from the network, and creating a new transaction which is the stake/minting transaction.

Split/Combine stake transaction : the wallet is programmed with values of a target size for staking inputs, what this means is that it will modify each staking input to fit within the programmed values.
If the current input is lower, it will combine with other staking inputs, and if it is lower, it will split in half.

i withdraw 250 EXCL coins from an exchange to my wallet, 
when that transaction is included in the blockchain, that transaction will become my staking input.
EXCL has a minimum stake age of 24 hours, so my wallet will start attempting to stake/mine a block after 24 hours has passed.
as my staking input gets older, it gets more likely to succesfully stake.
when my input stakes, the wallet will compare the input size to the target size for staking inputs.
my input is 250 coins, and the target size is 100 - 200 coins, obviously larger, so my input will split into two inputs of 125 coins and 125.5 coins (only one of the inputs gets the 0.5 coins reward).
the wallet will now wait until it has an eligible input that is older than 24 hours, and repeat the process.

i withdraw a further 50 coins from the exchange to my wallet, now i have three inputs of 125 and 125.5, and 50.
when my input of 50 coins succesfully stakes, because it is lower than the target threshold the wallet will want to combine it with one or more inputs.
assuming i still have those three inputs, it will combine the 50 coin input with the 125 coin inputs.
now my wallet has two inputs, the new one of 175.5 (including reward) and 125.5

upon my next stake, those two inputs are within the target range and will not be split or combined.
but when one of those inputs receives enough rewards to go over the target threshold it will be split.
and if I withdraw more coins from the exchange, the new input will possibly be split or combined.

there are differing forms of PoS available, this article is usefully targetted toward Exclusive Coin.
for example, some forms do not use input size (or amount) as a probability modifier.

Thursday, 11 May 2017

run masternodes under ubuntu command line

how to run a remote masternode using ubuntu command line

nerd level 6.

please ensure you have a working knowledge of masternode setup before attempting this and a controller wallet configured.

refer to


in this guide you will be modifying the exclusivecoin.conf file for remote masternode ability.


i have pre-compiled the ubuntu daemon so it's a matter of fetching it,
setting up the .conf file, syncing it, setting up the masternode file and starting masternodes.

all files are available here



#get daemon from github
wget https://github.com/exclfork/ExclusiveCoin/releases/download/v1.2.0.0-daemon/exclusivecoind-ubuntu-v1200

#rename for ease of use
mv exclusivecoind-ubuntu-v1200 exclusivecoind

#change permissions so you can run the daemon
chmod +x exclusivecoind

#create and modify datadirectory and conf file, you need to be in home or ~ directory
mkdir .exclusivecoin
touch .exclusivecoin/exclusivecoin.conf
nano .exclusivecoin/exclusivecoin.conf

### now you're in a text editor you want to add
port=your port number
rpcport=your rpcport number
masternodeprivkey=from your controller setup
masternodeaddr=ip address of this wallet:port

setting a port value is only required while running multiple wallets on the same system (otherwise they will attempt to use the same ports)
otherwise you can omit those lines and use default port of 23230

#then to quit

#now you can start the daemon and let it sync
./exclusivecoind &

#you need to stop/restart the daemon to enable the masternode.conf
./exclusivecoind stop
./exclusivecoind &

#to check that you are synced
./exclusivecoind getinfo

#then compare blocks to height at https://www.cryptobe.com/chain/ExclusiveCoin

#when the wallet is succesfully synced start/register the masternode from your controller
it should pick up the registration automatically and start running.

#for confirmation of success it can be useful to check your masternode for entry in the masternode list via command, please exclude your port number when entering IP
./exclusivecoind masternode list full yourIP

this should output any entries with your ip.
the very last number is a time stamp, the second last number is your rating, it should be greater than 0,1

also you can monitor the output of the debug.log for lines containing something similar to

2017-07-18 02:28:38 CActiveMasternode::EnableHotColdMasterNode() - Enabled! You may shut down the cold daemon.

#also there is a bootstrap available here

#handy daemon commands, the daemon is a command line version of the wallet,

#start daemon, the & symbol is necessary to free up the command line
./exclusivecoind &

#stop daemon
./exclusivecoind stop

#gives information regarding client and blockchain
./exclusivecoind getinfo

    "version" : "v1.2.0.0-61404",
    "protocolversion" : 61404,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "darksend_balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 26671,
    "timeoffset" : 0,
    "moneysupply" : 3674200.00000000,
    "connections" : 21,
    "proxy" : "",
    "ip" : "",
    "difficulty" : 1458.01970256,
    "testnet" : false,
    "keypoololdest" : 1494518106,
    "keypoolsize" : 1001,
    "paytxfee" : 0.00010000,
    "mininput" : 0.00000000,
    "errors" : ""

#list of masternodes has various levels
./exclusivecoind masternode list

./exclusivecoind masternode list full

to specifically check an IP
./exclusivecoind masternode list full particularIPaddress

you can also filter the output using grep for any information eg transaction
./exclusivecoind masternode list | grep transactionID

#to get list of possible useful commands
./exclusivecoind help

possible issues,

if not successful you might have port issues, ensure your port is open by entering
netstat -ntlp | grep yourport#

if you get no output, it's not open
have you installed a firewall?

nano is a text editor, it might need to be installed
it's far more noob friendly than vim.

apt-get install nano

possibly default editor is already vim (or other), so to open use

EDITOR=nano crontab -e

donations welcome
excl EcHku6jM9sWpFadRZH1XFfUWBBbG6kWjtg

Monday, 6 March 2017

manage files download from developer.apple.com

Downloading large files from Apple sucks. Here's how to apparently download using terminal with resume option ....

How to download files from Apple Developer Center:

  1. Open Terminal
  2. run gem install adcdownload
  3. Open https://developer.apple.com/down... and copy the URL of a file.
  4. run adcdownload get http://adcdownload.apple.com/…/file.dmg
  5. You will be asked for your Apple ID and password.
  6. Your download should start. If your connection drops, re-run the same command to continue the download.


this information from 

Saturday, 16 July 2016

How to setup an Exclusive Coin master node.

please note this post has changed from it's original content, 
if you used the original version you should go through this guide again and if necessary reconfigure your masternode.

There are two basic methodologies to run masternodes,
1. entirely on one wallet, 

this requires the running wallet to have the coins in the wallet and does pose some risk, 
but no more than a general staking wallet.

the risk is that if someone gains access to your machine, they have theoretical access to all sorts of information including your running client and your wallet.

it is important to note that there are a multiplicity of coins that require a consistently online hot wallet for staking, 
if you are staking Exclusive coin you are equally as vulnerable as if you running a properly setup masternode from a hotwallet.
You are also at risk if you have any form of wallet with funds in it that can access the network,
because hackers.

2. using a two wallet setup as a hot/cold setup 

this requires you have one hot wallet setup as our guide suggests (with direct access to funds), and another cold wallet setup differently (with no access to funds).

the hot wallet first registers the node, then the cold wallet will piggyback off that registration and run a masternode.

this setup can be used to start multiple remote masternodes.

this is more secure because even if someone gains access to the machine running the masternode, there are no funds at risk.
again we'd like to point out the simple fact that all staking wallets are hot wallets and are theoretically at risk.

1. entirely on one wallet, 

1. send 5000 EXCL to address,
2. modify exclusivecoin.conf,
3. modify masternode.conf,
4. start master node.
5. confirm success

There is at least one instance in old versions of the Qt that mentions sending 10,000 coins for master node, this is incorrect. You only need 5,000 (at the moment, this may change).

1. send 5000 EXCL to address,
go to new wallet and get new address, send exactly 5000 coins to that address in one single transaction, (if you want two master nodes you will use two addresses etc ..)

2. modify exclusivecoin.conf,
here's the contents of my final exclusivecoin.conf,

rpcuser=whatever(make something up)
rpcpassword=whatever(make something up)

there are four things in your exclusivecoin.conf that will differ from mine

rpcpassword these will give remote access to your wallet, so make them a strong user/password pair

masternodeprivkey will be generated in your wallet/debug console,

go to the "Help" menu, and select "Debug window",
this windows gives various information on your wallet, for now we require the middle "Console" tab,
here we can enter commands (via the command line) to the wallet-qt, (this is very similar to how you would interact with the exclusivecoind daemon which has no GUI),

while we are here we will also check our transaction is valid (will need a minimum age of 10 confirmations before it shows),
so enter
>masternode outputs

>masternode genkey

copy/paste the "masternode genkey" output into your exclusivecoin.conf against the masternodeprivkey entry, you will also use it in the next step/section.
the "masternode outputs" output shows your transaction is good, and the data will be used in the next step/section.

you should see something like this

masternodeaddr is the ip address and port of the masternode wallet.
if you are running the wallet at home, it is your home address, there are multiple ways to get your ip.

in the debug console enter

this may show your ip address,
alternatively enter "whatsmyip" into google,
this will also show your ip.

for now we will assume standard port number is valid so you will use port number 23230
assuming my ip is then i will enter as earlier

3. modify masternode.conf,
here's the contents of my final masternode.conf,

masternodeEXAMPLE 82b7be68fea1877a41105866f0143d88480212688892eda6f9f5609950a98777 0

there are two ways to enter information,
one is via direct editing of the masternode.conf file,
the second is using the masternode tab in the exclusivecoin-qt,

this guide will use the second.

now get necessary information
for your setup you will need this data
alias address:port privkey txid position

alias is just a name for that master node, it can be anything
address:port is yr wallets ip and a port, (each master node must have different ports)
privkey is the output from "masternode genkey" earlier, it is not related to the address you sent 5k to, each mn must have different privkey input
txid and position once you've sent the funds, is the output from "masternode outputs" earlier.

alias make up a name for you masternode, i will use "masternodeEXAMPLE"

address:port this is the same as your masternodeaddr entered into the exclusivecoin.conf
in this case

privkey is the output from "masternode genkey" from earlier,
in this case 6QXGyLgjLYQQad6WXNDuAtnEKNciSJYdxp7doirPoy6PafVBwpF

txid and position are from the earlier outputs of "masternode outputs",
you will see something like this

    "82b7be68fea1877a41105866f0143d88480212688892eda6f9f5609950a98777" : "0"

the long number is the txid and the short number is position,
your txid will be different, your position may or may not be different.

now go to master node tab in Qt, and press create, enter your details and press OK.

In your data directory there is now a file called masternode.conf
It holds the data you just entered, it will look something like below.

4. start master node.

You will need to re-start your wallet, it will then read the data from your newly edited exclusivecoin.conf and masternode.conf

once re-started,
go to your masternode tab,
if you now press Start or Start All this will broadcast and register your masternode details.

as soon as the wallet starts running, it will be checking the exclusivecoin.conf information against registered masternodes,
now you've broadcast the registration details your masternode should now start running.

WOOT. things should be running now,
but, how to check if they're running?

the most straightforward check is to get the list of running masternodes and check you are entered,
once more to the debug/console and (using your ip not mine) enter
>masternode list full
    "82b7be68fea1877a41105866f0143d88480212688892eda6f9f5609950a98777-0" : "   ENABLED 61404 Ec52sButeWS2a6niZW3bBwBzsHR1QxLjcB 1500345066      150 1500345096"

you will see various informations in that output
82b7be68fea1877a41105866f0143d88480212688892eda6f9f5609950a98777-0" is your txid/position
Ec52sButeWS2a6niZW3bBwBzsHR1QxLjcB is your public key holding the coins and tx
you will also see your IP

ENABLED is a good sign ;)
and 150 is your masternode rating, if it is 0 or 1, that is not a good sign, keep an eye on it for a few minutes and if it does not change then go through your data and restart.

in this case the final number 1500345096 is a time stamp and will update every time you enter.

2. using a two wallet setup as a hot/cold setup 
the basic understanding is you don't need to hold the funds in your masternode wallet,
once you register the masternode in your hot wallet, a cold wallet (with no funds) with correct details in the exclusivecoin.conf should now be capable of automatically running the masternode.

the cold wallet does not require any information in a masternode.conf file, this is purely for the hot wallet.

NOTE when running a remote cold wallet, the IP address used will be that of the remote wallet. not the IP address of the hot wallet.

for now the simple explanation is,
steps 1, 3 from above will be done for the hot wallet

the hot wallet will hold the funds, transaction, and masternode.conf details

and step 2 from above will be done for the cold wallet.

the cold wallet will hold the exclusivecoin.conf details

in a wallet containing zero funds you will edit the exclusivecoin.conf with the same
details as your hot wallet masternode.conf above

step 4 will also be done from the hot wallet

once you register the masternode via "Start" or "Start All", the details will be broadcast,
when the cold wallet receives the details it should start running immediately

step 5 can be done from either wallet

although given they have different network connections there may be some variations, but over time they should

more infos
coming soon,

If you have multiple nodes then each will have their own separate line of data.
Importantly, each seperate node needs seperate port, excl address, tx.

It's worth noting that "masternode outputs" will give a list in any order without any obvious linkage to address, you'll have to work out which tx goes with which address/privkey

2017-07-18 02:28:38 CActiveMasternode::EnableHotColdMasterNode() - Enabled! You may shut down the cold daemon.

Exclusive Coin thread on bitcointalk

Thanks to Transfer Coin,
and http://thecryptoworld.org/how-to-setup-your-masternode

and Crypto101 for pointing out issues :D

donations welcome
excl EcHku6jM9sWpFadRZH1XFfUWBBbG6kWjtg

Thursday, 22 October 2015

managing the game wallet

it has just occurred to me the simple way to manage the game wallet.
(this is the bumba game where coins are regularly deposited into a publicly shared address)
every time the game address is updated, there is no need to keep that address, nor any wallet with that address.
the idea is, you have an address that you constantly send your coins to, and once you are in the game wallet you can send those coins there.
when the address is updated, delete the game wallet.dat and re-open with a fresh wallet. import the new privkey

however if you want to stake, then you will need to keep the wallet with your coins in it open.

REMEMBER all your coins are in these wallets. back them up and keep them safe.

simple version ...
one - generate a personal address
two - send coins to that personal address
three - create a new game wallet

making sure your wallet-qt is stopped.
go to your datadir and rename (or move) the current wallet.dat,
if there are no files called wallet.dat, the wallet-qt will create a brand new file on start up.

start up the wallet-qt, this will generate a brand new key pool which lives in the wallet.dat file,
get a new recieve address. copy this address somewhere handy so you can refer to it in a minute.
optionally dump the private key associated with this address for extra safe keeping.
stop the wallet-qt, go to your data directory.
the new wallet.dat is your new personal wallet. rename it to something obvious (eg wallet.datPERSONAL) and optionally back up externally.
rename the previously backed up wallet.dat and restart. this should now start with your previous transactions.
move all the coins to your new personal address.
shutdown the wallet-qt
rename (or delete) the now defunct wallet.dat
restart the wallet-qt (with another brand newly created wallet.dat file)
import the current game private key.

now whenever the game address is changed, you can now rename (or delete) the current game wallet.dat, create a new one, and import the new private key.
repeat everytime the address updates.

if you want to stake with this process.
whenever you create a brand new wallet, you can import both the game key AND your personal key, then your coins will be available to stake, and the game coins will show as well.

however you will need to use coincontrol to manage sending the game coins as otherwise you may just send your private coins.


note: when you boot off a wallet.dat backup. it can take a few minutes as it needs to scan the blockchain for address history.
an alternative option is to use a similar process of renaming with the entire data directory. you would duplicate the bumbacoin2 folder and then manipulate it's name and the internal wallet.dat.

the shortcomings of this process is an old backup of your data directory will need to sync the blockchain before it can be used.
also depending on the blockchain this folder can be a gigabyte or more each time.

i will dedicate a future post to this process.

Tuesday, 20 October 2015

Cleaning up your wallet-qt when it clogs with transactions.

how to clean yr wallet-qt

you data directory holds a complete copy of the block chain, and your wallet-qt holds every single transaction that has taken place for each address you "own".
these competition addresses have been subject to an awful lot of transactions :D

it can be useful to create a clean slate now and then. to much information can clog your wallet-qt.

the above wallet was becoming very sluggish.

things to know - all your private/public keys are stored in a file called "wallet.dat", this file is in your data directory.

to help manage your addresses, you can have multiple wallets with different addresses. this is done by having multiple wallet.dat files, then you can switch between them as you desire.

here is a picture of my macintosh data directory, in it you can see a wallet.dat and a wallet.datBAK. I swap wallets by renaming the files, it's also possible to keep wallet.dat's elsewhere and move them as you will.

to swap it's necessary to STOP your wallet-qt, before swapping.

DONT FORGET these files hold your access to all your coins. if you break them, you could lose all your coins. so keep backups of either the wallet.dat files, or the privkeys or both.


which leads back to HOW TO CLEAN YOUR WALLET. this is simply done transferring all desired coins to a new empty address.

step 1. generate a new address
step 2. dump private key
step 3. send coins to new address
step 4. quit wallet
step 5. rename wallet.dat to wallet.bak (or whatever)
step 6. restart wallet
step 7. import private key from step 2


step 1. go to receive coins, press New Address button, the above dialog will popup, here you can name the address, then when you press ok it will display a new address.
copy this new address
eg B8QX8peKA9LvDb4Ya5GaMWwwLQoukV2aRY

step 2. go to Help/Debug window/console, type in:
> dumpprivkey B8QX8peKA9LvDb4Ya5GaMWwwLQoukV2aRY

 step 3. go to send coins, send them.
this shot is using Coin Control to help specify which coins. this is not strictly necessary in this scenario but it maybe useful.
to access Coin Control, go to Preferences/Display, tick "Display coin control".

step 4. quit wallet

step 5. rename wallet.dat -> wallet.bak
i am using wallet.datBAK02, you can use whatever you want

in this case there is no actual need to worry about the lack of wallet.dat file as the wallet will create one with new keys on startup.

step 6. restart wallet.

there will now be a new wallet.dat file in your data directory.

you will have no transaction data

step 7. go to debug console, type in:
>importprivkey Pe69Ten35qDWqc5cHbGEZfG5bq9npRtY8WkjXAvfGGaJiUQMFo63 newaddress 
it will hang for a moment. 
above i have named the imported key, that is not necessary, but it maybe useful for neatness.

then when it finishes your new wallet should have all the coins



send your coins to an external site, such as cyptobetfair.com or an exchange (when bumbacoin is on one)

step 1. go to an external site, and get a deposit address
step 2. dump private key
step 3. send coins to new address
step 4. quit wallet
step 5. rename wallet.dat to wallet.bak (or whatever)
step 6. restart wallet
step 7. import private key from step 2