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
https://en.bitcoin.it/wiki/List_of_address_prefixes

universal paper wallet generator.
http://cryptolife.net/upwg/

python script to generate burn addresses
https://gist.github.com/CoinWhisperer/6d673f1f3d13da1611cd

scripts to auto-compile linux wallets etc
https://github.com/okcashpro/ok-scripts

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.


example.
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.




note:
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

http://bumbacoin.blogspot.com.au/2016/07/how-to-setup-exclusive-coin-master-node.html

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

https://github.com/exclfork/ExclusiveCoin/releases/tag/v1.2.0.0-daemon

--

#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
cd
mkdir .exclusivecoin
touch .exclusivecoin/exclusivecoin.conf
nano .exclusivecoin/exclusivecoin.conf

### now you're in a text editor you want to add
rpcuser=yourusername
rpcpassowrd=fancypassword
daemon=1
rpcallowip=127.*.*.*:*
server=1
port=your port number
rpcport=your rpcport number
masternode=1
masternodeprivkey=from your controller setup
masternodeaddr=ip address of this wallet:port

note:
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
[ctrl]+x
Y
[enter]

#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
http://cryptochainer.com/dir/?page_id=881



--
#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.

https://github.com/MagLoft/adcdownload


this information from 
https://www.quora.com/How-do-you-download-Xcode-without-the-App-Store