Encrypt-S / navtech

NAVTech Anonymous Transaction Processors
MIT License
17 stars 4 forks source link

NavCoin

NAVTECH

Client Settings

Specification Value
addanonserver 95.183.52.55:3000
addanonserver 95.183.53.184:3000
addanonserver 95.183.52.28:3000
addanonserver 95.183.52.29:3000

RECOMMENDED SPECIFICATIONS

Component Value
CPU 2 x 2.4 Ghz Intel Xeon
RAM 2 GB
Hard Disk 40GB
Operating System 64bit Debian or Ubuntu
API Port 3000

SETUP STEPS

SETUP NAVCOIN AND SUBCHAIN

https://github.com/navcoindev/navcoin2/tree/master

https://github.com/navcoindev/subchain/tree/master

INSTALL TOOLS AND DOWNLOAD SOURCE

Here are the detailed explaination of what the settings control and their defaults:

Name Type Required Default Description
GLOBAL object true none contains the global settings which control how your server operates
GLOBAL.serverType string true INCOMING determines if your server is of incoming or outgoing type
GLOBAL.encryptedWallet boolean true false flag for if the NavCoin and Subchain wallets are encrypted
GLOBAL.preventSend boolean false false flag to prevent sending of NAV & SUB for testing purposes
GLOBAL.maintenance boolean false false flag to turn your wallet to maintenance mode and restrict IP access
GLOBAL.allowedIps array false none array of allowed ip addresses when server is in maintenance mode
GLOBAL.allowedIps[n] object true none contains the address information of a single user allowed while in maintenance
GLOBAL.allowedIps[n].ipAddress string true none ip address to allow for maintenance testing
INCOMING object true none contains all the settings which are unique to incoming servers
INCOMING.local object true none contains the address information of the local (incoming) server
INCOMING.local.ipAddress string true none IP address of the local server
INCOMING.local.port string true 3000 port of the local server
INCOMING.local.host string false none optional dns name of the local server
INCOMING.remote array true none contains the settings object of each (outgoing) server in the cluster
INCOMING.remote[n] object true none contains the address information of a single remote (outgoing) server in the cluster
INCOMING.remote[n].ipAddress string true none IP address of the remote server
INCOMING.remote[n].port string true 3000 port of the remote server
INCOMING.remote[n].host string false none optional dns name of the remote server
INCOMING.scriptInterval int true 120000 time in milliseconds between each transaction processing cycle
INCOMING.minAmount int true 10 minimum transaction size the server will accept
INCOMING.maxAmount int true 10000 maximum transaction size the server will accept
INCOMING.anonFeePercent float true 0.5 percentage taken as the server transaction fee, must be between 0 - 100.
INCOMING.notificationEmail string true none email address error notifications will be sent to
INCOMING.smtp object true none contains the settings to send notification emails via smtp
INCOMING.smtp.user string true none username for sending mail via smtp
INCOMING.smtp.pass string true none password for sending mail via smtp
INCOMING.smtp.server string true none server for sending mail via smtp
INCOMING.navCoin object true none contains the settings for the navcoin daemon
INCOMING.navCoin.user string true none rpcusername set in the navcoin.conf file
INCOMING.navCoin.pass string true none rpcpassword set in the navcoin.conf file
INCOMING.navCoin.ip string true '127.0.0.1' ip address where navcoind is running
INCOMING.navCoin.port string true '44444' port navcoind is running on
INCOMING.navCoin.walletPassphrase string encryptedWallet none walletpassphrase to use to unlock the wallet for transactions. If the wallet is unencrypted, this will be used to encrypt it during setup
INCOMING.subChain object true none contains the settings for the subchain daemon
INCOMING.subChain.user string true none rpcusername set in the navajoanonsubchain.conf file
INCOMING.subChain.pass string true none rpcpassword set in the navajoanonsubchain.conf file
INCOMING.subChain.ip string true '127.0.0.1' ip address where navajoanonsubchain is running
INCOMING.subChain.port string true '44444' port navajoanonsubchaind is running on
INCOMING.subChain.walletPassphrase string encryptedWallet none walletpassphrase to use to unlock the wallet for transactions. If the wallet is unencrypted, this will be used to encrypt it during setup
INCOMING.secretOptions object true none contains the options for creating the shared secret
INCOMING.secretOptions.salt string true none any string to create randomness in the secret, recommended 20 characters
INCOMING.secretOptions.saltRounds int true 10 number of times to salt the sercret
INCOMING.secret string true none this is the secret shared between the incoming and outgoing server pair. This will be generated during the setup process
OUTGOING boolean true false explicit flag to confirm that this is not an outgoing server

RUNNING THE INCOMING SETUP SCRIPTS

Now the configuration is done, we need to perform the setup operations from the project root directory.

SETUP OUTGOING SERVER

Setting up the outgoing server is much the same process as the incoming server but with some different settings.

Here are the detailed explaination of what the settings control and their defaults:

Name Type Required Default Description
GLOBAL object true none contains the global settings which control how your server operates
GLOBAL.serverType string true INCOMING determines if your server is of incoming or outgoing type
GLOBAL.encryptedWallet boolean true false flag for if the NavCoin and Subchain wallets are encrypted
OUTGOING.local object true none contains the address information of the local (outgoing) server
OUTGOING.local.ipAddress string true none IP address of the local server
OUTGOING.local.port string true 3000 port of the local server
OUTGOING.local.host string false none optional dns name of the local server
OUTGOING.remote array true none contains the settings object of each (incoming) server in the cluster
OUTGOING.remote[n] object true none contains the address information of a single remote (incoming) server in the cluster
OUTGOING.remote[n].ipAddress string true none IP address of the remote server
OUTGOING.remote[n].port string true 3000 port of the remote server
OUTGOING.remote[n].host string false none optional dns name of the remote server
OUTGOING.scriptInterval int true 120000 time in milliseconds between each transaction processing cycle
OUTGOING.minAmount int true 10 minimum transaction size the server will accept
OUTGOING.maxAmount int true 10000 maximum transaction size the server will accept
OUTGOING.navPoolAmount int true 50000 the size of the NAV pool, all funds exceeding this value get sent to the NAVTech fee address
OUTGOING.txFeePayoutMin int true 100 the minimum fee amount to accrue before sending a payout to the anonTxFeeAddress
OUTGOING.anonTxFeeAddress string true none NAV address used to collect the server processing fee.
OUTGOING.notificationEmail string true none email address error notifications will be sent to
OUTGOING.smtp object true none contains the settings to send notification emails via smtp
OUTGOING.smtp.user string true none username for sending mail via smtp
OUTGOING.smtp.pass string true none password for sending mail via smtp
OUTGOING.smtp.server string true none server for sending mail via smtp
OUTGOING.navCoin object true none contains the settings for the navcoin daemon
OUTGOING.navCoin.user string true none rpcusername set in the navcoin.conf file
OUTGOING.navCoin.pass string true none rpcpassword set in the navcoin.conf file
OUTGOING.navCoin.ip string true '127.0.0.1' ip address where navcoind is running
OUTGOING.navCoin.port string true '44444' port navcoind is running on
OUTGOING.navCoin.walletPassphrase string encryptedWallet none walletpassphrase to use to unlock the wallet for transactions. If the wallet is unencrypted, this will be used to encrypt it during setup
OUTGOING.subChain object true none contains the settings for the subchain daemon
OUTGOING.subChain.user string true none rpcusername set in the navajoanonsubchain.conf file
OUTGOING.subChain.pass string true none rpcpassword set in the navajoanonsubchain.conf file
OUTGOING.subChain.ip string true '127.0.0.1' ip address where navajoanonsubchain is running
OUTGOING.subChain.port string true '44444' port navajoanonsubchaind is running on
OUTGOING.subChain.walletPassphrase string encryptedWallet none walletpassphrase to use to unlock the wallet for transactions. If the wallet is unencrypted, this will be used to encrypt it during setup
OUTGOING.secret string true none this is the secret shared between the incoming and outgoing server pair. This needs to match the sercret used in the incoming server settings that was generated by running 'npm run setup' on the incoming server
INCOMING boolean true false explicit flag to confirm that this is not an incoming server

This is very similar to the incoming serer, however please note that in this instance the local server refers to the outgoing server since this is the server we are configuring and the remotes are the incoming servers in your cluster. The secret will not be generated by this server type, it needs to be copied from the incoming server. All servers in the same cluster must share the same secret.

RUNNING THE OUTGOING SETUP SCRIPTS

Now the configuration is done, we need to perform the setup operations from the project root directory.

The vendor file links to all the included libraries while the navtech file is the compressed and uglified version of the navtech anon processing scripts.

ADDITIONAL NOTES

Now you have both servers setup, it is time to send some test transactions. Make sure you put the correct IP addresses, port number and anonhash parameter into your navcoin.conf file and send some small value test transactions though your NAVTech servers.

If you are happy with your configuration and transactions are processing successfully you will want to remove the GLOBAL.maintenance and GLOBAL.allowedIps settings from your config/default.js file so the servers are open for public use.

Then head along to http://reddit.com/r/NAVTechAnon and submit your servers for public use.

MULTIPLE INCOMING AND OUTGOING SERVERS

If you want to setup multiple incoming and outgoing servers in your cluster the setup process is the same for each one. The only extra things you will need to remember are to add all your outgoing servers to the INCOMING.remote arrays and all your incoming servers to your OUTGOING.remote arrays so the servers can all talk to eachother.

RESTARTING SERVERS

There should be some caution taken when restarting the NAVTech service or restarting the server. The chances are very small because the transaction cycle completes pretty quickly, but it is not recommended to shut the server down while it is in the act of processing transactions. I have created an endpoint to see the server status so you can choose a time between cycles to stop the service

https://95.183.53.184:3000/api/status

It shows whether the server is currently processing, is paused and the time till the next cycle is due to start.

This should give you ample information to be able to gracefully shut the server down between cycles using the forever command.

forever stop 0

License

Distributed under the MIT software license.