Table of Contents
Creating the Pool

Lets start by creating the Pool where the miners will then connect and borrow their connection to serve as a VPN node.

Initiate the Pool

Get into your linux terminal and start in your home folder:

$ mkdir pool
$ cd pool
$ wget https://docs.hopchain.org/_media/Pool_amd64
$ mv pool_amd64 Pool
$ chmod +x Pool

BAS Configuration

This step is to connect the Pool with BAS network in order to have HOP protocol recognize your new Pool:

$ wget https://docs.hopchain.org/_media/BAS_amd64
$ mv BAS_amd64 BAS
$ chmod +x BAS
$ cd ~
$ nohup ./BAS> bas.log 2>&1 &
Check whether BAS has started tail -f bas.log correctly. If there is no error, it means it has started correctly.
$ ./Pool init
Type your own password through command line, here we use 123 as example.
$ vi ~/.pool/conf.json
{
        "version": "1.0.3m_gr",
        "basip": "167.179.75.39",
        "web_port": 42888,
        "ethereum": {
                "1": {
                        "id": 1,
                        "apiUrl": "https://mainnet.infura.io/v3/d64d364124684359ace20feae1f9ac20",
                        "paymentService": "0x60eb24514ee5d5be18685b433e5910c3205d085e",
                        "token": "0x1999ac2b141e6d5c4e27579b30f842078bc620b3"
                },
                "3": {
                        "id": 3,
                        "apiUrl": "https://ropsten.infura.io/v3/d64d364124684359ace20feae1f9ac20",
                        "paymentService": "0x72d5f9f633f537f87ef7415b8bdbfa438d0a1a6c",
                        "token": "0xad44c8493de3fe2b070f33927a315b50da9a0e25"
                }
        },
        "access_pub_key": [
                "0x52B65e5a662D330f259f4161Efb2eF4034365914"
        ]
}
id 1 is for the ETH Mainnet and id 3 is for the Ropsten Testnet

BAS Configuration

This step is to make HOP Global Network recognizing your server.

Navigate to the folder contains BAS tool:

$ ./Pool bas -e "your_email_address@hop.com" -n "your_pool_name" -p 123 -i your_ip_address -u http://yoursite.com
conf init success

++++++++++++++++++++++++++++++++++++++++++++++++++++
+PoolVersion:   1.0.3m_gr+
+DebugMode:     false+
+LogLevel:      INFO+
+Token:
++++++++++++++++++++++++++++++++++++++++++++++++++++
+NetworkID:     1+
+EthApiUrl:     https://mainnet.infura.io/v3/d64d364124684359ace20feae1f9ac20+
+MicroPaySys:   0x5eC8589C8832AdE0B45C608681bbaCEF517E7caD+
+Token: 0x1999ac2b141E6d5c4e27579b30f842078bc620b3+
++++++++++++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++++++++++++++++++++++++++++++++++

log init success
bas ip not set, use system setting ip
0xfd3F857b882f2Ae5D8c247605a81E1350DC7D7eB 20
reg success!
0xDfB3533df84bC4955552B55F6933AD99b429be89 is your Pool Ropsten ETH wallet address
Flags:
  -b, --bas string        BAS IP to save and query, default from conf file
  -e, --email string      email for contacting pool's administrator
  -h, --help              help for bas
  -n, --name string       pool name
  -p, --password string   Pool's block chain password'
  -i, --pool-ip string    Pool's ip for it's block chain address
  -u, --url string        website address for pool

Pool Registration

Use Metamask, Chrome or Firefox extension to create Ropsten

Please transfersufficient HOP Tokensinto your Pool wallet by send email to hyperorchidcs@gmail.com in order to continue this step.

Please transfersufficient ETH Tokensinto your Pool wallet through https://faucet.dimensions.network or https://faucet.metamask.io.

Usage:
  Pool eth reg [flags]

Flags:
  -d, --debug       Pool eth reg -d
  -h, --help        help for reg
  -t, --token int   Token number to register on system (default 102400)
$ ./Pool eth balance -d
conf init success

++++++++++++++++++++++++++++++++++++++++++++++++++++
+PoolVersion:   1.0.3m_gr+
+DebugMode:     true+
+LogLevel:      INFO+
+Token:
++++++++++++++++++++++++++++++++++++++++++++++++++++
+NetworkID:     3+
+EthApiUrl:     https://ropsten.infura.io/v3/d64d364124684359ace20feae1f9ac20+
+MicroPaySys:   0x72D5f9f633f537F87Ef7415B8Bdbfa438D0a1a6c+
+Token: 0xAd44c8493dE3FE2B070f33927A315b50Da9a0e25+
++++++++++++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++++++++++++++++++++++++++++++++++

log init success
0xfd3F857b882f2Ae5D8c247605a81E1350DC7D7eB
main address:-> 0xfd3F857b882f2Ae5D8c247605a81E1350DC7D7eB
payer address:-> 0xfd3F857b882f2Ae5D8c247605a81E1350DC7D7eB

++++++++++++++++++++++++++++++++++++++++++++++++++++
+NetworkID:     3+
+EthApiUrl:     https://ropsten.infura.io/v3/d64d364124684359ace20feae1f9ac20+
+MicroPaySys:   0x72D5f9f633f537F87Ef7415B8Bdbfa438D0a1a6c+
+Token: 0xAd44c8493dE3FE2B070f33927A315b50Da9a0e25+
++++++++++++++++++++++++++++++++++++++++++++++++++++

hop balance:-> 300000000000000000000
eth balance:-> 1000000000000000000
contract approved:-> 0

Transfer ENOUGH ETH and HOP into your Pool wallet in this case, the wallet address is 0xfd3F857b882f2Ae5D8c247605a81E1350DC7D7eB

$ ./Pool eth reg -d -t 300
log init success
Password=>
conf init success

++++++++++++++++++++++++++++++++++++++++++++++++++++
+PoolVersion:   1.0.3m_gr+
+DebugMode:     true+
+LogLevel:      INFO+
+Token:
++++++++++++++++++++++++++++++++++++++++++++++++++++
+NetworkID:     3+
+EthApiUrl:     https://ropsten.infura.io/v3/d64d364124684359ace20feae1f9ac20+
+MicroPaySys:   0x72D5f9f633f537F87Ef7415B8Bdbfa438D0a1a6c+
+Token: 0xAd44c8493dE3FE2B070f33927A315b50Da9a0e25+
++++++++++++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++++++++++++++++++++++++++++++++++

log init success
Password=>
Approving ......
0x8227fc76c00b1f1c93a1d699f359762c66c5c6720cae875f7a4c08f7f88356e2

Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Tx is in process: not found
Approve success......
registering......
register success
0x9b36d5c6c267b709b6f15390a9e78a581e0bad6de17b10f2eca1a11ce6ffc15b

The Registration takes up to 10 mins, check the Pirate Dapp or MAC OS Application to make sure your pool is appearing in the “Flow Market”.

Download Pirate and check your Pool is successfully registered or not

Pirate is a cross-platform Dapp(Decentralized Application) developed in HOP protocol. Pirate is the first affiliate software whose sole goal is to provide VPN app to all users.

iOS

Android

Pool Registration

systemctl stop firewalld.service 
systemctl disable firewalld.service

Open 3000-65535 TCP and UDP port and BAS tcp:8854 udp: 8853

$ nohup ./Pool -d -p123> pool.log 2>&1 &
$ ps -ef|grep Pool
hyperor+  9470  9437  0 23:07 pts/0    00:00:00 grep --color=auto Pool
hyperor+ 23592     1  0 Jul09 ?        00:32:34 Pool -d -p 123
$ netstat -nlp| grep Pool

Command and Option

Use Option -d for Ropsten Test Network

Pool

$ ./Pool -h
Usage:
  Pool [flags]
  Pool [command]

Available Commands:
  bas             bas reg ip and block chain address
  eth             operate with ethereum contract
  help            Help about any command
  init            init miner pool
  show            show system settings
  web-access-addr show web access address

Flags:
  -d, --debug             Pool -d
  -h, --help              help for Pool
  -p, --password string   Pool -p [PASSWORD]
  -v, --version           Pool -v

bas

$ ./Pool bas -h
Usage:
  Pool bas [flags]

Flags:
  -b, --bas string        BAS IP to save and query, default from conf file
  -e, --email string      email for contacting pool's administrator
  -h, --help              help for bas
  -n, --name string       pool name
  -p, --password string   Pool's block chain password'
  -i, --pool-ip string    Pool's ip for it's block chain address
  -u, --url string        website address for pool

eth

$ ./Pool eth -h
Usage:
  Pool eth [command]

Available Commands:
  balance            show current pool's basic block chain infos
  claim              claim user's token to pool's account
  convert            convert go string to bytes type of ethereum
  export             export pool wallet to ethereum wallet
  gas                estimate transfer eth or token gas
  import-private-key import private-key
  join               make miner join the pool
  private-key        show private-key
  reg                register this pool to micro payment system
  transfer           transfer eth to other account
  transfer-token     transfer hop to other account
  unjoin             miner exit the pool
  unreg              unregister pool from micro payment channel

Flags:
  -h, --help   help for eth

eth balance

$ ./Pool eth balance -h
Usage:
  Pool eth balance [flags]

Flags:
  -a, --address string   Show [ADDRESS]'s balance
  -d, --debug            Show pool's balance
  -h, --help             help for balance

eth claim

$ ./Pool eth claim -h
Usage:
  Pool eth claim [flags]

Flags:
  -d, --debug                Debug model
  -h, --help                 help for claim
  -p, --password string      Pool's account password'
  -u, --userAddress string   User's address to be claimed

eth convert

$ ./Pool eth convert -h
Usage:
  Pool eth convert [flags]

Flags:
  -h, --help         help for convert
  -s, --str string   Convert string to ethereum abi packed code

eth export

$ ./Pool eth export -h
Usage:
  Pool eth export [flags]

Flags:
  -e, --exportPass string   Password for exported ethereum key store file
  -f, --file string         File name for exported ethereum key store (default "~/eth.wallet")
  -h, --help                help for export
  -p, --password string     Password of pool's account

eth join

$ ./Pool eth join -h
Usage:
  Pool eth join [flags]

Flags:
  -d, --debug             register this pool to test network
  -h, --help              help for join
  -p, --password string   Pool's account password'
  -s, --subAddr string    Miner's sub address
  -t, --token int         Token number to join pool for miner (default 50000)

eth reg

$ ./Pool eth reg -h
Usage:
  Pool eth reg [flags]
Flags:
  -d, --debug       Pool eth reg -d
  -h, --help        help for reg
  -t, --token int   Token number to register on system (default 102400)

eth unjoin

$ ./Pool eth unjoin -h
Usage:
  Pool eth unjoin [flags]

Flags:
  -d, --debug             register this pool to test network
  -h, --help              help for unjoin
  -p, --password string   Pool's account password'
  -s, --subAddr string    Miner's sub address

eth unreg

$ ./Pool eth unreg -h
Usage:
  Pool eth unreg [flags]

Flags:
  -d, --debug             Debug model
  -h, --help              help for unreg
  -p, --password string   Pool's account password'

eth unreg

$ ./Pool eth unreg -h
Usage:
  Pool eth unreg [flags]

Flags:
  -d, --debug             Debug model
  -h, --help              help for unreg
  -p, --password string   Pool's account password'

init

$ ./Pool init -h
Usage:
  Pool init [flags]

Flags:
  -h, --help              help for init
  -p, --password string   Password to init pool

show

$ ./Pool show -h
Usage:
  Pool show [command]

Available Commands:
  address     show wallet main address
  allminer    show all miner data
  alluser     show all user data
  conf        show system configuration address
  income      show all income
  miner       show miner info data
  pool        show all pool
  receipt     show lasted receipt
  subpool     show subscribe pool
  user        show local user account data

Flags:
  -h, --help   help for show

show address

$ ./Pool show address -h
Usage:
  Pool show address [flags]

Flags:
  -h, --help   help for address

show conf

$ ./Pool show conf -h
Usage:
  Pool show conf [flags]

Flags:
  -h, --help   help for conf

show miner

$ ./Pool show miner -h
Usage:
  Pool show miner [flags]

Flags:
  -h, --help           help for miner
  -m, --miner string   Miner's block chain password'

show receipt

$ ./Pool show receipt -h
Usage:
  Pool show receipt [flags]

Flags:
  -h, --help          help for receipt
  -u, --user string   User's block chain password'

show user

$ ./Pool show user -h
Usage:
  Pool show user [flags]

Flags:
  -h, --help          help for user
  -u, --user string   User's block chain password'