Jump to content

buzzkillb

Moderators
  • Posts

    571
  • Joined

  • Last visited

  • Days Won

    127

Everything posted by buzzkillb

  1. Copy Pasta of how to remove garbage from addresses that NOMP can't handle. reference: https://bitcoin.stackexchange.com/questions/34057/error-trying-to-send-payments-with-rpc-sendmany Eliminate the whitespace from workers' names. This commit shows how to do that. Combine payouts together when there is more than one worker with the same address. The code for that is shown below. In paymentProcessor.js, change var address = worker.address = (worker.address || getProperAddress(w)); worker.sent = addressAmounts[address] = satoshisToCoins(toSend); to var address = worker.address = (worker.address || getProperAddress(w)).trim(); if (!worker.sent) { worker.sent = 0; } worker.sent += satoshisToCoins(toSend); if (!(address in addressAmounts)) { addressAmounts[address] = 0; } addressAmounts[address] += satoshisToCoins(toSend);
  2. Tried latest 4.0.4 Qubes OS with AMD 3700x, Nvidia 1070, and Gigabyte Aorus B550M. Ethernet did not work after install. I am lazy so here is how I updated the kernel without really doing anything special. First go here and look for the kernel you want, I found the latest latest. https://mirrors.edge.kernel.org/qubes/repo/yum/r4.0/current-testing/dom0/fc25/rpm/ As of this post, download these 2 files from there https://mirrors.edge.kernel.org/qubes/repo/yum/r4.0/current-testing/dom0/fc25/rpm/kernel-latest-5.12.10-1.fc25.qubes.x86_64.rpm https://mirrors.edge.kernel.org/qubes/repo/yum/r4.0/current-testing/dom0/fc25/rpm/kernel-latest-qubes-vm-5.12.10-1.fc25.qubes.x86_64.rpm I then copied to a USB drive and put the 2 files into an appVM, vault sounds good in a Downloads/kernel directory, to copy over to dom0. Go to the dom0 terminal and copy to dom0 qvm-run --pass-io <src-vm> 'cat /path/to/file_in_src_domain' > /path/to/file_name_in_dom0 Example, replace USERNAME with your username qvm-run --pass-io vault 'cat /home/user/Downloads/kernel/kernel-latest-5.12.10-1.fc25.qubes.x86_64.rpm' > /home/USERNAME/kernel-latest-5.12.10-1.fc25.qubes.x86_64.rpm qvm-run --pass-io vault 'cat /home/user/Downloads/kernel/kernel-latest-qubes-vm-5.12.10-1.fc25.qubes.x86_64.rpm' > /home/USERNAME/kernel-latest-qubes-vm-5.12.10-1.fc25.qubes.x86_64.rpm Double check the file sizes are correct and then time to install sudo rpm -ivh --nodeps kernel-latest-5.12.10-1.fc25.qubes.x86_64.rpm sudo rpm -ivh --nodeps kernel-latest-qubes-vm-5.12.10-1.fc25.qubes.x86_64.rpm Reboot, and now change all your appvm's and templates to latest kernel. I rebooted once more just because and ethernet should work.
  3. Looks like the windows binary does support all GPU without the -d flag.
  4. Bitclout seems interesting, so lets mine some. reference: https://github.com/cloutreactor/release Update Nvidia GPU Drivers and make sure you have Cuda 11.2 https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html Direct Link to Cuda: https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.89_win10.exe Save the latest Windows miner to your drive https://github.com/cloutreactor/release/releases and then create a .bat or .cmd file for your command line. @echo off cloutreactor-windows-amd64.exe --public-key="YOURADDYHERESTARTSWITHB" pause The release page says this doesnt currently support, so use the -d flag. For GPU slot 0 use -d 0, for slot 1 use -d 1 startd0.cmd @echo off cloutreactor-windows-amd64.exe --public-key="ADDYGOESHERESTARTSWITHB" -d 0 pause And away you go. Don't forget to follow if you like the guide. https://bitclout.com/u/cryptobuzzb https://bitclout.com/u/denariuscoin https://bitclout.com/u/carsenk
  5. Ubuntu 20.04 NOMP with Denarius Snap Daemon Install Dependencies sudo apt install build-essential libtool autotools-dev autoconf pkg-config libssl-dev sudo apt install libboost-all-dev git npm nodejs libminiupnpc-dev redis-server sudo apt install python git curl Install node 0.10.25 wget https://nodejs.org/dist/v0.10.25/node-v0.10.25-linux-x64.tar.gz tar xvf node-v0.10.25-linux-x64.tar.gz cd node-v0.10.25-linux-x64 sudo cp -R bin/* /usr/bin/ sudo cp -R lib/* /usr/lib/ cd ~ Install Denarius Snap Daemon sudo apt update sudo apt install snapd sudo snap install denarius Clone NOMP cd git clone https://github.com/buzzkillb/node-open-mining-portal nomp cd nomp #I had to run npm update twice before it worked right npm update Run Nomp node init.js
  6. How to setup a Fantom RPC Go-Opera Node on Ubuntu 20.04. You want to lock this down yourself at some point after testing it works. We will need a couple things, mainly go, nginx and go-opera. go-opera: https://github.com/Fantom-foundation/go-opera go: https://golang.org/dl/ nginx Install go, latest is https://golang.org/dl/go1.16.4.linux-amd64.tar.gz wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin source ~/.bashrc cd ~ go version Clone github and make the go-opera binary sudo apt install git git clone https://github.com/Fantom-foundation/go-opera cd go-opera make opera cd build cp opera ~/ cd ~ I am putting opera binary in the main home folder so I can keep track of which version I am on. Find your IP address for initial go-opera syncing. ip a We also need the genesis block in our home folder. wget https://opera.fantom.network/mainnet.g Lets run this and prepare Cloudflare and our Domain next. replace the 111's with your IP address. This is not locked down at all, but I don't have anything on this wallet, so there is nothing to see here. The initial genesis decode will take at least 10 minutes, so wait for this to finish and you will see the sync. Sync as of right now took about 24 hours. I am running this in the background using screen. screen -S go-opera ./opera --genesis ~/mainnet.g --nat extip:111.111.111.111 --nousb --http --http.vhosts="*" --http.corsdomain="*" --ws --ws.origins="*" --http.api="ftm,eth,debug,admin,web3,personal,net,txpool,sfc" Setup cloudflare with TLS/SSL. Make a subdomain with an A record pointing to your IP address. Go to SSL/TLS -> Origin Server -> Create Certificate and either use the default or like I did, specifiy the full subdomain. Here I am showing example.denarius.pro for the example. Click Next. I created a certificate for domain like rpc.denarius.pro and click Next and then copy the info to here Insert Origin Certificate into a cert.pem sudo nano /etc/ssl/certs/cert.pem Insert Private Key into key.pem sudo nano /etc/ssl/private/key.pem Install nginx sudo apt install nginx I am lazy so just use default file to edit sudo nano /etc/nginx//sites-available/default You want something like this for https and web socket in the default file server { listen 80; listen [::]:80; server_name rpc.denarius.pro; return 302 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443 ssl http2; ssl on; ssl_certificate /etc/ssl/certs/cert.pem; ssl_certificate_key /etc/ssl/private/key.pem; location ^~ /ws { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:18546/; } location ^~ / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:18545/; } } Restart nginx sudo nginx -s reload Load up metamask and point a new network to your new domain like https://rpc.denarius.pro, chainID 250, Symbol 250 and you are good to go.
  7. How to Stake Fantom and mint Synthetics to Mint more Fantom to Stake Use caution and common sense for staking and borrowing against all of this stuff to keep staking over and over. I came across some posts saying to keep the C-Ratio above 600% so lets be on the safe side and stick with a number above 600%. Price fluctuates so use caution and know its possible to get locked out of the account if everything gets rekt. But does it matter if this goes to 0 then? I have no idea, so with all that in mind lets get to staking the Fantom. You might want to read this a few times to see what's going on. Have some balance in FTM. Needs more than 2, so go get a nice stack of FTM from somewhere. I am screenshotting the whole thing so its easier to follow. Go to the Staking tab and click + Add Delegation Pick an amount and keep 2 FTM always on hand. I have 20 in this wallet and will choose 15. Then select a validator. Choose your validator. For now lets go with the one with the most FTM staking and then click Select. Click Continue to delegate. Then click Delegate. Click continue after verifying. Lock Delegation and this is where you choose minimum of 14 days and maximum of 131 days for this lock. If you unlock early you will burn your rewards. So choose 14 days if you want to just test this out. Lets lock until July 4th. Slide for days and click Ok, lock Click Lock Delegation is successful and click Continue. Mint sFTM to start the synthetic part to go into fUSD. Click Submit Transaction Sent, click Continue Go to the Defi tab to start fMint to mint fUSD Click Lock Collateral Click the wFTM and change to sFTM Drag the slider for all of the sFTM and click Submit. Click submit Click Submit again Success, click Close Go back to the fMINT tab and click Mint Synths This is the important step. Move the slider so you stay above C-Ratio 500% to earn wFTM on this fUSD. 600% has been hinted at so lets use 610% to be on the safe side. You don't want to drop below 300% for your C-Ratio. Click submit. Click submit, this part is either slow or takes a while. So just wait, if you get an error try again, but seems like during writing this guide its taking more than 5 minutes on this step. An example of when it glitches out and I get stuck and why I have been waiting to write this guide. And of course won't get further. I will switch to another address so this guide exists until the congestion calms down. Note I am switching wallets here so numbers won't match above. But should get the idea of what's going on next. Take note, the fUSD sitting in the wallet now is earning wFTM also as long as the C-Ratio stays above 500%. You are now minting FTM from the staking delegation and wFTM from the fUSD minting. Once you show fUSD minted go to the fUNI tab and select the bottom token as fUSD and click the arrow to swap the trade around. Select token as fUSD Type in the amount of fUSD or click Max, then click Swap. Continue to Next Step Confirm Swap and click Submit Success, click Continue We can now play with wFTM. I am just swapping wFTM into FTM and restaking again. And then minting sFTM and repeating this whole guide over and over. You can also go long and short with this borrowing part. Go back to the Defi tab and click fSwap Click the arrow to swap because I want wFTM to FTM I also want my whole FTM so I slide to 100%, careful here. You are borrowing FTM based on the loaned fUSD. Click submit Click continue You now have some extra FTM. At this point use your imagination. What I did was go back to staking and delegate this new amount and do all of this over and over again. Dangerous? Maybe, but I look at this as the Yolo chain.
  8. How to pull Binance API with USDT as the price and BTC as the playing part underneath, example for FTM. const Discord = require('discord.js'); const fetch = require('node-fetch'); const config = require("./config.json"); var binanceApi = "https://api.binance.com/api/v3/ticker/price?symbol=FTMUSDT" var binanceApiBTC = "https://api.binance.com/api/v3/ticker/price?symbol=FTMBTC" let refreshint = 5000; function sleep(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); }); } const client = new Discord.Client(); client.on('ready', async () => { client.user.setActivity('binanceUSDT'); const GUILD_ID = client.guilds.cache.map(guild => guild.id); const guild = await client.guilds.fetch(GUILD_ID[0]); const guildt = await client.guilds.fetch(GUILD_ID[1]); console.log('Bot is connected...'); setInterval(async function(){ //Fetch the binanceApi FTM/USDT fetch(binanceApi) .then(function (data) { if (data.status !== 200) { console.log('Looks like there was a FTM problem. Status Code: ', data.status); return; } data.json().then(function (data) { // Log the data to the console, Total balance of Token console.log(data.price); var coinPrice = "FTM $" + data.price guild.me.setNickname(coinPrice); guildt.me.setNickname(coinPrice); // var binanceApiBtc = "https://api.binance.com/api/v3/ticker/price?symbol=FTMBTC" // return fetch(binanceApiBtc); }); } ) .catch(function (e) { console.log("Error pulling FTM price data:", e); }) //Fetch the binanceApi FTM/BTC fetch(binanceApiBTC) .then(function (data) { if (data.status !== 200) { console.log('Looks like there was a BTC problem. Status Code: ', data.status); return; } data.json().then(function (data) { // Log the data to the console, Total balance of Token var coinBtc = "BTC " + data.price client.user.setActivity(coinBtc); console.log(coinBtc); }); } ) .catch(function (e) { console.log("Error pulling BTC price data:", e); }) }, refreshint) }); client.login(config.BOT_TOKEN);
  9. To add some info to underneath the name try replacing these lines setInterval(async function(){ fetch(chainzApi) .then(function (response) { // Get a JSON object from the response // This is a weird quirk of Fetch return response.json(); }).then(function (data) { // Log the data to the console, Total balance of Token console.log(data); var blockHeight = "Height: " + data guild.me.setNickname(blockHeight); var coinexplorerFS = "https://www.coinexplorer.net/api/v1/D/masternode/count " return fetch(coinexplorerFS); }).then(function (response) { // Get a JSON object from the response return response.json(); }).then(function (data) { var fsCount = "FS " + data.result.total client.user.setActivity(fsCount); }) }, 3000);
  10. A basic example of a Discord.js bot that can autoupdate every 5 seconds based on an API using fetch. Install nodejs and some packages. Linux x64 or ARM, example below is 64-bit. wget https://nodejs.org/dist/v16.0.0/node-v16.0.0-linux-x64.tar.xz tar xvf node-v16.0.0-linux-x64.tar.xz cd node-v16.0.0-linux-x64/ sudo cp -R bin/* /usr/bin/ sudo cp -R lib/* /usr/lib/ npm install discord.js npm install node-fetch blockheight.js https://gist.github.com/buzzkillb/63a66f27ff65c6dd880a6c3eae740602 //npm install discord.js node-fetch //get blockheight from Chainz CryptoID and update Bots Name as Blockheight const Discord = require('discord.js'); const fetch = require('node-fetch'); const config = require("./config.json"); var chainzApi = "https://chainz.cryptoid.info/d/api.dws?q=getblockcount" const client = new Discord.Client(); client.on('ready', async () => { client.user.setActivity('denarius.io'); const GUILD_ID = client.guilds.cache.map(guild => guild.id); const guild = await client.guilds.fetch(GUILD_ID); console.log('Bot is connected...'); setInterval(async function(){ fetch(chainzApi) .then(function (response) { // Get a JSON object from the response // This is a weird quirk of Fetch return response.json(); }).then(function (data) { // Log the data to the console, block height console.log(data); var blockHeight = "Height: " + data guild.me.setNickname(blockHeight); }) }, 5000); }); client.login(config.BOT_TOKEN); config.json { "BOT_TOKEN": "DISCORDGENERATEDTOKENGOESHERE" } How to add the bot to a server and get your BOT_TOKEN Authorizing Discord User Visit https://discord.com/developers/applications and create 'New Application'. Set a bot name like BlockHead On the page that follows, set the account name and save. Then click Bot Create a Bot account and Save. Click 'Copy' on the Token; this is the API Key you use in the bot script Visit the OAuth2 tab. Under Scopes, select 'bot' The resulting URL is what you (or anyone) use to add your bot instance to a server.
  11. An example of using the public key with Denarius NVS. Add the public key to be more public, go to your Denarius QT Wallet and at the debug console type name_new ssh:buzzkillb "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRELbQ3izu+ckrwPgKTdmck89xrOaSv1Kp0vY1ShWYbjyALOvEL9Okd23bjzCcS3h/0t5R5HZs3Ej0cOpupa/Ls4E6DwFs7hC6bMjSdDu/I0490ONH6LOYWE5T5GCuuPNmMRBVX7mmCAXzUIkBFvimzspAIY+w2pkQ2bk+dOC+IMG70DsDPv54+LBm7IpgWth+wZLppacVYMgpARX38ounHU8pxEOxEodf5Vzx+jCxX7swYBM0Ujw+5+Kg+8c00oWB/6MM1mIdTepqH4hRIkw0AVMhEFqnC/qOrr4aZ9e8Bd5B27sTKwPlmX0oe7Uw46G72MZ6/bLc8qgjjIeIOzUj cardno:000613493497" 9999
  12. How to create an SSH key on a Yubikey 5 using GPG on Ubuntu 20.04. Yubikey 5c https://amzn.to/3dFvg4A Yubikey 5 nfc https://amzn.to/3gr4UoJ I am using VM Player as the test subject. Edit the .vmx file if you are using this and add these 3 lines to the end to passthrough the Yubikey. Restart vmplayer and passthrough. usb.generic.allowHID = "TRUE" usb.generic.allowLastHID = "TRUE" usb.quirks.device0 = "0x1050:0x0407 allow" Reference: https://www.engineerbetter.com/blog/yubikey-ssh/ I just installed all the yubikey stuff, you can do these 1 by 1 for what you need or just throw them all in. sudo apt install opensc-pkcs11 yubikey-personalization scdaemon libpam-u2f libpam-yubico yubikey-personalization-gui yubikey-manager Use GPG agent cat <<EOF >> ~/.bashrc export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye unset SSH_AGENT_PID export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) EOF then . ~/.bashrc To check if the Yubikey is being seen by Ubuntu type gpg --card-status If you want to change your pins, this is the command gpg --change-pin I would test the steps out before editting pins and messing around with more stuff, lets get to editing gpg --card-edit admin generate Make off-card backup of encryption key? N I chose to expire my key in 3 years so I typed 3y Is this correct? Y Fill in a name and email address. Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O quit Check your ssh key ssh-add -L and it spits the SSH key out ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRELbQ3izu+ckrwPgKTdmck89xrOaSv1Kp0vY1ShWYbjyALOvEL9Okd23bjzCcS3h/0t5R5HZs3Ej0cOpupa/Ls4E6DwFs7hC6bMjSdDu/I0490ONH6LOYWE5T5GCuuPNmMRBVX7mmCAXzUIkBFvimzspAIY+w2pkQ2bk+dOC+IMG70DsDPv54+LBm7IpgWth+wZLppacVYMgpARX38ounHU8pxEOxEodf5Vzx+jCxX7swYBM0Ujw+5+Kg+8c00oWB/6MM1mIdTepqH4hRIkw0AVMhEFqnC/qOrr4aZ9e8Bd5B27sTKwPlmX0oe7Uw46G72MZ6/bLc8qgjjIeIOzUj cardno:000613493497 To move the yubikey to another VM I did the edit vmx file, passed the yubikey through to vmplayer and then sudo apt install opensc-pkcs11 yubikey-personalization scdaemon libpam-u2f libpam-yubico yubikey-personalization-gui yubikey-manager Use GPG agent cat <<EOF >> ~/.bashrc export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye unset SSH_AGENT_PID export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) EOF then . ~/.bashrc And then check the key ssh-add -L
  13. Future how to run multiple snap daemons and onion on a single VPS
  14. Denarius Snap Daemon FortunaStake Guide [Masternode TOR] How to setup a Denarius FortunaStake with TOR and Snap daemon. Get a VPS with Ubuntu 20.04 to setup the FortunaStake side, this holds no private keys or collateral https://my.racknerd.com/index.php?rp=/store/special-promos This is a good provider, you want more than 2gb ram setup First setup the collateral wallet with 5000 as that will take 500 confirms before you can start the FortunaStake. Plenty of time to setup the VPS side. If you have good 24/7 internet you can run the VPS part at home on a Raspberry Pi4 or some low wattage computer with more than 2gb ram. #Setup Collateral Wallet This will take 500 confirms before being able to start, so do the send first, then read through the guide. Send exactly 5000 D to an address and give that address a label like FS01. Script for VPS Portion Located Here This will pull master branch and compile the latest wallet. And add a cronjob to restart wallet every hour to make sure things stay in sync. https://github.com/buzzkillb/d-fortunastake QT Wallet After sending 5000 D to a labelled address, we need the following; transaction hash and index of the 5000 send, fortunastake private key, and your VPS IP address. FS01 VPSIPADDRESS:9999 FORTUNASTAKEPRIVKEY TRANSACTIONHASH INDEXNUMBER Sample fortunastake.conf FS01 11.11.12.13:9999 6J8tAUsVhXBgfdeewqsdghySWEQEeb4XGSC251sM7bYQgEXh7 f08d926f92cc4c65321344828f6394f41121903502459ffde4ef7aef39e6392b 0 fortunastake private key fortunastake genkey fortunastake transaction hash and id fortunastake outputs VPS of your ip should be somewhat obvious, but this guide will instead use TOR onion address down below. You can pick a clearnet or onion address for this. After creating your fortunastake.conf, save and restart the QT wallet. Sample QT denarius.conf fsconflock=1 staking=1 Now that address has locked the 5000 D collateral. #Setup VPS Side #setup denarius user adduser denarius #input strong password usermod -aG sudo denarius Relogin to vps as denarius user #update Ubuntu sudo apt update sudo apt upgrade #Install fail2ban sudo apt install fail2ban #Install SNAP Daemon sudo apt install snapd sudo snap install denarius #Install TOR sudo apt install tor #setup TOR port for FortunaStake sudo nano /etc/tor/torrc at top add these new lines HiddenServiceDir /var/lib/tor/hidden_denarius/ HiddenServiceVersion 2 HiddenServicePort 33369 127.0.0.1:33369 HiddenServicePort 9999 127.0.0.1:9999 #restart tor service sudo service tor restart #get onion hidden service address, example -> youronionaddress.onion sudo cat /var/lib/tor/hidden_denarius/hostname #save this for denarius.conf #setup chaindata cd ~ mkdir -p ~/snap/denarius/common/.denarius cd ~/snap/denarius/common/.denarius sudo apt install unzip wget https://denarii.cloud/chaindata.zip unzip chaindata.zip #Run denarius daemon to prepopulate the denarius.conf in this directory and start syncing from chaindata block height denarius.daemon #give it about 5 minutes to load and stop daemon to reconfigure denarius.conf denarius.daemon stop #update denarius.conf with the settings below nano denarius.conf Add below port=9999 fortunastake=1 listen=1 externalip=youronionaddress.onion fortunastakeaddr=youronionaddress.onion:9999 fortunastakeprivkey=yourfortunastakegenkey tor=127.0.0.1:9050 #Start your VPS Snap Daemon denarius.daemon #Start FortunaStake from your QT Collateral Wallet #go to debug console fortunastake start-alias FS01 #check this is started on the VPS daemon cd ~/snap/denarius/common/.denarius tail -f debug.log Welcome to collecting 33% of block rewards randomly through the day
  15. How to run an XFCE Desktop GUI on a headless Proxmox Ubuntu 20.04 Container through RDP. Trying out Snap Denarius QT as an example. Taken from https://www.reddit.com/r/Proxmox/comments/hzg2vr/how_to_create_a_template_for_lxc_ubuntu_desktop/ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils Select lightdm when asked which desktop. sudo apt install xrdp update-alternatives --set x-session-manager /usr/bin/xfce4-session Now use Remote Desktop to RDP into the IP address. Easy enough, now you can lock it down if doing something outside of trying to set this up.
  16. How to setup a TOR Proxy Gateway through Denarius DDNS Naming System using the Names subdomains as the beginning of onion addresses. Going to use Ubuntu 20.04 and Snap daemon. First install Denarius snap daemon and sync the wallet, grab chaindata to make this faster. Install tor sudo apt install tor Using this guide to install dnsmasq https://unix.stackexchange.com/a/516808 Install dnsmasq sudo apt install dnsmasq Disable systemd-resolved sudo systemctl disable systemd-resolved.service Remove resolv.conf sudo rm /etc/resolv.conf Now we are going to add the Denarius DDNS and nameservers in. sudo /etc/dnsmasq.d/03-denarius-wildcard.conf add these to the file server=/d/127.0.0.1#5333 server=/dnr/127.0.0.1#5333 server=/denarii/127.0.0.1#5333 server=/king/127.0.0.1#5333 server=/ipfs/127.0.0.1#5333 server=/sys/127.0.0.1#5333 server=/btc/127.0.0.1#5333 server=/bitcoin/127.0.0.1#5333 Edit resolv.conf for our new name servers sudo nano /etc/resolv.conf Add in a clearnet nameserver and the Denarius DDNS localhost nameserver nameserver 127.0.0.1 nameserver 8.8.8.8 Restart dnsmasq sudo systemctl restart dnsmasq Ping a Denarius DDNS site like http://magnets.king ping magnets.king If the ping works this part is working. Setup Tor. sudo nano /etc/tor/torrc Add these lines to the top. HiddenServiceDir /var/lib/tor/ddns/ HiddenServiceVersion 3 HiddenServicePort 80 127.0.0.1:80 Restart Tor service to get our onion address. sudo service tor restart sudo cat /var/lib/tor/ddns/hostname I get 3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion Setup NGINX sudo apt install nginx Edit the default config file because I am lazy sudo nano /etc/nginx/sites-available/default Add this in and adjust the onion address server { listen 127.0.0.1:80; server_name ~^(?<subdomain>.+)\.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid\.onion$; location / { resolver 127.0.0.1 valid=30s; proxy_pass http://$subdomain; proxy_set_header X-Real-IP $remote_addr; } } Restart nginx. sudo service nginx restart Open up TOR Browser and go to Denarius DDNS names like this http://wiki.d.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://stats.d.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://satoshi.bitcoin.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://magnets.king.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ You should now have a a Tor Proxy gateway that can see the Denarius names as a wildcard catchall subdomain. Adjust for only sites you run or for clearnet sites you run to give newbies an easy way to check out a decentralized naming system on a blockchain.
  17. Have you ever wanted to add a torrent magnet link to a decentralized blockchain for the latest Arch Linux ISO? This guide will show how to add a torrent magnet link and retrieve the list using the name_show & name_filter function in the Denarius wallet. This will require at least 0.1 Denarius Coins in your wallet. 1 Denarius Coin will give you enough to make 1 name to send coins to, 1 magnet link, and ability to change this 8 times roughly because of the low fees. Example to grab latest ArchLinux magnet link and put on the blockchain. Find the magnet link, right click and copy from here https://archlinux.org/download/ This gives a full link, which includes our filename we want to use magnet:?xt=urn:btih:85bbba4035cca750f681284857f53e405eb41f7d&dn=archlinux-2021.02.01-x86_64.iso Chop off what we don't need, the & and to the right magnet:?xt=urn:btih:85bbba4035cca750f681284857f53e405eb41f7d Now we have our magnet link, our filename would be archlinux-2021.02.01-x86_64.iso To add this information to Denarius DDNS NVS QT Wallet, go to debug console and type this name_new magnet:<FILENAME> <MAGNETLINK> <EXPIRATIONTIME> name_new magnet:archlinux-2021.02.01-x86_64.iso magnet:?xt=urn:btih:85bbba4035cca750f681284857f53e405eb41f7d 9999 After pushing enter you will get a transaction ID. Wait for the transaction to go through. Once the transaction goes through we can lookup this specific new add. name_show magnet:archlinux-2021.02.01-x86_64.iso which returns { "name" : "magnet:archlinux-2021.02.01-x86_64.iso", "value" : "magnet:?xt=urn:btih:85bbba4035cca750f681284857f53e405eb41f7d", "txid" : "85bc00ebce5bc80d6f2be1f8d7200b07135f4d8a4740fc84657b02c73ad8f59d", "address" : "DSST3rnMgWUmQ1b6VZh2AFjVnsnfoNTXwD", "expires_in" : 57591343, "expires_at" : 61856796, "time" : 1613256050 } You can also filter the entire magnet: list by typing name_filter ^magnet: 9999999 which returns [ { "name" : "magnet:Crypto (2019) [BluRay][1080p][YTS][YIFY]", "value" : "magnet:?xt=urn:btih:07a990c2da5703fe725dc5ad29822139e1f16456", "registered_at" : 4232860, "expires_in" : 57561645 }, { "name" : "magnet:ubuntu-20.04.2-desktop-amd64.iso", "value" : "magnet:?xt=urn:btih:998786ad5f17107b373662d63647fde829d6730b", "registered_at" : 4243649, "expires_in" : 28775314 }, { "name" : "magnet:ubuntu-20.04.2-live-server-amd64.iso", "value" : "magnet:?xt=urn:btih:126f82fb33119d2acf93a16cfba6eb1c5787a59f", "registered_at" : 4243652, "expires_in" : 28775317 }, { "name" : "magnet:archlinux-2021.02.01-x86_64.iso", "value" : "magnet:?xt=urn:btih:85bbba4035cca750f681284857f53e405eb41f7d", "registered_at" : 4262556, "expires_in" : 57591341 } ] A website at Denarius domain http://magnets.king or through IPFS using the Denarius gateway https://ipfs.denarius.io/ipns/magnets.king/ is watching the list and making a simple website to show what's coming up under the magnet: filter to give an idea how powerful this is. If you create your own torrent and are worried about being censored because of your political stance, you can now easily throw a magnet link up and also share the link easily through a Denarius domain. Example is showing the website created and able to see through Denarius DDNS, TOR, and IPFS. No clearnet domain registrar like namecheap required.
  18. How to upgrade the Denarius v3.3.9.11 wallet, QT or Daemon, now with DDNS, decentralized Domain support. The idea here is to not force a mandatory protocol upgrade, we can swap the wallet and either sync from block 0, or use chaindata. This will be wordy, but its not too many steps. Latest binaries - https://github.com/carsenk/denarius/releases First stop wallet and backup wallet.dat somewhere safe, like a USB thumbdrive. Download the v3.3.9.11 binary or compile from source. Unzip to wherever you normally run the binary from. For Windows you just replace your existing Denarius.exe file. Delete the files in the chaindata folder and keep denarius.conf fortunastake.conf wallet.dat. Data Directory Locations OS Data Directory Windows %APPDATA%\Denarius macOS /Library/Application Support/Denarius Linux ~/.denarius/ Now you can choose to sync from block 0 or download chaindata.zip from https://denarii.cloud/ . Put this file in your above Data Directory and unzip in place. After unzipping chaindata.zip, restart the wallet. Common new options in denarius.conf DDNS=1 turns on the local DDNS support to resolve directly from the wallet, turn off with 0. Might be handy when running multiple wallets on same computer. DDNSPORT=5333 default port for DDNS, that can be changed, might be handy if running multiple wallets on same computer with DDNS=1 Don't forget to checkout how to get started with Denarius DDNS NVS.
  19. Say you want to run a blog behind IPFS and then use the Denarius DDNS NVS for your domain name because you are being censored for whatever reason. basic guide to do this, and just throw in a hugo or ghost blog platform into a directory. A few basic examples will be shown over time for the blog setup. reference: https://www.linode.com/docs/guides/install-go-on-ubuntu/ install latest go for your OS https://golang.org/dl/ wget https://golang.org/dl/go1.15.7.linux-amd64.tar.gz tar xzvf go1.15.7.linux-amd64.tar.gz sudo chown -R root:root ./go sudo mv go /usr/local nano ~/.profile add export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin load into current shell instance source ~/.profile Grab carsens fork of go-ipfs daemon sudo apt-get install libc6-dev gcc make git clone https://github.com/carsenk/go-ipfs cd go-ipfs make build cd cmd/ipfs sudo cp ipfs /usr/local/bin Initialize IPFS daemon ipfs init Add ipfs systemd sudo nano /etc/systemd/system/ipfs.service [Unit] Description=IPFS daemon After=network.target [Service] ### Uncomment the following line for custom ipfs datastore location # Environment=IPFS_PATH=/path/to/your/ipfs/datastore User=denarius ExecStart=/usr/local/bin/ipfs daemon --enable-namesys-pubsub Restart=always [Install] WantedBy=multi-user.target setup systemd sudo systemctl restart ipfs sudo systemctl status ipfs sudo systemctl enable ipfs to bypass your resolver cd /etc sudo rm resolv.conf nano resolv.conf Use Denarius DNS for name resolving 107.152.32.30 192.3.62.20 on Denarius wallet name_new dns:wiki.d A=199.195.249.96|TXT=dnslink=/ipns/k2k4r8n1h4mclh1ovwewhe5wmz8dygrqoh6u5tr51puvf1e5waoz2c0h 9999 edit nginx nano /etc/nginx/sites-available/default This is for a full IPFS blog behind cloudflare for your regular domain, an onion address through TOR and your Denarius DDNS domain name to show how its all put together. server { listen 80; listen [::]:80; server_name denarius.wiki; return 302 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443 ssl http2; ssl on; ssl_certificate /etc/ssl/certs/cert.pem; ssl_certificate_key /etc/ssl/private/key.pem; location / { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } server { listen 127.0.0.1:80; server_name fpn2nkmpvmp4ruzjiyn7hvwhfklhcptr7pukhyoe4et5ztte24ehpzqd.onion; error_log /var/log/nginx/hidden_service.error.log; access_log off; #location / { # proxy_pass http://localhost:8080/ipns/denarius.wiki; # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection 'upgrade'; # proxy_set_header Host $host; # proxy_cache_bypass $http_upgrade; location / { root /usr/share/nginx/html; index index.html index.htm index.nginx-debian.html; } } server { listen 80; server_name wiki.d; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } } For purely using a Denarius domain all you need is server { listen 80; server_name wiki.d; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } } Now restart nginx sudo service nginx restart In your Denarius wallet this is the debug console command. You want an A record pointing to your vps and a TXT record pointing to the ipns or ipfs hash you created when you added your files to ipfs. name_new dns:wiki.d A=199.195.249.96|TXT=dnslink=/ipns/k2k4r8n1h4mclh1ovwewhe5wmz8dygrqoh6u5tr51puvf1e5waoz2c0h 9999 If you put your website/blog into say ~/website run this command to get the hash TMP=`/usr/local/bin/ipfs add -r /home/username/website/ | awk 'END{printf $2}'` && /usr/local/bin/ipfs name publish $TMP The hash will pop out for your IPNS and IPFS hashes to put in your TXT record. You can't screw anything up, so don't be scared to mess up trying stuff. Different ways to view the Denarius Wiki https://denarius.wiki/ https://ipfs.denarius.io/ipns/denarius.wiki/ http://fpn2nkmpvmp4ruzjiyn7hvwhfklhcptr7pukhyoe4et5ztte24ehpzqd.onion/ http://wiki.d https://ipfs.denarius.io/ipns/wiki.d/
  20. To update your domain name_update dns:blockforumsexample.d CNAME=denarius.io 9999 to delete your domain name_delete dns:blockforumsexample.d
  21. to setup pihole as an easy way to view the Denarius Decentralized Domains Install pihole on a device. A Raspberry Pi4 4gb works perfect for this. As you must run the daemon/QT wallet as well to reach the NVS domains. https://pi-hole.net/ The denarius wallet requires ddns=1 in the denarius.conf to open up port 5333 so Piholes dnsmasq can talk our denarius daemon for the magic to happen. After you install and setup pihole, make sure you change your router for the new DNS, or on your Windows MAC Linux machine set the DNS to your new pihole's address. To be continued with more info here. Now edit this file and add the NVS domain names. sudo nano /etc/dnsmasq.d/03-pihole-wildcard.conf and add server=/d/127.0.0.1#5333 server=/dnr/127.0.0.1#5333 server=/denarii/127.0.0.1#5333 server=/king/127.0.0.1#5333 server=/ipfs/127.0.0.1#5333 server=/sys/127.0.0.1#5333 server=/btc/127.0.0.1#5333 server=/bitcoin/127.0.0.1#5333 I restarted the pi4 completely. To test go to these Denarius NVS domains http://stats.d http://wiki.d http://poswatch.d
  22. to create a domain lets do a very simple A record. In debug console name_new dns:blockforumsexample.d A=133.133.133.133 9999 Now your blockforumsexample.d will head to that A record. On nginx create a new server block like this sudo nano /etc/nginx/sites-available/blockexample edit to look like this for basic index.html type of website server { listen 80; listen [::]:80; root /home/denarius/website; index index.html index.htm index.nginx-debian.html; server_name blockforumsexample.d; location / { try_files $uri $uri/ =404; } } and now symlink that to sites-enabled sudo ln -s /etc/nginx/sites-available/blockexample /etc/nginx/sites-enabled check nginx is still happy sudo nginx -t restart the nginx service sudo service nginx restart Now head to next post to setup pihole to be able to view this site. The goal is to fully bypass everyone who can block us with these domain names and keep this nice and decentralized.
  23. Lets start by making 2 things. First we will create a name called @example which someone can send denarius to. And then we will create a basic domain. Load the wallet and get some Denarius coins. We will need this to pay the fee + fee to miners to create / update / delete records. Go to the NVS screen or debug console to fill this in. I am going to use Debug console for most of the guide as its easier at the moment. Example of what this looks like in the debug console. name_new @blockforumsexample "In Denarius We Trust" 365 We then get a tx hash Under the My Denarius Names tab as you wait for the transaction to happen you will see a yellow highlight. Once the transaction goes through the yellow hightlight disappears and you now have your @name added to your wallet. To show your name type below name_show @blockforumsexample and you get { "name" : "@blockforumsexample", "value" : "In Denarius We Trust", "txid" : "1f19ede29c259cbb7335bf72f97942a3a23a941c0da7d557f74ce4f964ace842", "address" : "DR8f9v3WXqzRim7B4VzeKVYi6GG1jtpyhL", "expires_in" : 1051199, "expires_at" : 5265039, "time" : 1612055193 } To send to the name type sendtoname @blockforumsexample 1.337
  24. I am saying no even though I think this would help the pools a lot a lot. Touching the code seems to bring out some good points about don't touch the main genesis structure.
  25. How to tie cloudflare into this so you don't have to run an IPFS daemon, and throw a hash into a subdomain. Think uploading Denarius logo and now I can just do this https://logo.denarii.link/
×
×
  • Create New...