Skip to content

VcashPay - Digital money for the modern world

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.txt
Unknown
COPYING.txt
Notifications You must be signed in to change notification settings

lucidddreams/VcashPay-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Welcome to VCP!


What is VCP?

VCP is decentralized, sustainable, and secure digital money focused on addressing the inefficiencies present in existing financial systems. Uniquely designed to provide simple peer-to-peer transfer of value, VCP empowers individuals with the most efficient and accessible digital money possible, connecting them to the global economy with minimal impact. VCP provides an intuitive experience that feels like digital currency should – no fuss, low miner fees, 100x faster than traditional currency. This is what an accessible and easy-to-use digital money experience should feel like.

Getting Started


Get it!

  • dependencies:
    • general - Java 8
    • Ubuntu - http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
    • Debian - http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
    • FreeBSD - pkg install openjdk8

Run it!

  • click on the VCP icon, or start from the command line:

  • Unix: ./start.sh

  • Window: run.bat

  • wait for the JavaFX wallet window to open

  • on platforms without JavaFX, open http://localhost:16876/ in a browser


Compile it!

  • if necessary with: ./compile.sh
  • you need jdk-8 as well

Troubleshooting the NRS (VCP Reference Software)

  • How to Stop the NRS Server?

    • click on VCP Stop icon, or run ./stop.sh
    • or if started from command line, ctrl+c or close the console window
  • UI Errors or Stacktraces?

    • report on BitBucket
  • Permissions Denied?

    • no spaces and only latin characters in the path to the NRS installation directory
    • known jetty issue

Setup a Testnet Node

  • Windows Installer

    • Check the box mentioning Tesnet in Step 5 when running the Installer.
    • Configure nxt.properties (roaming/VCASHPAY/conf) as following
      nxt.myAddress=[your IP]
      nxt.apiServerHost=[your IP]
      nxt.adminPassword=[your password]
      nxt.allowedBotHosts=*
      
  • If not using the Installer :

    • Go to conf directory
    • Create a new file nxt.properties with
      nxt.isTestnet=true
      nxt.apiServerCORS=true
      nxt.uiServerCORS=true
      nxt.myAddress=SERVER_IP_ADDRESS
      nxt.allowedBotHosts=*
      nxt.allowedUserHosts=127.0.0.1; localhost; SERVER_IP_ADDRESS; 0:0:0:0:0:0:0:1;
      nxt.enableAPIserver=true
      nxt.apiServerHost=0.0.0.0
      nxt.adminPassword=YOUR_PASSWORD
    
  • Ports used :

    • 15874 (peer networking)
    • 6876 (UI)
    • 6877 (API_SSL)
    • Make sure to configure your Firewall
  • Run testnet :

  sudo docker-compose -f docker-compose.testnet.yml up -d

Further Reading

  • in this repository:
    • USERS-GUIDE.md
    • DEVELOPERS-GUIDE.md
    • OPERATORS-GUIDE.md
    • In the doc folder

License

  • This program is distributed under the terms of the Jelurida Public License version 1.1 for the Ardor Public Blockchain Platform.
  • This source code has been generated by CoinGenerator - https://coingenerator.sh

Install with Docker

  1. Install docker, apache, certbot and git in your machine
  2. Open the ports
  3. sudo git clone https://github.com/lucidddreams/VcashPay-core
  4. Edit the nxt conf with the adminPassword
  5. Create another nxt.propreties file with
nxt.apiServerCORS=true
nxt.uiServerCORS=true
nxt.myAddress=SERVER_IP_ADDRESS
nxt.allowedBotHosts=*
nxt.allowedUserHosts=127.0.0.1; localhost; SERVER_IP_ADDRESS; 0:0:0:0:0:0:0:1;
nxt.enableAPIserver=true
nxt.apiServerHost=0.0.0.0
  1. sudo docker build -f Dockerfile -t vcash .
  2. Followed by sudo docker run -d -p 16876:16876 -p 16874:16874 --restart unless-stopped vcash
  3. Check if it runs using docker logs --follow and the id of the container
  4. Then follow this to add the https - https://nxtforum.org/public-nodes-vpss/method-to-configure-https-for-nxt-public-nodes/

Recently, some developers and myself had missed having a simple way to enable remote https access to applications running in public nodes and a custom port.

When websites and services that want to connect to a public node have their backend running on https, unencrypted http calls can become a problem.

Installing SSL Certificates with Letsencrypt/Certbot has become easier than ever, so this is a workaround for the issue that I don't think has been posted before, and might be useful.

It has been tried and will probably be used for SuperNET Iguana nodes (and Basilisk, the lite client evolution), but the first time I discussed this was with Tosch and around Nxt nodes, and it worked easily when I tested it in a public Nxt node.


Install with Docker-compose (with ssl cert)

  1. in data/nginx/app.conf replace both server_name value with your domain
  2. in init-letsencrypt.sh replave domains value with your domain and email value with your email
  3. run
chmod +x init-letsencrypt.sh 
  1. run
sudo ./init-letsencrypt.sh 
  1. run
sudo docker-compose -f docker-compose.yml up -d

Requirements

  1. A Linux server running VCP, and configured for public API access. This should only require creating a nxt.properties under nxt/conf similar to this:
nxt.apiServerCORS=true
nxt.uiServerCORS=true
nxt.myAddress=SERVER_IP_ADDRESS
nxt.allowedBotHosts=*
nxt.allowedUserHosts=127.0.0.1; localhost; SERVER_IP_ADDRESS; 0:0:0:0:0:0:0:1;
nxt.enableAPIserver=true
nxt.apiServerHost=0.0.0.0
  1. A subdomain (or domain) to access your node. This is required to use an SSL certificate. The subdomain should be included in the domain nameservers configuration as an A record pointing to your server IP.

Procedure

In this example, setup was done using root account. If you're using a non-root account, it needs to be in the sudo group and commands need to be run using sudo.

  1. Install letsencrypt (certbot) and generate the SSL certificate for your (sub)domain.
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
./certbot-auto certonly --standalone --email [email protected] -d sub.example.com
  1. Install apache webserver and enable the modules for ssl and reverse proxy.
apt-get install apache2
a2enmod ssl proxy_http
  1. Configure the default apache configuration file.
nano /etc/apache2/sites-available/000-default.conf

Replace the default configuration lines with the following, replacing the strings in red with your (sub)domain:

<VirtualHost *:80>
        ServerName sub.example.com
        Redirect permanent / https://sub.example.com/
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName sub.example.com
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/sub.example.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/sub.example.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/sub.example.com/chain.pem
        SSLProxyEngine On
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass / http://localhost:7876/
        ProxyPassReverse / http://localhost:7876/
</VirtualHost>
</IfModule>
  1. Finally, restart the apache webserver.
service apache2 restart

As an example, you can check https://coin.vcashpay.com/, and try a VCP API request to that node using encrypted connection - https://coin.vcashpay.com/nxt?requestType=getState

Any improvements and alternatives for this procedure will be welcome.

  1. Don't forget to make your nodes forge / and add peers
  2. Run sudo crontab -e
  3. Add this 45 2 * * 6 /usr/bin/certbot renew --dry-run --renew-hook "service apache2 restart" and save

Verion update

Change version number in the following files:

  • html/config.xml
  • src/java/nxt/Nxt.java
  • conf/nxt-default.properties