FS#45194 : [bitcoin-daemon] Various PKGBUILD ... - Arch Linux

Creating a Headless Staking Node on Ubuntu 18.04

Creating a Headless Staking Node on Ubuntu 18.04
##UPDATE## Step 8 - Option 2, has some bugs in the final build process. i haven't had time to work them out yet!

This guide will take you through building and running a headless x42 Full Node! The OS I am using here is Ubuntu 18.04, this guide picks up from a complete/fresh ubuntu install.
This is meant to setup a staking node and so this guide will run you through building, configuring and setting up staking. It will not cover sending transactions or anything else.
The things we are going to do:
  • Step 1 - Install .net core
  • Step 2 - Download The x42 Node Source & Compile It
  • Step 3 - Setting The x42 Node Up To Run On Boot
  • Step 4 - Setup A New Wallet
  • Step 5 - Configure The x42 Daemon
  • Step 6 - Get Address
  • Step 7 - Check Balance
  • Step 8 - Connect The UI Wallet To A Headless Node
  • Step 8 - [Option 1 - Use Installer] Connect The UI Wallet To A Headless Node
  • Step 8 - [Option 2 - Build/Compile UI Only] Connect The UI Wallet To A Headless Node # BROKEN#

Step 1 - Install .net Core

Here is the reference link:
https://dotnet.microsoft.com/download/linux-package-manageubuntu18-04/sdk-current
Register Microsoft Key’s & Install Their repos:
cd /tmp wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb sudo add-apt-repository universe sudo apt -y install apt-transport-https sudo apt update sudo apt -y install dotnet-sdk-2.2 
Microsoft collect telemetry data by default, if you are part of the “tin foil hat brigade” you can set the following environment variable to turn it off:
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" >> /etc/environment 
now you should be at a point where .net core is installed on your system… that wasn’t so hard was it! You can check by running the following command:
dotnet--list-sdks 
The output should look like this:
$ dotnet --list-sdks 2.2.103 [/usshare/dotnet/sdk] 

Step 2 - Download & Compile The x42 Node

This part assumes you have GIT installed, if not:
apt -y install git 
Now to pull down the source and compile it!
cd ~/ git clone https://github.com/x42protocol/X42-FullNode.git # “cd” into the source folder cd X42-FullNode/src/ 
Now .net core uses NuGet for package management, before we compile, we need to pull down all of the required packages.. its as simple as running (this will take a couple of minutes) inside of “X42-FullNode/src/”:
dotnet restore 
now we are ready to compile the source, execute (inside of “X42-FullNode/src/”):
dotnet build --configuration Release 
ignore the yellow warnings, this is just the rosyln compiler having a grumble.. if you get red ones then something went wrong! The “--configuration Release” will strip out all debug symbols and slim things down.. only a little, this optional parameter is not mandatory.
Once this is done everything is built/compiled, you can run the daemon directly from the repository, this can be done by going to:
cd ~/X42-FullNode/src/x42.x42D/bin/Release/netcoreapp2.1 dotnet x42.x42D.dll 
this will kick off the node, however if you exit SSH at this time it will kill the process! however I always recommend copying out the binaries to a separate folder. This can be done with the following:
mkdir ~/x42node mv ~/X42-FullNode/src/x42.x42D/bin/Release/netcoreapp2.1/*.* ~/x42node/ 
now we have everything we need to run the node outside the git repository! What we need to do now is run the node and have it create the default x42.conf file.. so
cd ~/x42node dotnet x42.x42D.dll 
feel free to hit “CTRL + C” to exit the application after a couple of seconds, by then the folders/files would have been created at the following path:
~/.x42node/x42/x42Main/ 

Step 3 - Setting The x42 Node Up To Run on Boot

Now we are going to create a service file so our x42 node automatically starts when the system is rebooted.
THINGS TO NOTE ABOUT BELOW.. CHANGE THE ##USER## to the username your currently using as these files are within your home directory!
We need to drop to root for this..
sudo -i cat < /etc/systemd/system/x42node.service [Unit] Description=x42 Node [Service] WorkingDirectory=/home/##USER##/x42node ExecStart=/usbin/dotnet /home/##USER##/x42node/x42.x42D.dll Restart=always # Restart service after 10 seconds if the dotnet service crashes: RestartSec=10 SyslogIdentifier=x42node User=##USER## Environment=ASPNETCORE_ENVIRONMENT=Development [Install] WantedBy=multi-user.target EOF 
To enable the service, run the following (as the root user):
systemctl enable x42node.service 
BOOM.. the node isn’t running yet.. but next time the system restarts it will automatically run!
now lets exit out of root!
exit 
We can now start the node up and begin downloading blocks, by running the following command:
sudo systemctl start x42node.service 
if you want to check its loaded and see some of the output, you can run:
sudo systemctl status x42node.service 
an example of the output:
$ sudo systemctl status x42node.service ● x42node.service - x42 Node Loaded: loaded (/etc/systemd/system/x42node.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-01-24 15:47:55 UTC; 14s ago Main PID: 5456 (dotnet) Tasks: 23 (limit: 1112) CGroup: /system.slice/x42node.service └─5456 /usbin/dotnet /home/darthnoodle/x42node/x42.x42D.dll Jan 24 15:48:09 x42staking x42node[5456]: Batch Size: 0 Mb (0 headers) Jan 24 15:48:09 x42staking x42node[5456]: Cache Size: 0/50 MB Jan 24 15:48:09 x42staking x42node[5456]: Jan 24 15:48:09 x42staking x42node[5456]: =======Mempool======= Jan 24 15:48:09 x42staking x42node[5456]: MempoolSize: 0 DynamicSize: 0 kb OrphanSize: 0 Jan 24 15:48:09 x42staking x42node[5456]: Jan 24 15:48:09 x42staking x42node[5456]: info: Stratis.Bitcoin.Connection.ConnectionManagerBehavior[0] Jan 24 15:48:09 x42staking x42node[5456]: Peer '[::ffff:86.184.76.255]:52342' connected (outbound), agent 'x42:1.2.13 (70012)', height 213920 Jan 24 15:48:09 x42staking x42node[5456]: info: Stratis.Bitcoin.Connection.ConnectionManagerBehavior[0] Jan 24 15:48:09 x42staking x42node[5456]: Peer '[::ffff:86.184.76.255]:52342' offline, reason: 'Receiving cancelled.'. All node screen output can be found in the /valog/syslog file. 

Step 4 - Setup a New Wallet

With the Node running, we now need to setup and/or restore a wallet!
Everything will be performed through the API’s, however by default these API’s are listening on localhost (127.0.0.1), if you are connecting in remotely then this would be a problem since you cant hit that IP. The solution, SSH TUNNEL!
Execute the following command on your local system:
ssh -L 42220:localhost:42220 @ 
This binds the local port (on your system) with 127.0.0.1:42220 on the remote system, once you have executed the command you can type the following address in your laptop/desktop’s web browser and be able to access the API’s:
http://127.0.0.1:42220/swaggeindex.html 
It should look something like this:
https://preview.redd.it/9lzeg3vob8d21.jpg?width=482&format=pjpg&auto=webp&s=b5d574998816056140d5d6de7b03c56772a892fe
To Create a new wallet, first we have to generate some mnemonic works (e.g. the seed), you can do that by going to the following API:
/api/Wallet/mnemonic 
Hit the “Try it out” button which then prompts you for 2 fields:
https://preview.redd.it/dvbdllfrb8d21.jpg?width=722&format=pjpg&auto=webp&s=766d14bafba6facbcd56d31c63c0012748e682e5
Enter “English” and I would recommend 24 words as this greatly increases the seed strength! Once that is done you hit execute and then scroll down to see the “Response Body”, this should contain the mnemonic which you are going to use to create the wallet! This looks something like below:
https://preview.redd.it/6p4q0rsub8d21.jpg?width=603&format=pjpg&auto=webp&s=44b9265626467a43ca670b134c4d28187f475c2e
THIS IS VERY IMPORTANT, BACKUP THIS MNEMONIC TO A SAFE SECURE LOCATION THAT IS ENCRYPTED!!!
So now we have our mnemonic, its time to generate the wallet, for this we need to use the API:
/api/Wallet/create
There are a number of parameters which are required in order to create a wallet:
WalletCreationRequest{ mnemonic string password* string passphrase* string name* string } 
It should be noted that the password and mnemonic are is the most important parts of this request where the “password” will encrypt the wallet and Is required to unlock it.
  • Hit the “Try it out” button
  • input the necessary data
  • Insert the mnemonic
  • Put a password & passphrase
  • “Name” is what your wallet will be called
It should look something like the following:
https://preview.redd.it/958ttfbxb8d21.jpg?width=603&format=pjpg&auto=webp&s=ce48336436ea4b469b5e87513da802de0bf444ee
Hit “Execute”, the “Loading” sign may spin for a few minutes while the wallet is created… once the wallet has been created the “Response Body” will return the mnemonic you have just used.. we now have a wallet!!
HOWEVER IT IS NOT LOADED INTO THE NODE JUST YET!
This is where we will now jump back out and to configure the node to automatically load the wallet and automatically start staking when it first loads.
AGAIN BACKUP YOUR MNEMONIC AND PASSWORD, MAKE SURE THEY ARE ENCRYPTED AND STORED SOMEWHERE SAFE!

Step 5 - Configure The x42 Daemon

Now we are going to modify the x42.conf file in order to automatically load our wallet and start staking 😊
First things first, lets stop our node by running the following command:
sudo systemctl stop x42node.service 
CD to the following folder and view its contents:
~/.x42node/x42/x42Main ls -lah 
within that folder there should be 2 files you are interested in:
-rw-r--r-- 1 darthnoodle darthnoodle 18K Jan 28 16:01 TestWallet.wallet.json -rw-rw-r-- 1 darthnoodle darthnoodle 3.1K Jan 24 15:25 x42.conf 
So TestWallet.wallet.json is our physical wallet that will be loaded, but for right now we want to modify the x42.conf file.. fire up your favourite text editor (if you use VI you’re a masochist)..
nano x42.conf 
The area we are interested in is the following:
####Miner Settings#### #Enable POW mining. #mine=0 #Enable POS. #stake=0 #The address to use for mining (empty string to select an address from the wallet). #mineaddress= #The wallet name to use when staking. #walletname= #Password to unlock the wallet. #walletpassword= #Maximum block size (in bytes) for the miner to generate. #blockmaxsize=1000000 #Maximum block weight (in weight units) for the miner to generate. #blockmaxweight=1000000 #Enable splitting coins when staking. #enablecoinstakesplitting=1 #Minimum size of the coins considered for staking, in satoshis. #minimumstakingcoinvalue=10000000 #Targeted minimum value of staking coins after splitting, in satoshis. #minimumsplitcoinvalue=10000000000 
Uncomment (remove the #) of the following lines and change their value:
stake=1 (changed to 1) walletname=TestWallet (changed to our Wallet Name) walletpassword=password123 (changed to the wallet password) 
save the file and exit back to the command prompt, now we shall restart the node with the following command:
sudo systemctl status x42node.service 
now the wallet is automatically loaded and ready for action!
YES I KNOW YOU HAVE PUT YOUR PASSWORD IN CLEARTEXT, THIS IS WHERE YOU SHOULD HARDEN YOUR BOX. IF THEY CAN GET TO THE POINT WHERE THEY CAN READ YOUR CONF FILE THEY CAN JUST GRAB YOUR WALLET AND BRUTEFORCE THE PASSWORD.
You can check its loaded by going back to the API and executing the following command:
/Dashboard 
Or execute the following command on the NODE:
curl -X GET "http://127.0.0.1:42220/Dashboard" -H "accept: application/json" 
both will produce the same output, if you scroll to the bottom you should see something like this:
======Wallets====== TestWallet/account 0, Confirmed balance: 0.00000000 Unconfirmed balance: 0.00000000 
This means the wallet is loaded and ready for action!!

Step 6 - Get Addresses

Next thing you are probably going to want is a receive address and to check the balance and TX history.. so lets start with getting an address!
Go to the following API:
/api/Wallet/unusedaddress 
Fill in the Wallet name which is “TestWallet” (in this example) and “account 0” (which is the first/default account):
https://preview.redd.it/ayri5jk0c8d21.jpg?width=602&format=pjpg&auto=webp&s=2d16bbb78da49c0125d24d0834c9454d702cb7a1
Hit execute and you should have an x42 address within the “Response Body”:

https://preview.redd.it/tmc495j3c8d21.jpg?width=349&format=pjpg&auto=webp&s=b00177f66a9e24c980d3c6d4e532a33cbf3fb0bc
BOOM… ok now we can receive funds! 😊

Step 7 - Check TX History

Go to the API and the following call:
/api/Wallet/history 
The 2 fields we are most concerned about are:
https://preview.redd.it/lw194af6c8d21.jpg?width=602&format=pjpg&auto=webp&s=27e264bc008879355ff5b9c50a0a5cb06f16e960
Input the name of the wallet and account you want to view the history of, then hit execute. The other fields can be black. This will return a list of TX’s that the wallet has received:
This should look like the following:
https://preview.redd.it/x1hgargac8d21.jpg?width=585&format=pjpg&auto=webp&s=4fd25f22772f4bcec523a6e82b321ae8146a2c75
There is an easier way of doing this, that doesn’t require you to be connected to your node.. especially if your only interested in viewing your staking rewards… THE EXPLORER!
Access the following URL:
https://explorer.x42.tech/address/ 
this will allow you to easily see all TX’s associated with this address, it should look something like below:
https://preview.redd.it/e480grscc8d21.jpg?width=601&format=pjpg&auto=webp&s=0f8a9ebc7944dfcc73f7df659bd839bb983ba90c
… and your done! By this point your node should be running, staking and you have an easy way to view transactions/rewards 😊


Step 8 - Connect The UI Wallet To A Headless Node

The UI utilises a combination of technologies, however the important part is the code attempts to access the x42 Node API on 127.0.0.1:42220.
So you have 2 options here:
  1. Download the Wallet Installers
  2. Compile The UI Yourselves
Pick the option that best suits you given the pros/cons below:
Option 1 - Pro's/Cons
Pro's
  • If you use the installer, its quick and easy.
Cons
  • This also installs an x42 node on your system which runs when the UI loads.
  • If you dont setup an SSH tunnel before running the wallet the local node will bind to the port and the tunnel wont work.. you will be connecting to the local wallet!!
Option 2 - Pro's/Cons
Pro's
  • You only run the UI, the x42 node is not installed
  • you dont have a superfluous node running, downloading blocks on your local system
Cons
  • Time Consuming
  • Have to download dependencies and manually compile the code

Pre-Requirement - Needed For Both Options!!
As previously mentioned, the UI attempts to access the API's on 127.0.0.1:42220, however our node isnt running on our local system. IN ORDER TO GET IT WORKING YOU NEED TO HAVE AN SSH TUNNEL, THIS TUNNEL NEEDS TO REMAIN ACTIVE WHENEVER YOU WANT TO ACCESS THE WALLET.
this can be done by executing the following command:
ssh -L 42220:localhost:42220 @ 


Step 8 - [Option 1 - Use Installer] Connect The UI Wallet To A Headless Node

Download and install the UI/Wallet & Node from:
https://github.com/x42protocol/X42-FullNode-UI/releases

DO NOT RUN THE WALLET YET!
Those of us who dont want to run a local node and just want the UI, execute the following commands (as an administrator):
cd C:\Program Files\x42 Core\resources\daemon\ ren x42.x42D.exe x42.x42D.exe.bak 
The above is with Windows, if your are in *NIX then locate the daemon and rename it (i will update how to do that/where to find it shortly)
Setup the SSH tunnel as outlined above, Execute the wallet and it will load, however you will see an exception:

https://preview.redd.it/9os5h8q7scd21.jpg?width=550&format=pjpg&auto=webp&s=ac45ed7bc987917142075c61fb486e7d71f820d1
dont worry, this is just the wallet trying to execute/start the x42 node which we dont want, if all works according to plan.. after you click "OK" you should now be presented with the wallet UI and have the option to select what wallet you would like to load:

https://preview.redd.it/hnyt0b4mscd21.jpg?width=958&format=pjpg&auto=webp&s=a47df710a804375d8363ffcd77d1ede2862b9b4d
... DONE!

Step 8 - [Option 2 - Build/Compile UI Only] Connect The UI Wallet To A Headless Node ###BROKEN

THIS IS STILL A WORK IN PROGRESS, THE ELECTRON BUILD DOESNT WANT TO COMPILE BECAUSE SOME CODE IS MANGLED SOMEWHERE!!

Ok, this is the fun bit! .. we need to install the following dependencies. these instructions are written for a Windows system but it should be easy enough to perform the same on a *NIX system.
Install Dependencies
In order to build the wallet UI, you need to install the following components:
  • git
  • NodeJS
  • Electron Builder
First thing you need to do is install git, so download and install the package:
https://gitforwindows.org/
Next you need to install NodeJS, download and install the package:
https://nodejs.org/en/download/
Next we need to install the node package manager:
npm install npx –verbose 
next we need to make sure we have Visual Studio build tools and Python (2.7) installed, this can be done by executing the following (AS AN ADMINISTRATOR!):
npm install -g --production windows-build-tools 
this will install the necessary tools to build C#/C++ code and python 2.7, this could take some time! When its done you should have something like the following;

https://preview.redd.it/5ekfy5g1kcd21.jpg?width=490&format=pjpg&auto=webp&s=f65196dee6f78f2ececec5ee8b5df1044d68f635

Build & Install - Windows
Create a temp folder to navigate to a folder where you want to download the GIT repository, execute the following command:
git clone https://github.com/x42protocol/X42-FullNode-UI.git 
This will clone the repository into the folder, it will only clone the wallet and not the Node source! now lets CD into the folder and build the UI:
cd X42-FullNode-UI\FullNode.UI npm install 
This will download and install all dependencies (can take a while), at the end you should see something like..

https://preview.redd.it/0zfbfxa8kcd21.jpg?width=601&format=pjpg&auto=webp&s=438d072a6ab2bc7a3d84a8dfe773968acc762bc7
Now the stock UI has a number of third-party libraries which contain some vulnerabilities, being a security conscious person, ive also run:
npm audit fix 
when this is done, we have fixed most of the package vulnerabilities 😊 We also get a complaint about the typescript library being too new for the version of angular in use, so run the following command to install the additional dependency:
npm install [email protected]">=2.4.2 <2.7.0" 
now its time to build the UI, execute the following:
npm run build:prod 
once complete you should see something like the following..

https://preview.redd.it/56vf9zfckcd21.jpg?width=601&format=pjpg&auto=webp&s=31b72daff9ab5001843cba529a7bd38c76fd099d
Next its time to compile the electron binary, it should be noted that the build/package process utilises AppVoyer which is not installed and if you attempt to build right now you will get the following error:
cannot expand pattern "${productName}-v${version}-setup-${os}-${env.arch}.${ext}": env arch is not defined. 
To fix this we need to modify the build file, this is a quick one liner that can do it:
powershell -Command "(gc electron-builder.json) -replace 'env.arch', 'arch' | Out-File electron-builder.json" 
Essentially the offending line for Windows is..
"artifactName": "${productName}-v${version}-setup-${os}-${env.arch}.${ext}" 
The build cannot resolve “env.arch”, so the above one liner replaces “env.arch” with “arch” which works 😊
execute the following command:
npx electron-builder build --windows --x64 
At present i get the following error, no matter what i do.. and ive ran out of time to go hunting about.. if anyone has any ideas on how to fix then please post in here or message me on discord:

https://preview.redd.it/t66rtuqdtcd21.jpg?width=918&format=pjpg&auto=webp&s=a3f1a5ff682586348909c67645ca7ae9454922ff


Happy staking!

If you found this post helpful, then buy me a beer and send a donation to XQXeqrNFad2Uu7k3E9Dx5t4524fBsnEeSw
submitted by D4rthNoodle to x42 [link] [comments]

/r/Plex's Tool Tuesday Thread - 2016-07-26 - PlexPy

Each week, we take a look at a tool that may sit on a Plex server stack, but may not be directly Plex-related. If you need help with this or any other tangibly related tool, pop it in the comments!

PlexPy.

Write-up by SwiftPanda16.
After that debacle two weeks ago, I'm surprised the other mods still let me write this. (I got my eye back!) Well, let's not waste anymore time and get right into it!
Summary
Description A python based web application for monitoring, analytics, and notifications for Plex Media Server.
Screenshots Imgur Album
Platforms Windows, OSX, Linux, FreeBSD/FreeNAS, Docker, QNAP, ReadyNAS
Installation Installation Wiki on GitHub

What is PlexPy?

Taken directly from the GitHub page, PlexPy is:
A python based web application for monitoring, analytics, and notifications for Plex Media Server.
Basically, it is a 3rd party application that you can run along side your Plex Media Server to monitory activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. The only thing missing is "why they watched it?", but who am I to question your 42 plays of Frozen. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server with screenshots.
Another major feature of PlexPy is notifications, and there are a lot of them. You can set it up to receive notifications when someone streams something from your server, or a let your friends know when you add the latest episode of My Little Pony to your library. It can even notify you if your server goes down or an update is available. PlexPy supports all of the major notification agents, with more being added all the time.
  • Tip: One of the most underrated features in PlexPy is the custom scripts that can be triggered as notifications. Some uses I've seen include changing Hue lights when you start playing something, or creating custom email newsletters.

How do I install PlexPy?

PlexPy can be installed on any system that can run a Python script. The installation wiki page covers the steps to install PlexPy on the major systems: Windows, Linus, OSX, FreeBSD/FreeNAS, as well as Docker, QNAP and ArchLinux. (No, PlexPy cannot run off of your brand new Nvidia Shield).
  • Tip: Make sure you have Python 2.7.x installed prior to following the instructions on the wiki page. Python 3.x is currently not supported by PlexPy.
  • Tip: Out-of-the-box, PlexPy must be run with from the command line/shell/terminal, which means that it must stay open for PlexPy to continue working. There are further instructions in the wiki to install PlexPy as a daemon, which will allow you to run PlexPy in the background instead.
  • Tip: If you previously used PlexWatch of Plexivity to track your Plex server statistics, you can import the database from those tools into PlexPy for historical data.

PlexPy doesn't work!

Firstly, make sure you take the time to read through the FAQ wiki page, answers to many of the common issues can be found there. If you still require help, you can ping me on the official PlexPy Gitter chat, or the /Plex Discord server. I will respond the quickest in those two places. You can also post on the Plex forum thread or in the comments below.
Please only use GitHub issues if you have an actual bug report, and make sure to read the guidelines first. Same thing for feature requests.

How can I support PlexPy?

If you know how to code, and want to contribute to PlexPy, please submit a pull request on GitHub (guidelines). You can also support the project by voting for the features you would like to see in future updates to PlexPy over on FeatHub.
If you don't know how to contribute, but you would still like to support future development, you can send me a donation on PayPal or toss me some bitcoins on ChangeTip. Thanks for everyone's support! (Really, buy me a drink or something. PlexPy is a lot of work.)

About the developer.

Full disclosure, I don't have a background in coding/programming and didn't even know Python prior to working on PlexPy. Everything I've learned is self-taught and PlexPy is 75% written by StackOverflow answers. (As long as the code works, amirite?) I am a recent university graduate with a Master's degree in Structural and Earthquake Engineering and I design roller coasters for my day job. My server consists of a 18TB raidz2 array running on FreeNAS with a Pentium G3220 processor and 16GB of ram.
Credit must be given to drzoidberg33 who originally created PlexPy based of of PlexWatch/PlexWatchWeb, and ultimately landed himself a job at Plex!
Click here to check out our full list of Plex Tools. If you have a tool that you think should be added, please let us know!
submitted by PCJs_Slave_Robot to PleX [link] [comments]

Iquidus Block Explorer Guide

Pre-requisites: - Rent Server - Connect with SSH/PuTTY

Iquidus "An open source block explorer" https://github.com/iquidus/explorer

Node and Iquidus Explorer Setup for Dummies https://gist.github.com/zeronug/5c66207c426a1d4d5c73cc872255c572

1. Install & Configure BiblePay https://www.reddit.com/BiblePay/comments/6ummuj/how_to_mine_biblepay_on_linux/
After Installing the coin, Add RPC & Server settings:
vi biblepay.conf rpcuser=XXXX rpcpassword=XXXX rpcport=XXXX listen=1 server=1 daemon=1 txindex=1 

2. Install MongoDB https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list sudo apt-get update sudo apt-get install -y mongodb-org sudo service mongod start cd /valog/mongodb tail mongod.log # [initandlisten] waiting for connections on port  # Port 27017 by default 
3. Setup MongoDB
mongo use explorerdb db.createUser( { user: "iquidus", pwd: "3xp!0reR", roles: [ "readWrite" ] } ) exit 
4. Install Node.js
sudo apt-get update sudo apt-get install nodejs nodejs-legacy -y sudo apt-get install npm 
5. Install Iquidis Block Explorer
cd home/username git clone https://github.com/iquidus/explorer explorer # gyp build errors # https://github.com/nodejs/node-gyp/issues/809 sudo apt-get install libkrb5-dev cd explorer && npm install --production cp ./settings.json.template ./settings.json 
5.a Add Custom Fix for vout bug
https://github.com/DeckerSU/explorecommit/ac74e41c6162871fcaa6973d34f09f1cf3e5a1ce https://github.com/cryptorex/bitcoinz-explorecommit/267a0dfd8015bc90488b2b53ae9c49be2da83bff
6. Configure Iquidis
vi settings.json 
a. Name, Symbol, Theme
b. Port (and Open for Firewall)
c. MongoDB Credentials
d. RPC Wallet Credentials
e. Genesis Block (showblock 0, hash=block, tx=tx) https://en.bitcoin.it/wiki/Genesis_block
f. CCEX Market https://support.coinigy.com/hc/en-us/articles/360001143574-How-do-I-find-my-API-key-on-the-C-Cex-Exchange-
e. Icon and Logo /images/logo.png 128x128 /public/favicon.ico 16x16 Upload files online and use "wget URL" command to download http://digitalagencyrankings.com/iconogen/
7. Sync Initial Database
cd home/username/biblepay/src ./biblepayd -daemon -txindex cd home/username/explorer npm start 
Open a 2nd SSH/Putty session and connect, in 2nd window run:
cd home/username/explorer sudo node scripts/sync.js index update 
Open web browser and enter in your servers address: IPAddress:Port
8. Troubleshooting
Ctrl + C to stop npm process
__
If Settings/Config is wrong: Edit exploresettings.json
__
If Database is corrupt:
mongo use explorerdb show collections 
Examples: db.collectionName.find() db.collectionName.remove({}) db.collectionName.drop()
Reset all Database Data:
db.addresses.remove({}) db.addresses.drop() db.coinstats.remove({}) db.coinstats.drop() db.markets.remove({}) db.markets.drop() db.peers.remove({}) db.peers.drop() db.richlists.remove({}) db.richlists.drop() db.txes.remove({}) db.txes.drop() exit 
__
"Trying to reindex and getting error Script already running" https://github.com/iquidus/exploreissues/11
rm tmp/index.pid 
__
Stop Everything:
sudo service mongod stop sudo killall nodejs #Comment out crontab -e 
__
Run npm start in explorer folder to start explorer again
9. Add Crontab and Run!
sudo crontab -e 
Add lines:
*/1 * * * * cd /path/to/explorer && /usbin/nodejs scripts/sync.js index update > /dev/null 2>&1 */2 * * * * cd /path/to/explorer && /usbin/nodejs scripts/sync.js market > /dev/null 2>&1 */5 * * * * cd /path/to/explorer && /usbin/nodejs scripts/peers.js > /dev/null 2>&1 
If the BiblePay isnt already running, run it
cd home/username/biblepay/src ./biblepayd -daemon -txindex 
If Explorer isnt already running, run it
cd home/username/explorer npm start 
Recommendation:*
Add these parameters to biblepay.conf file
daemon=1 txindex=1 
Extra: This Iquidis for Dummides guide also adds: https://gist.github.com/zeronug/5c66207c426a1d4d5c73cc872255c572
Upstart, to have MongoDB auto start after reboots
Forever, to make sure Explorer is always running
Install Forever to keep the js running # sudo npm install forever -g # sudo npm install forever-monitor Start the Explorer # forever start bin/cluster 
Nginx - Reverse Proxy Port 3001 to 80 https://eladnava.com/binding-nodejs-port-80-using-nginx/
BiblePay Daemon set to run Every 2 Minutes with Cron
sudo crontab -e */2 * * * * /home/biblepay/src/biblepayd > /dev/null 2>&1 
Note: In ~/.biblepaycore/biblepay.conf add daemon=1 and txindex=1 Note: > /dev/null 2>&1 will capture both STDOUT (1) and STDERR (2) and send them to /dev/null
Auto Remove index.pid if indexing is complete
#!/bin/bash fname="/home/biblepay/exploretmp/index.pid" if [[ -f "$fname" ]]; then pid=$( /dev/null r=$? echo $r if [ $r -eq 0 ]; then exit 1 else rm $fname fi fi 
-f is checking if the file exists index.pid is the indexing lock file with its process ID number inside of it ps -p checks if the process is running $? is the value of the last output that ran and since the previous value is going to dev/null, its the exit code status "0 for successful executions and 1 or higher for failed executions." and so if the process is still running, the bash script just exits, otherwise the process is done and the index.pid file gets removed the file doesnt need a .sh extension, if you have "#!/bin/bash" at the top then linux knows its a bash script chmod +x to set it as executable
Github Source Code Files:
https://github.com/togoshigekata/biblepay-files/blob/masteexplorer-settings-togo.json
https://github.com/togoshigekata/biblepay-files/blob/masteexplorer-index-resetter-togo.sh
My Crontab:
*/2 * * * * cd /home/explorer && /usbin/nodejs --stack-size=15000 scripts/sync.js index update > /dev/null 2>&1 */6 * * * * cd /home/explorer && /usbin/nodejs scripts/sync.js market > /dev/null 2>&1 */11 * * * * cd /home/explorer && /usbin/nodejs scripts/peers.js > /dev/null 2>&1 */5 * * * * /home/biblepay/src/biblepayd > /dev/null 2>&1 */4 * * * * /home/explorer-index-resetter-togo.sh > /dev/null 2>&1 0 */3 * * * /ussbin/service mongod start > /dev/null 2>&1 
Experimental: https://github.com/iquidus/exploreissues/236
submitted by togoshige to BiblePay [link] [comments]

[RFC] Bitcoin on Arch Linux

Hi, I'm the maintainer of bitcoin-qt, bitcoin-daemon, bitcoin-cli, electrum and multibit on Arch Linux.
Do you use it? Do you like it? Should I do something better?
submitted by tredaelli to Bitcoin [link] [comments]

Archlinux install guide 24/10/19 (bios) Unix & Linux: Bitcoin daemon consuming over 581Mb of ... Arco Linux  La Alternativa Mas Completa De Arch Linux How to run a Bitcoin Full Node(Linux + Build from Source) Arch Linux not loading Kernel Modules with CryptsetupLUKS

Thanks quest, this was due to the upgrade of arch to openssl 1.1 and the latest release of Classic still not supporting it. I've validated your diff to work and updated the aur. quest commented on 2017-05-04 06:10 Description: According to an email sent by a Bitcoin developer, there is a serious incompability with the currently version of Bitcoin (0.9.3) and OpenSSL 1.0.1k, which is the version of OpenSSL available on the Arch's repositories. This can causes blockchain rejection and other related issues. Additional info: This wikipedia page discusses bitcoin *concepts* but doesn't even mention the bitcoin packages. I would like to add information on bitcoin-daemon, bitcoin-cli from repositories and instructions for building from source. Lmat 21:01, 10 January 2019 (UTC) I think you mean wiki page. Please read the last reply in #Links to software packages. BitcoinHD is a peer-to-peer network based digital currency - daemon Download bitcoin-daemon-0.20.1-2-x86_64.pkg.tar.zst for Arch Linux from Arch Linux Community repository.

[index] [21742] [7218] [9561] [16925] [30246] [18934] [18159] [30689] [16642] [4871]

Archlinux install guide 24/10/19 (bios)

To tackle this issue one needs a live Arch Linux CD/USB flash drive with no fear of data loss. The following command steps shows how to go about it and getting back to the Window Manager. Unix & Linux: Bitcoin daemon consuming over 581Mb of memory with 35 connections Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaar ... In this video we will build Bitcoin Core from source and run a Bitcoin full node on a linux server. ... In this video we will build Bitcoin Core from source and run a Bitcoin full node on a linux ... Due to recent changes in the archlinux base, some pkgs were removed, this guide should get most people up and running. Archlinux install guide on hardware or using a Virtual Machine (bios) The ... 📖 Cómo Instalar ARCH LINUX paso a paso (con WIFI o CABLE) ... Karla's Project 14,997 views. 33:16. Daemon Linux Déjate seducir por esta distro - Duration: 38:17. Zatiel 2,508 views. 38:17.

#