buzzkillb Posted November 13, 2020 Report Share Posted November 13, 2020 The idea is to run the blocknet daemon as your main wallet daemon (like a masternode), and have that setup to talk to your other wallet daemons. For example blocknet daemon will be setup with XBridge for the native Wallet to native Wallet atomic swaps. If someone wants to atomic swap between Block and Litecoin they will need a service node running the Block and Litecoin daemons. If someone wants to atomic swap between Litecoin and Denarius they will need a service node running Litecoin and Denarius daemons. Once finished you will be running a Block service node with XBridge and Enterprise XRouter all behind a Cloudflare tls/ssl proxy. WORK IN PROGRESS! The setup will require Blocknet Daemon Litecoin Daemon Denarius Daemon Free Cloudflare Account (Enterprise XRouter) Domain Name (Enterprise XRouter) I would suggest running Block and Litecoin at the very least for a service node. The goal is to show the main Block service node setup with XBridge and XRouter, grabbing the Litecoin Binary, and compiling Denarius daemon binary. To find sample xbridge.conf for your coin https://github.com/blocknetdx/blockchain-configuration-files/tree/master/xbridge-confs To find sample coin.conf for your coin https://github.com/blocknetdx/blockchain-configuration-files/tree/master/wallet-confs Prepare VPS/VM install ufw install fail2ban setup user blockhead remove root login and password logins setup ssh keys - Windows 10 - https://blockforums.org/topic/448-how-to-setup-block-service-node-xbridge-and-enterprise-xrouter/?do=findComment&comment=3434 Setup Block Go to github to find your binary, this will change as new wallets release over time.https://github.com/blocknetdx/blocknet Releases and then find your OS type, x86_64 Download the binary by right clicking the one you want and copy link and put into the wget command. wget https://github.com/blocknetdx/blocknet/releases/download/v4.3.1/blocknet-4.3.1-x86_64-linux-gnu.tar.gz untar binary tar xzvf blocknet-4.3.1-x86_64-linux-gnu.tar.gz copy to /usr/local/bin (maybe? not sure) adjust blocknet.conf nano ~/.blocknet/blocknet.conf To save your file ctrl+o, or I just ctrl+x to save and exit nano. Sample blocknet.conf server=1 listen=1 rpcuser=blocknetuser rpcpassword=decentlystrongpassword rpcallowip=127.0.0.1 port=41412 rpcport=41414 txindex=1 daemon=1 enableexchange=1 servicenode=1 rpcthreads=8 xrouter=1 run daemon and sync cd blocknet-4.3.1-x86_64-linux-gnu cd bin ./blocknetd to stop daemon ./blocknet-cli stop Setup crontab so blocknet will run on reboot crontab -e Add this line to the bottom for reboot, notice I am leaving the binary in its untarred directory. blockhead is the username we chose from above. @reboot /home/blockhead/blocknet-4.3.1/bin/blocknetd Setup Litecoin wget binary unzip binary move to /usr/local/bin adjust .conf run daemon and sync Setup Denarius install snap adjust .conf run daemon and sync edit Block XBridge conf, we will add BLOCK, LTC, and D. nano ~/.blocknet/xbridge.conf Sample xbridge.conf [Main] ExchangeWallets=BLOCK,LTC,D FullLog=true LogPath= ExchangeTax=300 ShowAllOrders=false [BLOCK] Title=Blocknet Ip=127.0.0.1 Username=blocknetuser Password=decentlystrongpassword Port=41414 AddressPrefix=26 ScriptPrefix=28 SecretPrefix=154 COIN=100000000 MinimumAmount=0 TxVersion=1 DustAmount=0 CreateTxMethod=BTC GetNewKeySupported=true ImportWithNoScanSupported=true MinTxFee=10000 BlockTime=60 FeePerByte=20 Confirmations=0 Address= TxWithTimeField=false LockCoinsSupported=false JSONVersion= ContentType= CashAddrPrefix= [LTC] Title=Litecoin Address= Ip=127.0.0.1 Port=9332 Username=litecoinuser Password=Password=decentlystrongpassword AddressPrefix=48 ScriptPrefix=50 SecretPrefix=176 COIN=100000000 MinimumAmount=0 DustAmount=0 CreateTxMethod=BTC GetNewKeySupported=true ImportWithNoScanSupported=true FeePerByte=10 MinTxFee=5000 TxVersion=2 BlockTime=150 Confirmations=0 TxWithTimeField=false LockCoinsSupported=false JSONVersion= ContentType= CashAddrPrefix= [D] Title=Denarius Ip=127.0.0.1 Port=32369 AddressPrefix=30 ScriptPrefix=90 SecretPrefix=158 COIN=100000000 MinimumAmount=0 TxVersion=1 DustAmount=0 CreateTxMethod=BTC GetNewKeySupported=true ImportWithNoScanSupported=true MinTxFee=2000 BlockTime=30 FeePerByte=5 Confirmations=0 Username=denariususer Password=decentlystrongpassword Address= TxWithTimeField=true LockCoinsSupported=false JSONVersion= ContentType= CashAddrPrefix= edit Block XRouter.conf nano ~/.blocknet/xrouter.conf Sample xrouter.conf [Main] #! host is a mandatory field, this tells the XRouter network how to find your node. #! DNS and ip addresses are acceptable values. #! host=mynode.example.com #! host=208.67.222.222 host=api.denarius.pro wallets=BLOCK,LTC,D plugins=0 fee=0 #! port is the tcpip port on the host that accepts xrouter connections. #! port will default to the default blockchain port (e.g. 41412), examples: #! port=41412 #! port=80 #! port=8080 port=80 #! tls signals to the xrouter network that your endpoint supports TLS/SSL connections. #! The default is 0 (false). #! tls=1 tls=1 #! maxfee is the maximum fee (in BLOCK) you're willing to pay on a single xrouter call #! 0 means you only want free calls maxfee=0 #! consensus is the minimum number of nodes you want your xrouter calls to query (1 or more) #! Paid calls will send a payment to each selected service node. consensus=1 #! timeout is the maximum time in seconds you're willing to wait for an XRouter response timeout=30 #! Optionally set per-call config options: #! [xrGetBlockCount] #! maxfee=0.01 #! [BLOCK::xrGetBlockCount] #! maxfee=0.01 #! [SYS::xrGetBlockCount] #! maxfee=0.01 #! It's possible to set config options for Custom XRouter services #! [xrs::GetBestBlockHashBTC] #! maxfee=0.1 #! Plugin help documentation can be set here as well as in the plugin conf. #! [xrs::ExampleRPC] #! help=The plugin documentation here. [xrGetBlockCount] fee=0.01 [xrGetBlockHash] fee=0.01 [xrGetTransaction] fee=0.1 clientrequestlimit=20 [BTC::xrGetTransactions] fee=0.5 timeout=50 fetchlimit=20 [BTC::xrGetBlocks] fee=0.3 timeout=30 fetchlimit=20 [xrGetBlocks] disabled=1 fetchlimit=50 Once done you want to reload everything. I setup a simple bash script in the blocknet-releasenumber/bin folder called pingping.sh. Example folder cd ~/blocknet-4.3.1/bin/ nano pingping.sh sample pingping.sh #!/bin/bash printf "reload xbridge\n" ./blocknet-cli dxLoadXBridgeConf printf "reload xrouter\n" ./blocknet-cli xrReloadConfigs printf "list tokens\n" ./blocknet-cli dxGetLocalTokens printf "XrStatus\n" ./blocknet-cli xrStatus printf "send service node ping\n" ./blocknet-cli servicenodesendping chmod the file to allow execution and run chmod +x pingping.sh ./pingping.sh If all of the above worked should see something like this at the end for every coin you are running. "status": "running", "services": [ "BLOCK", "BTC", "D", "DASH", "DGB", "DOGE", "DVT", "LTC", "MONA", "PHR", "RVN", "XSN", "XVG", "XZC", "xr", "xr::BLOCK", "xr::BTC", "xr::D", "xr::DASH", "xr::DGB", "xr::DOGE", "xr::DVT", "xr::LTC", "xr::MONA", "xr::PHR", "xr::RVN", "xr::XSN", "xr::XVG", "xr::XZC" ] setup Enterprise XRouter xrproxy docker 1 Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted November 13, 2020 Author Report Share Posted November 13, 2020 I would use Windows SSH instead of Putty. Its just easier to use ssh if on Windows 10. Go into powershell, bottom left and type powershell Double check you have ssh ssh Generate your ssh key, replace the email with something, doesn't really matter. ssh-keygen -t ed25519 -C "[email protected]" push enter on the default directory and file this gives, and push enter to keep the passphrase empty I am already in the .ssh folder, to get into this, powershell starts you in the C:\Users\Name folder. To get into .ssh cd .ssh Could backup your keys to a USB drive, but easier to just generate these on each machine you login to your VPS with. Now to copy the public key to the VPS so you can login without a password and only use your newly generated key. using sftp as windows doesn't have the ssh-copy-id command. PS C:\Users\Ryzen\.ssh> sftp [email protected] [email protected]'s password: Connected to [email protected]. sftp> ls blocknet litecoin denarius sftp> cd .ssh sftp> ls authorized_keys sftp> put id_ed25519.pub authorized_keys Uploading id_ed25519.pub to /home/blockhead/.ssh/authorized_keys id_ed25519.pub 100% 99 0.6KB/s 00:00 sftp> bye PS C:\Users\Ryzen\.ssh> And now we can login without using a password all from Windows 10, no putty required. PS C:\Users\Ryzen\.ssh> ssh [email protected] Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-42-generic x86_64) 1 Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted November 13, 2020 Author Report Share Posted November 13, 2020 Grab Litecoin daemon binary Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted November 13, 2020 Author Report Share Posted November 13, 2020 Compile Bitcoin daemon binary Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted November 13, 2020 Author Report Share Posted November 13, 2020 Run Denarius snap daemon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.