Jump to content

Search the Community

Showing results for tags 'tutorial'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • BlockForums Announcements
    • Denarius Announcements
  • Cryptocurrency Discussions
    • Cryptocurrencies
    • Altcoin Announcements
    • General Discussion
    • Tutorials & Help
  • Denarius Discussions
    • General Discussion
    • Tutorials & Help
    • Marketing & PR
    • Development
    • Mining & Staking
    • Trading & Exchanges
    • Marketplace
  • Programming & Design
    • Development QA
    • Design QA
  • Gaming
    • Bot Downloads & Discussion
    • Gaming Discussion
  • Classifieds
    • Buy Sell and Trade
  • Other Discussions
    • The Lounge
    • Hardware & IoT
    • Tutorials & Guides
    • Domains & Hosting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


BTC Address

Found 5 results

  1. In this example the idea is to run Iquidus Block Explorer with the daemon and traefik for reverse proxy all using a single docker-compose. Hopeful if anyone else tries this they come up with some better configs for the whole thing. I am going to use Ubuntu 20.04 as the example since its latest and greatest. We will be using Denarius docker daemon - https://github.com/buzzkillb/denariusDocker/tree/iquidus Iquidus D-Explorer - https://github.com/buzzkillb/D-explorer Iquidus Docker - https://github.com/buzzkillb/iquidusdocker Install Docker and Docker Compose #Install Docker sudo apt install docker.io sudo systemctl enable --now docker sudo usermod -aG docker SOMEUSERNAME docker --version #Install docker-compose sudo apt install docker-compose docker-compose version I would reboot at this step and make sure docker is still working. 20.04 has been a bit glitchy for me. If docker stops running, this fixed it. rm /etc/docker/daemon.json service docker restart systemctl status docker.service If you are using cloudflare, my traefik isn't setup correctly to use Cloudflare proxy and get the letsencrypt TLS certs once proxied. Will update once I get that config working. Make your .conf file in ~/.denarius/denarius.conf (switch this for your coin, the guide is tailored to Denarius, but should be an easy swap). denarius.conf (note daemon=0 for the docker daemon I built) - based on the docker hub image https://hub.docker.com/r/buzzkillb/denariusd iquidus branch/tag. rpcuser=rpcuser rpcpassword=aLongPasswordLikeThis rpcport=32369 port=33369 daemon=0 listen=1 server=1 txindex=1 rpcallowip=* At the your home folder clone the explorer. cd ~ git clone https://github.com/buzzkillb/iquidusdocker explorer cd explorer 2 things to change, go to your explorer folder inside explorer and switch logo.png to your coin logo, and edit settings.json to your coin. That's it. sample settings.json /* This file must be valid JSON. But comments are allowed Please edit settings.json, not settings.json.template */ { // name your instance! "title": "D-Explorer", "address": "https://explorer.example.com", // coin name "coin": "Denarius", // coin symbol "symbol": "D", // logo "logo": "/images/logo.png", // favicon "favicon": "public/favicon.ico", // Uses bootswatch themes (http://bootswatch.com/) // Valid options: // Cerulean, Cosmo, Cyborg, Darkly, Flatly, Journal, Lumen, Paper, // Readable, Sandstone, Simplex, Slate, Spacelab, Superhero, United, Yeti // theme (see /public/themes for available themes) "theme": "Cyborg", // port to listen for requests on. "port" : 3001, // database settings (MongoDB) "dbsettings": { "user": "", "password": "", "database": "explorerdb", "address": "mongodb", "port": 27017 }, //update script settings "update_timeout": 10, "check_timeout": 250, "block_parallel_tasks": 1, // wallet settings "use_rpc": true, "wallet": { "host": "denarius", "port": 32369, "username": "rpcuser", "password": "aLongPasswordLikeThis" }, // confirmations "confirmations": 10, // language settings "locale": "locale/en.json", // menu settings "display": { "api": true, "markets": true, "richlist": true, "twitter": true, "facebook": false, "googleplus": false, "youtube": false, "search": true, "movement": true, "network": true }, // index page (valid options for difficulty are POW, POS or Hybrid) "index": { "show_hashrate": true, // Show Market Cap in header "show_market_cap": false, // Show Market Cap in place of price box "show_market_cap_over_price": false, "difficulty": "Hybrid", "last_txs": 100, "txs_per_page": 10 }, // ensure links on API page are valid "api": { "blockindex": 1337, "blockhash": "000000000661c86bf89e652eb142093bd9123006f3085595dee183bfe1c24570", "txhash": "776684cfd496890268805a1d86d3fd00f4097c1dbffecc3acd79101c15216594", "address": "DABQj7yoQuvfxVVWMf2mqWhoHLDMUqUJsc" }, // market settings //supported markets: bittrex, poloniex, yobit, empoex, bleutrade, cryptopia, ccex //default market is loaded by default and determines last price in header "markets": { "coin": "D", "exchange": "BTC", "enabled": ["tradeogre"], "tradeogre_id": "BTC-D", "default": "tradeogre" }, // richlist/top100 settings "richlist": { "distribution": true, "received": true, "balance": true }, // movement page settings // min amount: show transactions greater than this value // low flag: greater than this value flagged yellow // high flag: greater than this value flagged red "movement": { "min_amount": 100, "low_flag": 1000, "high_flag": 5000 }, // twitter, facebook, googleplus, youtube "twitter": "denariuscoin", "facebook": "yourfacebookpage", "googleplus": "yourgooglepluspage", "youtube": "youryoutubechannel", //genesis "genesis_tx": "c6d8e8f56c25cac33567e571a3497bfc97f715140fcfe16d971333b38e4ee0f2", "genesis_block": "00000d5dbbda01621cfc16bbc1f9bf3264d641a5dbf0de89fd0182c2c4828fcd", //heavy (enable/disable additional heavy features) "heavy": false, //disable saving blocks & TXs via API during indexing. "lock_during_index": false, //amount of txs to index per address (stores latest n txs) "txcount": 100, "txcount_per_page": 50, //show total sent & received on address page (set false if PoS) "show_sent_received": true, // how to calculate current coin supply // COINBASE : total sent from coinbase (PoW) // GETINFO : retreive from getinfo api call (PoS) // HEAVY: retreive from heavys getsupply api call // BALANCES : total of all address balances // TXOUTSET : retreive from gettxoutsetinfo api call "supply": "GETINFO", // how to acquire network hashrate // getnetworkhashps: uses getnetworkhashps api call, returns in GH/s // netmhashps: uses getmininginfo.netmhashpsm returns in MH/s "nethash": "netmhashps", // nethash unitd: sets nethash API return units // valid options: "P" (PH/s), "T" (TH/s), "G" (GH/s), "M" (MH/s), "K" (KH/s) "nethash_units": "G", // Address labels // example : "JhbrvAmM7kNpwA6wD5KoAsbtikLWWMNPcM": {"label": "This is a burn address", "type":"danger", "url":"http://example.com"} // label (required) = test to display // type (optional) = class of label, valid types: default, primary, warning, danger, success // url (optional) = url to link to for more information "labels": { // "DDD6SzCwXSEcTPHmNwEQX6xbUs2Rf3svNX": {"label": "Cryptopia address", "type":"primary", "url":"http://disney.com"}, // "JSWVXHWeYNknPdG9uDrcBoZHztKMFCsndw": {"label": "Cryptsy"} } } Go back to the main explorer directory and edit docker-compose.yml version: "3" services: traefik: image: "traefik:v2.2" command: #- "--log.level=DEBUG" - "--api.insecure=true" #change to false in production - "--api.dashboard=true" #change to false in production - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" - "--entrypoints.websecure.address=:443" - "--certificatesresolvers.myresolver.acme.tlschallenge=true" #- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" - "[email protected]com" - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json" ports: - "80:80" - "443:443" - "8080:8080" volumes: - "./letsencrypt:/letsencrypt" - "/var/run/docker.sock:/var/run/docker.sock:ro" restart: always denarius: image: buzzkillb/denariusd:iquidus volumes: - ~/.denarius:/data ports: - 33369:33369 - 32369:32369 restart: unless-stopped explorer: build: ./explorer stdin_open: true tty: true ports: - 3001:3001 links: - mongodb - denarius depends_on: - mongodb - denarius command: /bin/bash -c "service cron start && cd /opt/iquidus && npm start" labels: - "traefik.enable=true" - "traefik.http.routers.explorer.rule=Host(`explorer.example.com`)" - "traefik.http.routers.explorer.entrypoints=websecure" - "traefik.http.routers.explorer.tls.certresolver=myresolver" - "traefik.http.services.explorer.loadbalancer.server.port=3001" - "traefik.http.middlewares.explorer_redirect.redirectscheme.scheme=https" - "traefik.http.routers.explorer_insecure.rule=Host(`explorer.example.com`)" - "traefik.http.routers.explorer_insecure.entrypoints=web" - "traef[email protected]docker" mongodb: image: mongo:latest container_name: "mongodb" environment: - MONGO_DATA_DIR=/data/db - MONGO_LOG_DIR=/dev/null volumes: - ./data/db:/data/db ports: - 27017:27017 command: mongod --bind_ip 0.0.0.0 --logpath=/dev/null --quiet --wiredTigerCacheSizeGB 2 restart: unless-stopped Now run docker-compose cd ~/explorer docker-compose up -d And that's about it. Check 127.0.0.1:3001 or your domain. Traefik reverse proxy will automatically pull in letsencrypt TLS certs for you, will also redirect http to https, and generally keep everything up. Traefik once setup is much more clean than using an Nginx reverse proxy. Plus the letsencrypt TLS certs are taken care of automagically so no more certbot cronjobs. This example also shows how to send traffic to port 3001. This block explorer runs heavy, so I doubt this will work on a typical single CPU, 2gb VPS. Anytime you make a change to settings.json, rebuild like this cd ~/explorer docker-compose down rerun docker-compose build docker-compose up -d Build this locally first in a VM, and check it works. Also 127.0.0.1:8080 is the traefik dashboard. I would turn this off in the main docker-compose.yml on the VPS/server itself once ready to setup. While waiting for the full sync, the whole thing starts to go wild using up memory. Quick bash script to restart every 30min to cut down on potential crashing. saveram.sh #!/bin/bash while true; do docker-compose down && docker-compose up -d sleep 1800 done Example site I am syncing before I move to a VPS and different domain. https://explorer.denarius.guide/
  2. How to easily swap or change endianness in Javascript, NodeJS, etc. with one simple function! changeEndianness() const changeEndianness = (string) => { const result = []; let len = string.length - 2; while (len >= 0) { result.push(string.substr(len, 2)); len -= 2; } return result.join(''); } You can then use this function with any string to convert its endianness Example of using function: var yourstringvar = 'Your string goes here to swap endianness'; var newendian = changeEndianness(yourstringvar); console.log('Your newly swapped endian string', newendian);
  3. So not a lot of information out there, but if you want to convert a Bitcoin or Denarius or any standard crypto typically, you take the block hex to a block hash (typically used for block explorers and things) you just do the following: changeEndianness(SHA256(SHA256(BLOCKHEX))) So basically visually in text it would be: BLOCKHEX => Hashed to SHA256 => Hashed to SHA256 => Swap Endianness = Block Hash You are just hashing the hex twice and then swapping the endianness to obtain the hash of the block.
  4. Not my video, just thought I would share it! You need an RTL-SDR for attempting this RTL-SDR tutorial. The RTL-SDR Blog V3 is a very good cheap SDR: https://www.amazon.com/gp/product/B011HVUEME You will need TempestSDR as well: https://github.com/martinmarinov/TempestSDR
  5. How to compile Denarius (D) on macOS Mojave 10.14 By Carsen K First download Xcode from the App Store (v10.x) Install Xcode Command Line Tools via your Terminal: sudo xcode-select --install Accept Xcode License sudo xcodebuild -license Type agree after hitting space to get to the end -------------------------------------------------------- Download Qt 5.3.2 from: https://download.qt.io/archive/qt/5.3/5.3.2/qt-opensource-mac-x64-clang-5.3.2.dmg Install Qt and Qt Creator from this dmg (no need to install source files) Now in your default_pre.prf file inside your Qt 5.3.2 install change the following lines Example Location: Qt_install_folder/5.3.2/5.3/clang_64/mkspecs/features/mac/default_pre.prf REPLACE: isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))) WITH: isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))) Sometimes you just need to comment out line 16 the line below this (#error()) for Qt to recognize Xcode -------------------------------------------------------- Then download MacPorts from: https://www.macports.org/install.php Once installed run the following command in your Terminal to install all required Denarius dependancies. sudo port install boost db48 qrencode libevent miniupnpc openssl git Now you are almost ready to compile! -------------------------------------------------------- git clone https://github.com/carsenk/denarius cd denarius Now inside your denarius-qt.pro on line 14, replace the current QMAKE_CXXFLAGS with: QMAKE_CXXFLAGS += -fpermissive -Wno-literal-suffix -stdlib=libc++ Run this command in your terminal session with the denarius folder open, replace your username with your username or the entire path below with your correct QT location. export PATH=$PATH:/Users/<yourname>/Qt5.3.2/5.3/clang_64/bin Run qmake --version which should return Qt 5.3.2 You can now compile Denarius with the usual commands qmake "USE_UPNP=1" "USE_QRCODE=1" denarius-qt.pro make -j4 After compiling you can create a .dmg installer by running this command in the denarius root (you must have Python 2.7 installed, can be installed via MacPorts) sudo python contrib/macdeploy/macdeployqtplus Denarius.app -dmg You have successfully compiled Denarius on macOS!
×
×
  • Create New...