What To Do If Your Hardware Wallet Is Lost, Stolen, Or ...

I Created a Custom Lightning Payment Jackpot Website from Scratch, This Is What I Learnt

TL;DR: I wanted to learn how the Lightning Network operates. So I came up with an idea for a jackpot site using the Lightning Network to handle micro-payments. Operating a Lightning node is complicated and challenging for a beginner. Using custodial wallets like Wallet of Satoshi, BlueWallet or Breez is easy to use but not your keys. Please come by and help me test my Lightning integrated new website. I’m happy to help anyone that’s new to Lightning setup a wallet and play a game. It all helps with learning and adoption, that’s why we’re all here! Long Bitcoin, Short the Bankers!

Introduction: Welcome to a brand new concept in random number seeding. Generating a truly random number is quite hard. You could use the current time, divided by the RPM spin of your hard disk, squared by the temperature of your CPU, and so on. Other extreme methods include measuring quantum fluctuations in a vacuum, see ANU Quantum Random Number. All these methods are fine but none of these are really verifiable by a 3rd party. Whoever running the system can change the outcome. I'm not saying they do, simply stating that if the payoff was great enough to alter the 'reported' outcome they could. So what's different here? We're using the Bitcoin blockchain itself as the arbitrator. Every outcome is not only provably fair but verifiably fair and immutable. Trying to cheat this system is impossible.

So that’s the pitch. Make a website using the idea of whoever’s guess is closest, wins the jackpot; using Lightning to handle all the incoming and outgoing payments. I started to look around at other fully functional websites offering Lightning as a payment method. It turns out most use a 3rd party like OpenNode or CoinGate. To me, this defeats the whole purpose of Bitcoin. Why build a website/offer a service/offer Lightning as a payment method if you don’t even own or control your funds. A payment processor could simply turn off withdrawals and it’s over. Not your keys, not your coins!

It’s been quite a learning experience for me. I think the most frustrating thing to figure out and attempt to solve was channel capacity. For example, with a fresh new wallet setup on Bitcoin Lightning for Andriod (blue bolt logo), you can open a channel to anyone fine, but trying to receive money won’t work. I think for a beginneadoption this is the greatest hurdle to understand/overcome.
You need to spend money so the other side has some collateral to send back. One explanation I read was, opening Lightning channels are like a full glass of water, I need to tip some of my water into your empty glass so my glass has some room to fill it back up, it can’t overflow. Another one is like beads on a string. The number of beads is up to you but if all the beads are on your side, the other party can’t push any beats your way because you have them all. There’s ways to fix this. Either spend into the channel or buy incoming channel capacity. On the spend side, you can use websites like lightningconductor.net which allow you to send money to their Lightning node, from your new channel, and they’ll send the coins to your on-chain Bitcoin wallet. This is a simple way to empty your glass or push those beads to the other side and still retain all your money, minus LN and on-chain fees. For incoming capacity, you can use LNBig and get 400k satoshis of incoming capacity for free or lightningto.me, or you can pay lightningpowerusers.com or bitrefill.com to open larger capacity channels to you for a small fee.

For a beginner or someone new to Bitcoin/Lightning, using a custodial wallet like BlueWallet, Wallet of Satosh or Breez is far easier than trying to setup channels and buy or massage incoming capacity. You can simply install the application and using lightningconductor.net BTC to LN you can send some Bitcoin and they’ll forward it on to your lightning wallet, for a fee. These custodial wallets accept incoming transactions of 1 million satoshis or more. So now you’ve got a working wallet that’s got a few thousand satoshis, keep reading!

How to play: Two things are verifiable on the blockchain, time between blocks and transactions included in that block. First choose which block#, by default it will be the next one coming up. Then choose a public alias, others will be able to see your bets but they won’t know if you’ve paid or not, only you can see that. Next, guess the time it will take to mine the next Bitcoin or the number of transactions in that block. You can make multiple guesses. If you want to place a number of spread bets, I suggest opening a spreadsheet and getting it to generate the times or transactions for you. For example, put in 2300, then 2350, 2375, 2400, then drag down to generate as many in the sequence as you want. You can bet a maximum of 25 per invoice. This will hopefully ensure the small transaction amount will be successful. Once you’ve generated an invoice, pay it from the QR code or the lightning bolt11 string.
Now you’re ready to go. Wait till the next block goes active or the block you’ve bet on and you’ll see your bets and everyone else’s. Most importantly, what the final jackpot is. Unpaid invoices are discarded. If the block rolls over while you’re making up your mind the page will refresh and you could lose your input. Please plan your bets in notepad or a spreadsheet. I know this is annoying but I never claimed to be a UX codedesigner! It was a struggle getting all the css, ajax and javascript working, ahhhrrrrggg!! Next is the interesting part as this game can become competitive.

Game theory: As others make bets, you can encapsulate theirs. For example, they guess 2750 transactions, you can bet 2749 and 2751. While at first this seems unfair, what it doesn't show is what bets have been paid for and what have not. Only you can see your own bets that are paid and unpaid. To everyone else they look like paid bets. Only when the next block/jackpot starts can you see what's been paid for as unpaid bets are discarded. By placing dummy bets, unpaid, you can sucker someone in and greatly increase the jackpot payout at no cost to yourself. You can also use the same alias, for example, open up two different browsers, one for real bets and one for fake bets. This is why there’s a 25 bet limit, I don’t want people going too crazy with this. You can check your bets in the footer bar under ‘previous bets’. Also, IMPORTANT, please keep track of your account number at the top. If your session or browser has a problem, you can lose access to your bets and jackpot winnings. If this happens and you receive a new account number, simple use the claim jackpot in the footer to claim your winning jackpot. If you don’t have this, I can’t help you if something goes wrong. Rather than having a login/password system you have a unique account id. Don’t lose it! Now back to the blockchain.

What a minute… I though it took 10 minutes to confirm a block? Not always, actually it does this very rarely. If you average out every block over time, it averages around ten minutes. A block is confirmed when a miner takes transactions from the memory pool, up to ~1.2mb worth. Next, now this is the hard part, they need to generate a hash for that block, but it needs to start with X number of leading zeros. To achieve this, they use a random number called a nonce to seed/salt the hash and hopefully, it contains X number of zeros at the start of the block hash. If not, discard and keep trying. The winning block contains the miners local time, which can sometimes be wrong. This is why sometimes you get negative block times. See block #180966 then the next block, #180967's time stamp is before the first one! Who cares, as long as the later block references the previous block to keep the chain intact. You can’t guess negative numbers but you can guess 0 seconds. Which I guess is like betting on the green zero in roulette.

Ready to play?
Each bet is worth 5,000 satoshis. I wanted it to be expensive enough to prevent spam and also the jackpots be large enough that it would be worth playing. I hope you have fun.
Website is https://blockwisdom.com
My Twitter handle is @nixdice
If you have any questions or issues, please contact me here or on Twitter I’ll try my best to sort it out quickly.
submitted by nixdice to Bitcoin [link] [comments]

Ethereum's advantages for Bitcoin highlight how Ethereum has won the smart contract market for years to come - at a minimum

If you're new to Ethereum, but in love with Bitcoin, you may be thinking, "well, Ethereum is winning now, but Rootstock is still a contender". This topic come up frequently and has been addressed community members quite well. Because posts get censored elsewhere, and deleted over time, I thought I'd reiterate the points here.
tl;dr Using Ethereum to create bonded side chains has advantage to Bitcoin holders that cannot be obtained by non-currency agnostic chains (such as the proposed chain called Rootstock). Ethereum is better for Bitcoin, and with PoS, is more secure.
Rootstock is currently a proposal to be the path to creating smart contracts with Bitcoin. There is this idea out there called “bitcoin maximalization” in which a some cryptocurrency enthusiasts will only accept Bitcoin as THE blockchain of the future. Well, the challenge with that idea is that, while Bitcoin was the first successful blockchain, it is also slow, expensive, and the least-developed. Bitcoin maximalists believe that will change. They believe that bitcoin will adapt. They think Bitcoin will incorporate more technological innovation and maintain global dominance. Sadly, this belief still holds true for many, despite the clear conflicts between mining, development, and exchanges that have driven the long drawn out block size debate. Bitcoin ability to adapt and incorporate new technology is clearly questionable.
One technological revolution brought on by Ethereum has been the smart contract (programmable automated contracts). Ethereum has had a year long monopoly on this innovation, and the monopoly appear to be maintain for the foreseeable future. Bitcoin maximalists do not like that idea. They feel it is a threat to Bitcoin dominance.
While bitcoin and Ethereum COULD make lovely music together, the idea that Bitcoin could lose its dominant position (by market cap) is likely true. Ethereum has many more use cases. This doesn’t mean Bitcoin will go extinct. As a streamlined, non-bloated, currency, it may still be very useful, but I digress.
What if Bitcoin could simply gain Ethereum’s technological sophistication? Rootstock desires to do just that, well, sort of, and for a piece of the pie. For that reason, it’s often promoted by /Bitcoin (a highly censored bitcoin community similar /btc).
So how will Rootstock plan to achieve this?
First, understand Rootstock is currently vapor. An idea and an implementation can be worlds apart. At the time of this post, there is not a single line of code on Github, while Ethereum has just matured to "Homestead" and is running perfectly. While some describe Rootstock as “open source”, currently, nothing is open. Ethereum development took years to get where it is today, and the open aspect of the development led to Etherum’s current remarkable sophistication and stable platform.
But let’s assume, fairly, that Rootstock does eventually emerge from vapor. Rootstock developers are borrowing some of Ethereum’s technology. Thus, in some sense, some of the work is provided for them thanks to Ethereum. Of course, it is easy to overstate. You can’t just cut and paste Ethereum and have it work. It requires a massive amount of development.
So what will Rootstock look like.
Currently, they have two major version planned:
vovobov (throwaway account) had this nice contribution:
Ethereum as a bonded sidechain of Bitcoin with advantages over Rootstock
What is a sidechain?
According to block stream:
A sidechain is a blockchain that validates data from other blockchains
Ethereum already does that with BTC Relay. So how about pegged assets?
This is an idea for an Ethereum contract that makes Bitcoin-backed tokens without any softfork or trusted Bitcoin multisig managers. Instead, Bitcoin IOU's are created on the Ethereum blockchain and backed by Ether bonds which are governed by Ethereum contracts like BTC Relay or price oracles. The Bitcoin IOUs are backed by Bitcoins held by the escrow managers but if they steal/lose the Bitcoins (or refuse to redeem them) the Bonded Escrow Contract will observe their naughty behaviour and sell their Ether bond to redeem the Bitcoins from someone else!
Rootstock vs Bonded Escrow Contract on Ethereum
There are two methods that Rootstock developers plan to use for issuing Bitcoin IOUs (called "Roots") on their Bitcoin "sidechain". AFAIU the first involves merged mining and a multisig wallet that entrusts a quorum of Bitcoin miners with the entire basket of Bitcoin eggs that were "moved" to the Rootstock chain. The second method requires softforking the Bitcoin blockchain for a two-way peg.
Pseudonymous, distributed, untrusted issuers
Rootstock dev maaku7:
“It's a known trade-off made by any presently deployable implementation of the 2-way peg. It's also something that we were very upfront about in the sidechains paper, and part of the reason why many of us are so concerned about decentralization of bitcoin mining.
In any non-SNARK, non-extension-block version of the 2-way peg a bitcoin node does not perform full validation of the sidechain as part of the consensus rules. Therefore it is perfectly possible (by design) for a threshold majority of the miners / signers to steal the coins in the peg pool, and censor any attempt to stop them. Why by design? Because that's the promise of sidechains: performant permissionless innovation at the cost of SPV trust in the honest majority of signers / miners.
Sidechains we are working on (e.g. Alpha, Liquid) and Rootstock, by the looks of it, make use of a fixed set of signers instead of or in addition to reliance on >50% honest hashpower. This is because while less pure, it is ultimately safer to work with known, contracted entities as functionaries rather than 50% hashpower which at the moment is just a small handful of unaccountable people.
EDIT: Although obviously the ideal end goal is fully decentralized mining, where creating a 50% hashpower cabal requires organizing thousands of people at minimum. In such a case we may be able to consider a pure SPV peg to have a reasonable security model. But we're a long way from there yet...”
says this about sidechain security:
“In any non-SNARK, non-extension-block version of the 2-way peg a bitcoin node does not perform full validation of the sidechain as part of the consensus rules. Therefore it is perfectly possible (by design) for a threshold majority of the miners / signers to steal the coins in the peg pool, and censor any attempt to stop them. Why by design? Because that's the promise of sidechains: performant permissionless innovation at the cost of SPV trust in the honest majority of signers / miners.”
Ether bonds can remove most of the need for this trust and allow pseudonymous, permissionless participation in issuance and escrow management. Without anonymous, untrusted validators, distributed around the world, Bitcoin is looking more and more like Chinese Liberty Reserve or E-gold. …
Bonded sidechains decentralize pegged assets
Even with a Bitcoin softfork, Rootstock has just one Bitcoin IOU with all the Bitcoins sitting like a duck in one "wallet". Since Roots are just one Bitcoin IOU from one issuer, they can't be used to back/bond IOUs the way Ether can. If Rootstock's multisig/SPV wallet is robbed by it's signers/miners or (as they always say) hackers, the value of Roots become "zero" along with any asset or contract using Roots. Ether continues to have value if Bitcoins are stolen. Theft just thins out the herd and makes people more cautious. Ether bonds make issuers mostly responsible for their IOUs with IOU holders assuming some risk if Ether loses too much value to Bitcoin.
Issuing servers and indie issuers
A basic Bonded Escrow Contract is practically complete since BTC Relay does the difficult part. "Bonded Escrow Contract" is completely decentralized and requires no modification to Bitcoin. It would allow anyone to "anonymously" manage Bitcoin escrow wallets or issue Bitcoin IOUs. They only need to obtain Ether for the bond, send it to the Bonded Escrow Contract along with their Bitcoin escrow address and the terms of the IOU they wish to create. Indie issuers don't have to babysit a "server" (that needs to be online all the time) if they create IOU contracts that won't have harsh penalties if they take some time to redeem the tokens. IOU buyers who want faster redemption can buy IOU's from issuing servers. Issuers are free to choose alternatives to SPV such as prediction markets, to verify Bitcoin transactions.
Bonded Escrow Contract options
Here are some options that the Bonded Escrow Contract could make available: * Designate how much Bitcoin the IOU tokens are to be worth and how much Ether will back them. This may be a fixed rate or it may be based on other Ethereum price oracle contracts. If a price oracle is used the issuer may have to add Ether to prevent the IOU from going into default if the Ether price goes down relative to Bitcoin. * Set exchange or rental rates for the Bitcoin IOUs. These rates may be in Ether and/or Bitcoin and could be based on oracle/derivatives contracts.
When IOUs aren't redeemed (right away)
What happens if the IOU's are sent back to the issuer but the Bitcoins aren't released right away?
In more recent news:
Rootstock devs (RSK) clarified that instead of creating a token, like Ether, which is sold to the public to fund initial development. With Rootstock, “every time a person or a corporation runs a smart contract on RSK, 80% of the fuel paid goes to the miners and the remaining 20% to RSK Labs, so we can continue the development of the open source platform”.
In other words, Rootstock is a sidechain business venture centrally controlled by RSK. Unlike Ethereum, it is NOT a public resource. This does not foster independent, open source, development, such as what we are seeing with ventures like Ethcore and Consensys and well, the many many other Ethereum developers well deserving of attention. If you’re planning to build on Rootstock, RSK labs get a cut of your expenses. Enjoy having a new boss. That doesn’t exist with Ethereum!!! The Ethereum Foundation started the enterprise, but Ethereum development is already much bigger than a single foundation.
sjalq also makes these fair comments:
Add to this is that Ethereum's PoS will be far more scalable, with Casper development reaching high levels of sophistication.
Basically, unless you absolutely refuse to hold anything but Bitcoin, there is no reason to ever use what's proposed for Rootstock. It's less capable, less secure, less scalable, more centralized, and will be two years behind Ethereum's remarkable network effect (at a minimum). Ethereum's monopoly is going no where for the foreseeable future.
Update: March 18th 2016
What About Counterparty?
  • In most repects, Counterparty's model has the exact same issues as Rootstock's outlined above, so it's the same problems as that described above. Unlike Rootstock, there will be an altcoin, but instead of currency agnostics, it's connected only to bitcoin.
  • Counterparty is also greatly limited by bitcoin's slow blocktime.
  • Detail discussion here.. Basically, Counterparty's model is a model that the Ethereum founders abandoned because it is a technologically poor decision.
  • More perspective from Ethereum dev Alex van de Sande.
    • "many ex-xcp developers who are migrating to Ethereum due to ease of development and better tools. [such as Bitnation] ... Also I don't understand the advantage of counterparty 'using Bitcoin': they also have their own token and their own Blockchain, what is gained by having a ten minute block time?"
    • "The 'there's only one Blockchain' crowd is what we call 'Bitcoin maximalism'. I think this is more a political position than a pragmatic one: Ethereum Blockchain is secure and created from the ground up for contracts. Counterparty is hack trying to put them into a Blockchain that wasn't made for it and doesn't seem to want contracts. I do wish them the best, I just never saw their software stack."
    • "... they claimed they had cloned us and then the next day Vitalik answered that he had implemented counterparty in X lines of codes in ethereum."
  • VB response to "What Ethereum can do that Counterparty cannot"
    1. <15s block time
    2. Light client support
    3. Lack of exposure to Bitcoin development politics (personally, I think this point alone is enough to outweigh whatever 8x difference in dollars wasted per hour on PoW the maximalists like to wave around, and was the original reason for not making ethereum itself a bitcoin-based metacoin)
    4. Lack of exposure to the possibility of Paul Sztorc convincing bitcoin miners that XCP decreases the value of BTC and so should be censored by miners.
    5. Lack of artificially low block size limit
    6. Has a coherent long-term scalability roadmap
    7. Just to throw a bitcoin maximalist argument right back at them, ETH has way better liquidity than XCP so there's less overhead in acquiring the token to pay fees (alongside other network effects like developer tools, user community, etc)
    8. We have DELEGATECALL implemented, they as I understand don't
  • VB does give Counterparty one benefit
    "That said, counterparty is more closely linked to the bitcoin blockchain, so it's easier to make crowdsales that accept bitcoin directly; that's the primary point in favor of a bitcoin blockchain-based metacoin. Though now btcrelay makes up for quite a bit of that difference."
What About Lisk?
It's basically trying to be Ethereum, but using javascript (rather than Ethereum's clients which make a hell of a lot more sense, such as Go, C++, Python, Rust, Java, Ruby, .net). A Javascript Ethereum is a terrible idea, and even if it wasn't, why devote a whole new blockchain to it. Seems pointless, leading to some to suggest this may be an elaborate scam. I doubt it's a scam, but it does seem poorly thought out.
Ethereum's Solidity is VERY close to Javascript, but MUCH better for smart contracts.
As noted by Itsaconspiracy and Nevermindthequestion :
  • The javascript is sandboxed but unrestricted. They have half a dozen rules you're supposed to follow in contracts, to avoid breaking consensus. Nothing's stopping you from putting a call to math.random() in your contract and then nobody gets the same results. Every contract runs in its own sidechain so at least you're not breaking global consensus, but contracts can call each other so it's not totally isolates easier for bugs to sneak in. For example, if someone passes the string "1" into a parameter where you're expectd either.
  • Javascript numbers are all floating-point, so you can get rounding errors in your contracts. (It's possible that they provide a bignum library, but I don't think so, their rules for contract writers don't say "please use our bignum library.")
  • Javascript has weak dynamic typing, so it'ing a number, and you haven't written explicit code to convert it to a number, then you can end up with the wrong answer. ("1" + 2) / 3 = 4 in Javascript. (Try it yourself online).
  • Not to mention that the LISK contracts will be stored in plaintext, which means they'll be vastly more expensive to publish.
OK, so Bitcoin focused smart contracts and LISK are bad ideas, but sometimes bad ideas win, after all, bla bla "network effect"
Ethereum already has its own network effect within the smart contract space. Bitcoin is far behind. There really is no mechanism to catch up. At this time, there appears to be just as much fresh money going into Ethereum development as Bitcoin, if not more (200+ project and counting) and over a billion dollars in investments estimated this year by Vinay Gupta. Bitcoin is certainly used as a currency in more places, but its use as a currency is still pretty much a joke. An Ethereum credit card would make this "currency network effect" absolutely pointless. What people don't seem to get it that Bitcoin's market cap is larger as an artifact of it being around longer, but soon, that will change. The amount of new investment in Ethereum, the number of devs deeply involved in Ethereum projects, has already made Bitcoin's history irrelevant. It seems very obvious to me. In my opinion, it really is over already. Ethereum has already won its place as the primary public blockchain. It's just a matter of time before people realize it. And some very clever investors, already have.
submitted by nbr1bonehead to ethtrader [link] [comments]

Betting on the Superbowl without escrow: A laymen's guide to multi-signature transactions

So I just set up my first wager using m-of-n transactions with Bitcoin (It also happens to be my first bitcoin transaction, so I promise this guide is written for even Bitcoin beginners).
What are multisignature transactions:
Multisignature transactions require the signing of multiple private keys to be successfully posted to the blockchain. In this example, we'll create a multisignature address that requires at least two of three signatures to authenticate spends.
In my case, I was one bettor, my friend was the other bettor, and a well respected community member was the third, the arbiter. The point of a multisignature transaction in this case is to remove the arbiter's direct control over the funds, as would happen in a traditional escrow.
I'm using Coinbin's multisignature javascript tools to generate addresses and transactions.
The first step is to generate new bitcoin addresses for each party to use for signature purposes only.
For security purposes, I recommend going to http://brainwallet.org/#generator (so that the code which creates the multisignature address won't also have access to the private keys required to spend from it.
Type in a passphrase to generate an address, privatekey and public key. Save the private key and the public key. (I do not mean the Private Key(DER)...you want the normal private key and the public key)
You can now create a new multisignature address by going to https://coinb.in/multisig/
And clicking on New-> Multisignature Address.
Enter the keys, and select 2 as the number of keys needed to release the coins.
Save both the multisignature address and the redeem script, you will need them both.

DO NOT USE THE PUBLIC KEY OF AN ADDRESS WITH FUNDS. ONLY USE AN EMPTY ADDRESS/PUBLICKEY/PRIVATEKEY CREATED FOR THE PURPOSE OF SIGNING.

You should distribute that multisignature address and redeem script to the other parties,
Or ask them to generate it themselves (the address is unique to the three signatures, so all three parties will get the same information if they use the same public keys, if they enter in the same slots {so communicate which address is 1, 2, and 3})
Once the terms of the bet are agreed on:
Each bettor now sends a bitcoin transaction with their side of the bet to the multisignature address. If you want to be clear on the wager for the arbiter, put the terms in the transaction message.
(If you're using an online wallet, for example, just follow their procedures and use the multisignature address as the recipient)
All parties pay. The winner will receive the funds.
After the event is over and the winner is known, you can generate a transaction from the multisignature address to the bitcoin address of the winner (where the money should go).
Immediately after sending the money, Generate a transaction sending the winnings back to yourself and sign it as explained below. Then send that to your opponent and the arbiter (I like using pastebin.com for this purpose).
**The value in this is that after you've sent the signed the money and sent the signed transaction giving you the winnings, you are done. The loser will send you his signed transaction giving him the funds.
After the game is over, if he wins, sign the one he sent you.
If you win, he should sign the one you sent him. If the loser decides to "forget," send a PM to the Arbiter (who should have the half-signed transaction already cause you sent it to him after you placed the bet).
I recommend against using your signature address to store funds.
To crease a transaction, go to New-> Transaction. Enter the redeem script. This will pull up the multisignature address and the balance in the address.
Input the recipient address (the address for the winner of the bet) and the amount you would like to transfer. Make sure to leave enough for the fee (the fee is required in order to have the network accept the transaction).
If you would like to leave some money in the account, input the multisignature address as a second recipient of the transaction.
Click submit, and then copy the raw transaction into your clipboard.
Now, Click on the sign tab, and input the transaction you just generated, and your private signature key from step one. Click Sign.
Email (or IM or PM) the Signed transaction to the loser and the arbiter for their signature after the event.
Now, the loser can take the signed transaction and add their own signature (by inputting it on the Sign page along with their private key). If the loser renegs on the bet, the arbiter can sign in his place.
Once two of the three individuals sign the transaction, it can now be posted to the blockchain by clicking "Broadcast."
It does not matter who broadcasts the message (both parties could do so, the first would be accepted).
You have now placed a wager using multisignature transactions, without giving any one party control over the funds!
Enjoy!
submitted by harddata to Bitcoin [link] [comments]

Success with Raspberry Pi 3 and Blockchain API v2

I managed to get my Skyhook running on a Raspberry Pi 3 and it is successfully using the new Blockchain API v2 via the blockchain-wallet-service. The send-bitcoin process via the v2 service on the Pi3 takes only about 5 seconds. Not too bad at all.
Although it may be possible to image a MicroSD card with the contents of the regular Pi1 SD card, I opted to start from a fresh Rasbian Jessie (non-lite) install and start assembling the pieces from there.
After the usual Raspberry Pi setup procedures (expand filesystem, configure to boot to console, apt-get update, apt-get dist-upgrade etc etc)... here is a list the things I needed to address to get everything working. Please note I assembled this list through a lot of trial and error and had to backtrack a few times. I tried to keep track of just what was necessary but it is possible I missed some items from my notes below.
I mounted my original skyhook SD card via USB on my Pi3 so I could copy across files as needed. Whenever copying files, keep the permissions and ownership etc (cp -a) Also, when copying over config files, keep the original if possible. Sometimes handy to reference.
Install needed packages
Compare your old and new /vacache/apt/archives and start filling in the missing pieces. I started with php5, php5-mcrypt, apache2 etc. etc. I didn't try to duplicate those lists... just installed the obviously needed ones.
Main skyhook web directory
Copy your /vawww/btc dir across to the new pi.
Configure PHP
Copy /etc/php5/apache2/php.ini across and comment out (with semicolons) the 5 lines related to 'apc' at the bottom. I tried installing the apc.so library and ran into problems and found elsewhere that apc isn't really necessary anymore (?) with more recent php.
Configure Apache
Copy your /etc/apache2/sites-available/skyhook config file across to the new pi and add a symbolic link from the site-enabled (and remove the link for the default one). Note that you need to name the file with a .conf extension now. So name it "sites-available/skyhook.conf" and symbolically link it with the same name.
The mod-rewrite module needs to be enabled. Create the necessary symbolic link in mods-enabled to the mods-available dir.
Restart apache2.
Setup MySQL
Copy across the database dir to new pi: /valib/mysql/skyhook/
You also need to copy across ibdata1, ib_logfile0 and ib_logfile1 from the /valib/mysql directory.
Change ownership of all those files to mysql:mysql if they aren't already.
Restart mysql.
Add the "skyhook" mysql user with skyhook DB permsissions with empty password. Run "mysql" as root. > GRANT ALL PRIVILEGES ON skyhook.* To 'skyhook'@'localhost' IDENTIFIED BY ''; > FLUSH privileges;
Bill Scanner
The bill-scanner driver gets executed during the purchase stage and is executed as used "www-data". The original setup would modify the ownership of /dev/ttyUSB0 at bootup so that www-data could access it. This doesn't seem to work anymore on Jessie and the device remains with root:dialout ownership. So, instead, I just added www-data to the dialout group.
$ sudo usermod -a -G dialout www-data 
The python script also needs the "pycrypto" library.
$ sudo apt-get install python-crypto 
Temp ramfs directory
When you boot your Skyhook and type your admin password, the decrypted blockchain credentials (etc) are stored in a ramfs mount /tmp_disk
Create the directory as root then add the following to /etc/rc.local to properly setup the ramfs at boot (add it just above the exit 0):
/bin/mount -t ramfs -o size=32m,rw,uid=pi,gid=www-data,discard,user ramfs /tmp_disk /bin/chown pi:www-data -R /tmp_disk /bin/chmod 0770 /tmp_disk 
Blockchain API v2 wallet service
Install the wallet service as per: https://github.com/blockchain/service-my-wallet-v3#installation
I needed a newer version of nodejs and npm than is provided in the Jessie repo. Use this: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js
The addition of the new blockchain v2 api_key needs to be integrated into the php files. I don't have my changes documented so will need to add that in a comment later. Sorry.
To have the wallet service run at bootup I added the following to my /etc/rc.local file (again, somewhere above the "exit 0"):
cd /tmp # needed so nohup can output its nohup.out logfile /sbin/runuser www-data --shell=/bin/sh -c "/usbin/nohup /usbin/blockchain-wallet-service start &" 
I opted to have the service run as "www-data".
Networking
The Pi will have two network interfaces. The ethernet plug (eth0) and the Nexus wifi (usb0). Jessie does networking slightly differently. See: https://www.raspberrypi.org/forums/viewtopic.php?p=798866#p798866
In /etc/network/interfaces I commented out the wlan0 and wlan1 sections, set the eth0 interface to 'manual' and added a new interface line for the Nexus usb0 interface.
iface usb0 inet manual 
With those interfaces set to 'manual' in there, you now need to configure them in /etc/dhcpcd.conf The eth0 will default to dhcp but I added the following lines to the bottom of the file for usb0:
interface usb0 static ip_address=192.168.42.45 static routers=192.168.42.129 static domain_name_servers=8.8.8.8 
Done!
And that was it!
Along the way I found the following logs useful for diagnosing errors:
Not sure how alive Project Skyhook is anymore but I hope this is useful for some people. Please let me know if you have any questions and I'll do my best to answer them.
submitted by TKRSRY to projectskyhook [link] [comments]

My Feedback for Copay

First, this is now the best wallet out there, hands down, in my humble opinion. It's my new default for telling friends to go install this app to play with bitcoin.
Highlights:
Here's my (limited) feedback for improvement (iOS app):
Bitpay, you guys are killing it. Open source, clean software, giving back to the community. Thank you so much.
submitted by loveforyouandme to Bitcoin [link] [comments]

I have a product idea; can I learn as I go? Where to begin?

Hi webdev,
I'm a computer engineering student with an idea for an online website/service, and I've been interested in learning some webdev for a while now, so I'm planning on just going for it over the next month. The premise of the site is a site where users can sign up to organize tournaments for an existing online game, and pay Bitcoins to participate in these tournaments, with the earnings divided to the winners. The main purpose of the site will be to provide a fluid platform for hosting these tournaments.
I would appreciate some advice on how much I can take on and what things I should know/learn, and where I can learn them.
Thanks for taking the time to read this post and answer my newbie questions.
submitted by kslengk to webdev [link] [comments]

Create a Free BitCoin Web Wallet How to Hack Bitcoin Wallet Hack Coinbase wallet Bitcoin Generator July 30 2020 How to use Blockchain Wallet API v2 How to crack a Bitcoin wallet (How to crack a Coinbase wallet) May 27 2020 Bitcoin JSON-RPC Tutorial 7 - Wallet Notify

Build Blockchain. We are ready to start building our blockchain. Our blockchain is created using an empty constructor. This constructor sets some important parameters like our genesis block, the mining difficulty, any pending transactions and the mining reward for mining a new block.We will explain the exact use of the mining difficulty later in this article. What To Do If Your Hardware Wallet Is Lost, Stolen, Or Damaged This article provides step by step instructions on how to recover your cryptoassets if your Trezor Model T, Trezor One, Ledger Nano X, or Ledger Nano S hardware wallet is lost, stolen or damaged. If your hardware wallet is lost, stolen or damaged, you can easily and securely recover all of your cryptoassets, as long as you have ... Bitamp is an open-source, client-side, free Bitcoin wallet which allows you to send and receive Bitcoin securely on the blockchain. Remember to always verify your SSL connection before logging in. Look for the padlock to the left of bitamp.com in your browser. So I found my old wallet from 2011, I was able to pull my address and my PrivateKey using pywallet. I downloaded Bitcoin-QT, copied the old wallet over and reran with -scan. Since it was a new install the blockchain is still updating (not finished as of this post). Like a public wallet address with 1000btc is not exploitable now unless you know the private keys. It will not be centralised, there will be no single point of failure to target and empty all the 'bitcoin wills'. Code developers take all this into consideration, we are not talking about creating a centralised company called 'Coinbase Wills' that controls a big honeypot. Cyber criminals already ...

[index] [42024] [25504] [16853] [26176] [28874] [10758] [46892] [2771] [45964] [8604]

Create a Free BitCoin Web Wallet

If you saw my videos on another channel, then they will sell you some kind of virus or an empty file. The original program is only on my channel. The original program is only on my channel ... This is not necessarily the wallet I would recommend, I'm just showing you one of the alternatives and how it works in order to teach some basic beginner concepts of BitCoins. In the next video, I ... = Bitcoin Cash Wallet Coding Tutorial Welcome to this tutorial on how to create a Bitcoin Cash single-address wallet from scratch in JavaScript. In this tutorial, you will learn how to build a ... Bitcoin JSON-RPC tutorial. How to set up and use bitcoind wallet notify feature. My Book: Building Bitcoin Websites - https://www.amazon.com/Building-Bitcoin... If you saw my videos on another channel, then they will sell you some kind of virus or an empty file. The original program is only on my channel. The original program is only on my channel ...

#