This is a tutorial/AMA on how you can be running a full node, in the AWS cloud, for very low cost or even free.submitted by xtal_00 to Bitcoin [link] [comments]
I used to run a node on my local network but there is a problem with this; your public IP is broadcast, and then it gets associated with Bitcoin. Node owners are likely to own Bitcoin, and this raises your personal threat profile, validated against my IDS/IPS logs.
Run a VPN? Many VPNs are automatically blocked, or sketchy. Tor is also blocked on a large portion of the internet. Neither provide you with a real static IP, and that helps out the network.
There is a easy solution to this; run a node on the AWS free tier, and use an elastic IP so you have a static address. Bandwidth is free in, and low cost out, and you can control how much of that you use easily, and control your spent. The problem is that Amazon charges a LOT for online storage and even with a 1MB blocksize, the blockchain is very large and growing steadily! We mitigate this by using a VPN back to your network, where you can store the blockchain on a SMB share.
It is not complicated to do, but there are very many moving pieces to keep track of and configure. In order to fully trust your node, the best way is to build it from scratch. This is my goal in walking you through the process.
There are lots of ways to accomplish this same task; I only want to present one that works, and you can go from there. Once you have access to the blockchain in the cloud for reasonable prices, you can also look at things like the Lightning Network.
This article makes four major assumptions:
With that, on with the show!
First: Head on over to https://aws.amazon.com/ and make yourself an account.
Once you've set up you'll need to start the process of creating a virtual machine on AWS. Look for this graphic and click on it:
Start by launching a new machine
Follow the rabbit hole, and you'll be looking to create a plain jane Amazon AMI Linux instance. It looks like this:
Pick the basic AMI instance
Keep in mind you want to pick the x86 version, which is the default.
Continue clicking, you'll want to select the t2.micro instance that is eligible for the free tier for new accounts.
Pick the free tier. You can also upgrade to the smaller tier for more ram, but the micro works for now.
Now, you're going to need a way to connect to your soon-to-be-created node in the cloud. Amazon uses SSH keys to do this, so the next step means you're going to make some. You need to save this file, as if you lose it, you won't be able to access your node anymore. Much like your wallet private keys!
Beware losing your keys!
If you've made it this far, you're almost launched!
Now we need to convert the key to a format that we can use to connect to the instance from Windows. I recommend using Putty! https://www.putty.org/ if you don't have it already; if you're on OSX or Linux, you likely have what you need already.
Follow the guide here to get connected: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
Next you'll need to set up a opening in the firewall if you want incoming connections. This is done by adding to the security group in the "Network and Security" section; edit it to look like this:
Change the inbound security rules for the instance to accept incoming connections on 8333.
The hard part is over!
Optional: Configuring a static IP. Amazon calls their implementation "elastic" IPs, but it's really a static IP that you can move around between instances very easily. It will ensure your public address on AWS does not change; it isn't required, but it is better if you intend on allowing outgoing connections.
Go back to the main dashboard display.
In "Network and Security", click on "Elastic IPs".
Select Allocate New Address (blue button on top) and then select it in the table. In actions, you will see "Associate Address". Select this then assign the address to the instance you have previously configured. Done!
Next up: Log into your machine, and immediately update everything. Use the IP provided by Amazon, or the Elastic IP if you assigned one to the instance in the last step.
type: "sudo yum update"
Now, let's get the VPN configured.
First step is to install OpenVPN. We need to install the extended package library to do this.
type: "sudo amazon-linux-extras install epel"
type: "sudo yum-config-manager --enable epel"
Now you can install OpenVPN.
type: "sudo yum install openvpn"
You will need your credential file from OpenVPN; it's a file you generate that will have a .ovpn extension. But you're going to need to upload it to the instance. You can do this through the scp command on OSX or Linux, but if you're on Windows, you'll need another utility. Get WinSCP here: https://winscp.net/eng/download.php
But we'll have to tell it where your key file is so you can login. Select "New Session", then use the same IP and username as you did to connect before. We'll need to tell it about the key file though! Select the "Advanced" tab then under the SSH section, click on "Authentication" and then select your private key file you generated in the tutorial above.
Connect and upload the .ovpn file that you generated when you added a user for the VPN. This step depends on your OpenVPN configuration - ask below if you have problems.
Next, let's verify we can connect to the VPN!
type: "openvpn --config my-configuration-file-made-by-openvpn.ovpn &"
You will be prompted for a password if you configured one.
Verify operation by pinging your LAN router, e.g.
type: "ping 192.168.2.1" or the address of the SMB server where you shared the information.
Allllrighty! Next up is getting connected to your blockchain. Create a directory where the data directory will be mounted.
type: "mkdir blockchain"
We need to install samba and some utilities to get things mounted.
type: "sudo yum install samba"
type: "sudo yum install cifs-utils"
Now let's mount the folder:
type: "sudo mount -t cifs //192.168.2.100/Bitcoin ./blockchain -o user=bitcoin,vers=2.0,uid=ec2-user,gid=ec2 user,file_mode=0777,dir_mode=0777"
Where " //192.168.2.100/Bitcoin" is the address of the SMB server and share where you put the data directory from your initial sync. If you didn't, and just want to sync everything from AWS, then make sure it's a folder where your user has access. In this case, I'm assuming you've made a SMB user with the name "Bitcoin". The command will prompt you for the password to access the share. The other bits ensure you can have read and write access to the share once it's mounted in AWS.
Now we're ready for some Bitcoin! Props to the tutorial here: https://hackernoon.com/a-complete-beginners-guide-to-installing-a-bitcoin-full-node-on-linux-2018-edition-cb8e384479ea
But I'll summarize for you:
Download and then re-upload with WinSCP, or download directly to your instance with wget, the most current Bitcoin core. In this case, it's bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz downloaded from https://bitcoin.org/en/bitcoin-core/.
Let's verify it hasn't been tampered with once you have it uploaded to the terminal:
type: "sha256sum bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz"
Then compare that with the hash value that's listed in the SHA256SUMS.asc file on bitcoin.org. In this case, "36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" all matches up, so we know nobody has done anything evil or nefarious to the file.
Unzip the file:
type: "tar zxvf bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz"
There is a warning about a symbolic link; everything seems to work OK regardless, but if anyone knows what or how to fix, please comment.
We'll need to get some missing libraries before we can run it; these aren't in the basic AMI instance.
type: "sudo yum install glibc.i686"
type: "yum install libgcc_s.so.1"
FINALLY! We are ready to launch the program. Go to the "bin" directory inside where you unzipped the Bitcoin Core tarball. (e.g. /home/ec2-useblockchain/bitcoin-0.18.0/bin)
You will see the program either start to sync and download, or start to read the existing blockchain file that you put in the share from before.
There are a couple extra steps to have it automatically start on reboot, but let's see if anyone gets this far first. I use the "screen" program to do this, but there's also a daemon mode, and some other functionality that is discussed in the hackernoon tutorial.
The primary cost will be outgoing bandwidth. AWS charges $0.10/GB beyond 15GB; You can limit the outgoing bandwidth easily according to your budget: https://bitcoin.org/en/full-node#reduce-traffic
Hope this encourages people to try running a free, or very low cost, cloud node, with a substantially reduced threat profile.
SegWit would make it HARDER FOR YOU TO PROVE YOU OWN YOUR BITCOINS. SegWit deletes the "chain of (cryptographic) signatures" - like MERS (Mortgage Electronic Registration Systems) deleted the "chain of (legal) title" for Mortgage-Backed Securities (MBS) in the foreclosure fraud / robo-signing fiasco65 points - 50% upvoted - 8.5k views
CENSORED (twice!) on r\bitcoin in 2016: "The existing Visa credit card network processes about 15 million Internet purchases per day worldwide. Bitcoin can already scale much larger than that with existing hardware for a fraction of the cost. It never really hits a scale ceiling." - Satoshi Nakomoto416 points - 91% upvoted - 3.0k views
Skype is down today. The original Skype was P2P, so it couldn't go down. But in 2011, Microsoft bought Skype and killed its P2P architecture - and also killed its end-to-end encryption. AXA-controlled Blockstream/Core could use SegWit & centralized Lightning Hubs to do something similar with Bitcoin442 points - 82% upvoted - 2.8k views
Gavin Andresen: "Let's eliminate the limit. Nothing bad will happen if we do, and if I'm wrong the bad things would be mild annoyances, not existential risks, much less risky than operating a network near 100% capacity." (June 2016)385 points - 89% upvoted - 1.4k views
What is up with all these Bitcoin devs who think that their job includes HARD-CODING CERTAIN VALUES THAT ARE SUPPOSED TO BE USER-CONFIGURABLE (eg: "seed servers")?118 points - 79% upvoted - 1.3k views
I just figured out a lot today - about Bitcoin, about scaling, about "Satoshi", about trolls and downvotes and snowflakes. And for the first time in years, I am very, very optimistic about the future of Bitcoin - because of a certain eccentric, arrogant, capitalist mathematician who curses a lot.71 points - 70% upvoted - 1.2k views
"It's funny Core never wanted a compromise until they were losing. Fuck them, they lost, no compromise. Winner takes all, bitches." ~ u/zimmah192 points - 76% upvoted - 1.1k views
u/theymos: "I can't recommend running BIP148 software. Doing so will likely cause you to break away from the real Bitcoin currency on the flag day, create a mess of your datadir which you'll need to manually clean up, and theoretically there are opportunities for losses due to counterfeit BTC." Wow!144 points - 91% upvoted - 1.1k views
|Number of Posts||View Count||% Upvoted||Points|
|1 : "SegWit = MERS"||8500||50%||65|
Adam Back & Greg Maxwell are experts in mathematics and engineering, but not in markets and economics. They should not be in charge of "central planning" for things like "max blocksize". They're desperately attempting to prevent the market from deciding on this. But it will, despite their efforts.https://np.reddit.com/btc/comments/46052e/adam_back_greg_maxwell_are_experts_in_mathematics/
Greg Maxwell u/nullc says "The next miner after them sets their minimum [fee] to some tiny value ... and clears out the backlog and collects a bunch of funds that the earlier miner omitted" - like it's a BAD THING. Greg is proposing a SUPPLY-LIMITING AND PRICE-FIXING CARTEL, like it's a GOOD THING.https://np.reddit.com/btc/comments/5i4885/greg_maxwell_unullc_says_the_next_miner_afte
Gregory Maxwell nullc has evidently never heard of terms like "the 1%", "TPTB", "oligarchy", or "plutocracy", revealing a childlike naïveté when he says: "‘Majority sets the rules regardless of what some minority thinks’ is the governing principle behind the fiats of major democracies."https://np.reddit.com/btc/comments/44qr31/gregory_maxwell_unullc_has_evidently_never_heard/
Wladimir van der Laan (Lead Maintainer, Bitcoin Core) says Bitcoin cannot hard-fork, because of the "2008 subprime bubble crisis" (??) He also says "changing the rules in a decentralized consensus system is a very difficult problem and I don’t think we’ll resolve it any time soon." But Eth just did!https://np.reddit.com/btc/comments/4ttv32/wladimir_van_der_laan_lead_maintainer_bitcoin/
[reddit change] Post view counts, users here now and traffic page updateshttps://np.reddit.com/changelog/comments/6bj0iy/reddit_change_post_view_counts_users_here_now_and/
Use Cloudsearch to search for posts on reddit within a time framehttps://np.reddit.com/reddittips/comments/2ix73n/use_cloudsearch_to_search_for_posts_on_reddit/
Find live Bitcoin stats, including market price, mining revenue, number of Bitcoin transactions and more. Explore detailed Bitcoin data today. - Blockchain bitcoind -daemon --datadir=/mnt/bitcoin. If everything is successful, you should see the following output: Bitcoin Core starting A note on the data directory. Since we're starting the daemon with a non-standard data directory, we'll need to specify the datadir every time we use the bitcoin-cli command, like this: bitcoin-cli -datadir=/mnt/bitcoin If you want to store them in D:\BitcoinData then click on "Properties" of a shortcut to bitcoin-qt.exe and add -datadir=D:\BitcoinData at the end as an example: "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData Start Bitcoin, now you will see all the files are created in the new data directory. Linux . By default Bitcoin will put its data here: ~/.bitcoin/ You need to do ... However, dealing with the block chain comes at a price. An ever-growing data set causes smaller hard drives to fill up quickly. Furthermore, a new wallet can’t be used until the full block chain is downloaded and processed, which can take several hours on mid-range equipment. These problems can be solved by moving and copying Bitcoin Core’s data directory. This article describes two ... If you want to store them in D:\BitcoinData then click on "Properties" of a shortcut to bitcoin-qt.exe and add -datadir=D:\BitcoinData at the end as an example: "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData Start Bitcoin, now you will see all the files are created in the new data directory. Linux . By default Bitcoin will put its data here: ~/.bitcoin/ You need to do ...
[index]          
Список команд: cp -p -r .esbcoin .esbcoin2 - копировать папку блокчейна, esbcoin2 можно заменить на любое другое название ... geth --datadir "(dir)" --nodiscover --rpc --rpcport "8545" --rpccorsdomain "*" console 2 > console.log Add the rpc flags above - they are all necessary (have removed all other flags to hide noise ... Welcome to part 4 of my Ethereum from scratch series. In the previous video we showed how to create and deploy your first smart contract on your local private test network and this week we take it ... You may want to keep wallets on a USB stick or have multiple instances of the same coin but with separate wallets on the same computer. These simple instructions tell you how. It assumes you know ... esbcoind -datadir=.esbcoin2 -daemon - laucnh wallet daemon of second masternode esbcoin-cli -datadir=.esbcoin2 masternode status - check status second masternode Website: https://esbc.pro