Sunday, May 25, 2014

How to set up Darkcoin p2pool server on Debian

Installing a DRK (or almost any other crypto-currency) p2pool on Debian Stable



Updated: Added darkcoind config step and installing drk python modules.


First up if you’re not bothered about making a p2pool, but would like to join a good one (0% fees for one month from today), scroll straight to the bottom for a link.

If on the other hand you find this guide useful or even profitable, I won’t stop you throwing a donation my way at XtnchkvpVveDGm4vJmeBt8nuRk2pR7hF8g

The reason we need more p2pool servers out there is to distribute the network hash rate better. Currently there are a couple of DRK pools that are rather getting in the way, and the way that p2pool works, there’s almost no chance of one member grabbing more than 50% of the hash rate and performing attacks against the network.

p2pool isn’t ideal for everybody – you need to be able to broadcast shares of a higher difficulty than the minimum share difficulty on p2pool for that coin. DRK is currently showing 0.145 on my node, meaning you probably need about 200kh/s at the moment to get regular payouts. That’s not very much at the moment, but the diff on DRK is skyrocketing so expect that to go up too.

This guide will assume that you are doing this on a remote machine via SSH, and are logged in as root. For anyone running as a less privileged user, you need to make sure that user has sudo access, and prefix any command run as root with “sudo “.


DISCLAIMER

This is only meant to be a basic guide for those already somewhat experienced in server admin. This is a slightly hardened, but definitely NOT the safest setup, and if your machine is compromised I cannot be held liable for any funds lost. If you really want to run it with maximum safely you need to understand chrooting and shell-less, unprivileged users, and perform regular checkups on your server to ensure that it has not been compromised. I also suggest that you try this entire tutorial in a virtual machine locally before trying to deploy an instance. This will mean you can work out any bugs in the process while you still have physical access to the system.


Caveat #1:

If libboost1.49-all-dev doesn’t exist on the Debian derivative you’re running, use apt-cache search libboost*chrono-dev to find which version you should substitute in.


Caveat #2:

There’s also an issue of portability. I have suggested you use libdb5.1, but many machines out there still only have libdb4.8 available. While wallets created by daemons built using 4.8 will be compatible with 5.1, the same cannot be said of daemons built using libdb5.1 running on a libdb4.8 system.

However, I don’t see this as being a huge issue, as I recommend you run an off-site wallet, which will send all fees to your own, preferably cold storage wallet, leaving the on-site wallet empty at all times minimising the risk of theft. If, though, you decide to throw caution to the wind and run an on-site wallet, I suggest you either have a system which you can guarantee can access libdb5.1, or find a way to make 4.8 available on your system and compile with that.

Ok, let’s get started.


GRAB DEPENDENCIES

aptitude install git build-essential curl libcurl4-openssl-dev libminiupnpc-dev \

libboost1.49-all-dev libncurses-dev libffi-dev python-twisted \

libdb5.1++-dev libdb5.1-dev screen mailutils


Build the client and p2pool

cd ~

git clone https://github.com/evan82/darkcoin

git clone https://github.com/chaeplin/p2pool-drk


First build the client

cd darkcoin/src

make -f makefile.unix darkcoind

Wait a while for the compile to finish, and fix any errors you come across. I’ve checked all the aptitude commands in my bash_history, so I shouldn’t have left anything out, but a quick search for the error using Google or DuckDuckGo (for you privacy enthusiasts) will quickly find a solution for you.

Now you can copy your finished binary into a globally accessible folder and stop unprivileged users from modifying the file. cp darkcoind /usr/local/bin && chmod 744 /usr/local/bin/darkcoind


Then build p2pool

cd ../p2pool-drk

make


Now install the python modules. Note, if you use sudo rather than su replace the commands as required:

NOTE: Since the latest update this does not work this easily on Debian Stable. In order to get it to work you have to install glibc-2.17 from the Debian Testing repositories.

apt-get install libboost1.48-all-dev python-dev

git clone https://github.com/chaeplin/SUBSIDY_FUNC.git

git clone https://github.com/evan82/xcoin-hash.git

cd SUBSIDY_FUNC/darkcoin-subsidy-python

python setup.py install

cd ../../xcoin-hash

python setup.py install


SET UP A USER TO CONTROL THE P2POOL/DRK SERVICE

Replace any occurrence of “chosenusername” in this section with a username of your choice. A naming convention makes sense here, so you can run multiple pools, each as their own user. Perhaps choose just “drk”, or “drk-admin”. adduser chosenusername


SYNC THE DRK BLOCKCHAIN

Now we’ll start the darkcoin daemon, so it can sync up the DRK blockchain before we get started. Run the following commands: su – chosenusername

If you are root, this will be automatic. If you are not, you will have to enter the user’s password as you set it up just above.


CONFIGURE AND START DARKCOIND

First you need to set up darkcoind as a server, so run /usr/local/bin/darkcoind, and it’ll output an example configuration, which should be placed in /home/username/.darkcoin/darkcoin.conf

Also add the following lines to the file using an editor (nano is usually available):

alertnotify=echo %s | mail -s “DarkCoin Alert” your@email-address.com

server=1

The alertnotify line will send automatic emails to the address you specify if problems occur with the daemon.

Now run the daemon, while logged in as “chosenusername” with /usr/local/bin/darkcoind -daemon

If you want to follow the progress of the blockchain download, use “tail -f /home/chosenusername/.darkcoin/debug.log”. Press Ctrl+C to close the file when you’re done looking.

Meanwhile, change back to root (or your original user) by typing the command “exit”.


USE AN OFF-SITE WALLET

Edit ~/p2pool-drk/run_darkpool.sh file in order to use an offsite wallet.

Change the line that starts “screen -d -m -S P2P_DRK_DIFF” to read as follows:

screen -d -m -S P2P_DRK_DIFF python ./run_p2pool.py –net darkcoin –give-author 0 \

–disable-upnp -f 0 -a YOUROFFSITEDARKCOINADDRESS

If you wish to charge a fee, make sure you set -f to the default percentage fee to miners. This will be displayed on the main interface along with all the other pool statistics.

Now you want to copy the p2pool source to your service user’s home folder and allow them access to it:

cp -r ~/p2pool-drk /home/chosenusername/ && chown -R chosenusername:chosenusername /home/chosenusername/


HARDENING

Hardening any public facing server is important, but even more so when dealing with mining as it can be so profitable to crack.

Step one is to disable root SSH login and only allow one unprivileged user to log in via SSH.

To disable root logins for SSH, edit /etc/ssh/sshd_config and change the PermitRootLogin value to false. It will read: PermitRootLogin no

A simple thing we can do to help harden the server is disable SSH access for the user controlling the p2pool instance. To do this, we’ll create another user who is only ever used to log into the machine, after which you will have to use sudo or su to perform any activities. I will use the name “pooladminuser”, but please choose your own. Using default credentials from any tutorial is a potential huge security risk.

As root run adduser pooladminuser

Fill out the fields as you wish. Now we’ll tell SSH to only allow access from this particular user. To do this, simply edit /etc/ssh/sshd_config and add the following line to the end: AllowUsers pooladminuser

Then run (still as root) service ssh restart

Make sure at this point that you have taken note of the password you set for “pooladminuser”. If you find that you haven’t, use the following command to change it before logging out and trying to get back in: passwd pooladminuser

Now nobody but “pooladminuser” can log in via SSH, and then would need to put a lot more work into breaking into the system. Having all this been said, running the entire thing inside a chroot jail would be even better, but that’s a huge job and outside the scope of this tutorial.


Start the server!!!

Now change to “chosenusername” with su – chosenusername

And start the p2pool server: cd p2pool-drk ./run_darkpool.sh

This will most likely now come straight back to the screen you started on. If it says the daemon is still downloading blocks, watch the log until it says it’s 0.99 complete or more and try again.

This process is now controlled by its very own dedicated terminal. To see it, use the command “screen -r”. Be careful not to press Ctrl+C while watching its output, or you’ll quit the p2pool instance. To exit the screen interface, press Ctrl+A then Ctrl+D. Anything else risks bringing your server uptime back to 0, so my advice is to only look at the output if you feel like something isn’t working right.

Ok, you should now have a working server. Visit “ip.add.res.ss:7903/static”, then point your miner there. I’m not going to go into how to connect a miner, because if you’re new enough to this that you don’t know that, you should probably avoid p2pool.



source: http://www.reddit.com/r/DRKCoin/comments/1zg2c8/tutorial_how_to_set_up_a_darkcoin_p2pool_server/



How to set up Darkcoin p2pool server on Debian

BLACKCOIN ANNOUNCES PROOF-OF-STAKE 2.0

First of all, one of the major parts of BlackCoin is their Proof-of-Stake system.


While this is not something unique (anymore), the original Proof-of-Stake system still has some vulnerabilities that need to get fixed as soon as possible.


Rat4, the main BlackCoin developer, has taken a closer look at ways to improve Proof-of-Stake, and has come up with several improvements, which will be released under the name “Proof-of-Stake 2.0”. I’m very curious to see what it will all entail!


In other BlackCoin news, a new privately developed wallet is in the works. New features include exclusively developed anonymity and multi-signature options. The new wallet code has been dubbed “Legionaire”.


An external developer is also in the BlackCoin picture, and this person is called “Dzimbeck”. His project is all about bringing smart contracts, decentralised cash/Bitcoin/BlackCoin markets , anti-malleability and other undisclosed features. Intriguing!


In order to get BlackCoin to the masses, the team is also in talks with a national (US) sales team leader who worked for a very large VISA/Mastercard point-of-sale company. He will push the BlackCoin/Coinkite integration to merchants;


Regarding the BlackCoin/Coinkite integration, I just want to remind everyone this will take place in a week from now, on June 1st. Buying BC through Coinkite terminals, and buying products from shops with BC are just a few of the possibilities.


Last but not least, this Sunday, at 7pm EST, there will be a new episode of BlackCast, with some very special guests! Soepkip, Vizique,TheDogeofWallSt, and, I kid you not, Bryce Weiner, will all be present!



source: http://www.cryptoarticles.com/crypto-news/2014/5/24/blackcoin-announces-proof-of-stake-20-anonymity-multi-signature-features-and-more



BLACKCOIN ANNOUNCES PROOF-OF-STAKE 2.0

RUBYCOIN - A PRECIOUS GEM FOR THE DIGITAL AGE

Recently, my attention was drawn to RubyCoin, which is a Crypto we haven’t discussed before> I always like to discover new coins, regardless of people like it or not. What makes RubyCoin so interesting? Let’s find out!



RubyCoin calls itself “A precious gem for the digital age”. Quite the bold statement, especially given the current Crypto landscape. You might have guessed it by now, but RubyCoin points to rubies, which are gems. Oh the little joys of life!


As far as the technical aspects of RubyCoin go, this Crypto is based on the Scrypt algorithm, with blocks being generated every 150 seconds, difficulty retargeting every block, and rewards decreasing for the first 5 months, until a stable reward of 50 coins is maintained.


There will be a total of 60 million RubyCoins in existence, and there is a 2% pre-mine. There are quite a lot of Youtube videos that have been made for RubyCoin, about 16 in total. You can find the; all in the official Bitcointalk thread (link below this article).



There are also a handful of games for RubyCoin, including a Flappy Bird version, a wheel spinning game and the mandatory dice game. There are also two block explorers so you can keep an eye on transactions and blocks.


RubyCoin is currently traded on three different exchanges, all in Bitcoin trading pairs : BitTrex, C-Cex and SwissCex. With a price around the 500 Satoshi mark, it could be a matter of time before we see an increase in trading volume.



source: http://www.cryptoarticles.com/crypto-news/2014/5/24/rubycoin-a-precious-gem-for-the-digital-age



RUBYCOIN - A PRECIOUS GEM FOR THE DIGITAL AGE

ASIACOIN THUNDERCLAP CAMPAIGN

There have been some new developments in regards to AsiaCoin. Despite this Crypto’s value still being down by quite a lot, there are things being set in motion to help it recover. Adding to a new exchange is a good start, wouldn’t you agree?


The exchange I’m talking about is known by most of you, and is called Coin-Swap. The good news for AsiaCoin is that it is listed in two different trading pairs, one against Bitcoin and one against DogeCoin.


Other than this feat, AsiaCoin is still at the top of the list of coins to be added to CoinPayments. Even though it has been surpassed by UltraCoin , and with a minor margin as well, their chances are still looking good!


I would also like to note that AsiaCoin have reached their target for their ThunderClap campaign. With a social reach of 130,673 people, AsiaCoin has been mentioned to a lot of new and potential investors and/or community members.


It might not seem like much to some of you, but there is a serious community behind AsiaCoin, and this Crypto is far from done. It will be interesting to see what the future will bring.



source: http://www.cryptoarticles.com/crypto-news/2014/5/24/asiacoin-thunderclap-campaign-successful-added-to-coin-swap



ASIACOIN THUNDERCLAP CAMPAIGN

WHITECOIN FAUCET SOURCE CODE AVAILABLE

I’m going to try and push a ton of articles out today, so up next is WhiteCoin. I’m sure most of you have noticed how long the price has gotten lately, but that doesn’t mean things aren’t happening behind the scenes.


Even though we all got used to the WhiteCoin logo pretty fast, there has been some discussion going on about changing it, because the coin has been taken over by the community. As a result, a logo contest is currently being held, and you can find out more about this by clicking here.


Another thing that is quite popular with Crypto in general, are faucets, where newcomers and veterans alike have the chance to claim some free coins. A WhiteCoin faucet has been made available, and the faucet source code has been made available to the public as well.


While WhiteCoin can’t be mined anymore at this point in time, there are still multiple multipools available, where you mine other coins which are converted into Bitcoin and then into WC. A new multipool has been added, called CoinKing.


The WhiteCoin price has responded to the continuous work of the developers and community, resulting in a 57% increase. Even though the current price is still very low, the rebound has slowly begun, so that’s a good thing.



source: http://www.cryptoarticles.com/crypto-news/2014/5/24/whitecoin-news-new-logo-contest-faucet-source-code-available-new-multipool-added



WHITECOIN FAUCET SOURCE CODE AVAILABLE

Developers Join MaidSafe Project

MaidSafe has recruited over 500 developers for its up-and-coming network launch, according to a press release released Friday.



MaidSafe expects to start testing the network soon–a process that will last a few months.


Project SAFE (Secure Access for Everyone) has been called the “Bitcoin for data” or the “Bitcoin for the Internet.” The announcement of MaidSafe’s rapid development, after last month’s crowdsale, could be viewed as another baby step towards a decentralized Internet.


The developers span “many backgrounds, nationalities and interests” and have started crafting a variety of decentralized applications that include: altcoin wallets, a music storage platform, and an exchange tailored for both fiat and cryptocurrencies.


As the project progresses, the MaidSafe team anticipates many other applications to come. Interested developers are encouraged to join the network.


What is MaidSafe?


“Logic” directs the MaidSafe team, but David Irvine is its founder. He conceived of the project in 2006 to countervail the inefficient structure of the Internet. Like Bitcoin, it tackles a reliance on third-party services with a decentralized protocol. The latest news release describes the network:


MaidSafe has created a blockchain-like technology incorporating a network token called safecoins, which holds the promise of decentralizing nearly every aspect of the Internet, including all Web services.


Data is distributed across the nodes of the network. Self-authentication allows users to keep full control of their data. Its network’s “farmers” roughly equivalent to Bitcoin’s “miners.” Safecoins, a crypto-currency, is embedded to offer an incentive for network upkeep. The upshot of these features is, “Users will be able to store, share, chat and publish 100 percent under their own control and knowledge.”


Project SAFE has been in the works for more than eight years. Interestingly, the idea predates Bitcoins release, demonstrating decentralization’s pervasive appeal.


Here is a brief video overview of the project:


The Safecoin Crowdsale


In a successful crowd sale last month, MaidSafe sold $6 million of MaidSafeCoins in 5 hours. They had not anticipated the torrent of investors. Irvine said, “We assumed the sale would take the entire 30 days. Never in our wildest dreams did we expect this much demand in the first few hours.”


Users who purchased MaidSafeCoins will be able to redeem safecoins after the network launch in a few months.


Other Internet Projects


Other Internet projects like BitCloud and OpenLibernet have sprouted up post-Bitcoin. They hope to throw a wrench into the centralized data status-quo. CryptoCoins News contributor Kyle Torpey is the marketing director of Bitcloud, a venture that approaches decentralization of data with a distributed database, offering a platform for decentralized applications like digital content platforms, exchange applications, and social networks–which could be the next generation of YouTubes, Facebooks, and Dropboxes. OpenLibernet is a mesh network that cites Bitcoin as an inspiration.


MaidSafe, and these other projects, claim their uniquely decentralized structures will enable enhanced security, privacy, and freedom for users. They actually poses possible solutions to many hotly debated Internet issues. The National Security Agency would have a much more difficult time snooping on its citizens and harvesting bulk data if Internet Service Providers (ISPs) were ousted by decentralized alternatives. The MaidSafe press release reads, “In essence, nobody knows where any data is located, thereby providing completely private and unilateral access by individuals.” In sliding control of data away from ISPs, decentralization could potentially render the net neutrality issue less of an issue. The peer-to-peer arrangement also complicates hacking and DDoS attacks, thus enhancing the security of its users. We need only reconsider the structure of the Internet.



source: http://www.cryptocoinsnews.com/news/500-developers-join-maidsafe-project/2014/05/24



Developers Join MaidSafe Project

Saturday, May 24, 2014

Open-Transactions To Introduce Multisig Voting Pools

Without a doubt, the Open-Transactions open source framework is extremely robust as it currently stands.


However an upcoming future release of Open-Transactions will have full Bitcoin multisig voting pool support. Reportedly, Bitcoin multisig voting pool support is already well under way. When asked when the projected release date was, an Open-Transactions Developer replied back saying that the tentative release would likely not be until around late summer or early fall, 2014. He further went on to say that Monetas (the commercial deployment of the Open-Transactions platform) wanted to make sure that it’s smoothly integrated and extensively tested before releasing the code to the general public.



Why Multisig Voting Pools Matter


The ever-rampant scams and heists that seem to proliferate within the Bitcoin ecosystem, such as we saw with the popular combination payment processor and web wallet MyBitcoin.com. Back in July of 2011, the owner ran off with nearly 79,000 BTC in customer funds. In March of 2012, several sites hosted on Linode were also hacked (including Bitcoinica) for a total of nearly 47,000 BTC lost or stolen. To add insult to injury, Bitcoinica was hacked again two months later (for yet another 19,000 BTC); which ultimately resulted in Bitcoinica’s shutdown. Then there’s Bitfloor, Inputs.io, BIPS and BidExtreme, just to name a few others; all of which have reported extensive losses to hacking and theft. Much more recently, we now see the devastation left behind from the Mt Gox fiasco.


Nearly every one of these BTC heists could have been avoided via Open-Transactions, and even more so once the voting pools feature is rolled out. Open-Transactions already facilitates seamless peer-to-peer trading (via Nyms, which are similar in a public Bitcoin wallet address), as well as full support for trustless escrow via smart contracts. Additionally, Open-Transactions can also facilitate Chaumian blinding (aka “Chaumian cash”). This would completely avoid having to hand your bitcoins over to a third party.


Outside of Open-Transactions, exchanging between Bitcoin and fiat currencies ultimately involves a centralized entity which controls all the funds. Consequently, this makes trust and solvency serious issues. By way of federated Open-Transaction servers and smart contract-based trustless escrow, conventional exchanges as we know them today will simply cease to exist. Or at very least, they will have to allow themselves to be publicly audited in order to verify their solvency. From a purely practical standpoint, any time that you deposit your bitcoins into an online trading platform or wallet, those bitcoins cease to be yours. Only when you store your bitcoins in a secure offline / cold storage wallet (such as Armory) are they truly yours.



How Open-Transactions Helps Solve These Issues


Open-Transactions is a cryptographically-based financial library developed by Chris Odom (aka FellowTraveler on the Open-Transactions forums). Odom is also the co-founder of Monetas. It was designed to accommodate secure marketplace trading and execution of virtual corporations, digital trade instruments and smart contracts via Nyms (short for “pseudonyms” and cryptographically-signed receipts (that are also Chaumian blinding-capable). In this regard, Open-Transactions perfectly compliments the security features already inherent in the Bitcoin protocol and blockchain with a number of additional features not provided by Bitcoin alone. For example, Open-Transactions provides proof of ownership by way of tokens which essentially boil down to a cryptographically-signed receipt; whereby only one Nym can be in possession of any one token at any one moment. Each time a token changes hands, the receipt is then updated accordingly.



Advantages To Voting Pools


By adding multisig voting pools to Open-Transactions, many other highly desirable be. For example, it will no longer be possible for a hacker to steal BTC by compromising a single server. They’d have to compromise almost all the servers in the pool. Consequently, customers who only do business with companies that use voting pools will enjoy far higher funds availability. Because even if one Open-Transactions server within a pool is down, the withdrawal can still be processed via any other Open-Transactions server within that voting pool.



source: http://www.cryptocoinsnews.com/news/open-transactions-multisig-voting-pools/2014/05/23



Open-Transactions To Introduce Multisig Voting Pools