Skip to content

Servers roles in MetaHash

ChMarina edited this page Jun 3, 2019 · 12 revisions

ProductionNetwork

ProductionNetwork (or net-main) is the main network in MetaHash.

The entire digital transaction register can be found in explorer http://venus.mhscan.com. For the convenience of users, there is possibility provided in explorer to search by address, hash transaction and block number in blockchain.

Net-main network works with a large number of various servers playing different roles:

  • peer node (proxy),
  • verifier (verif),
  • core (core)
  • torrent (tor).

In brackets you see shorthands for each role accepted in the network.

Torrent servers in MetaHash network respond to port 5795. Proxy servers respond to port 9999.

Request in net-main network

Torrent servers

Torrent servers in the network respond to the main requests as follows:

  • fetch-balance
  • fetch-history
  • get-tx
  • get-count-blocks
  • get-block-by-number
  • get-block-by-hash
  • get-dump-block-by-number
  • get-dump-block-by-hash
  • get-last-txs
  • get-blocks

To find out more about how to call and use these methods in the MetaHash network, check out our articles.

status

Apart from the methods listed above, you can always find out the torrent version you interact with. To do it, perform a request to the torrent as follows:

Request

http://TORRENT_IP:TORRENT_PORT/status

Result

{"result":"ok","version":"0.90","git_hash":"d9e899b53a031e2703cb439caf96f49b85183713"}

Proxy servers

Proxy servers in the network respond to the main requests as follows:

  • mhc_send
  • getinfo

mhc_send

There are several ways to work with the proxy servers of our network.

  • To use metahash-fullnode-client method, you need to get familiar with send-tx method, it allows to perform transactions via our client (it is the internal name of mhc_send method inside the client).

  • To perform transactions directly via requests, please read the articles: Creating-transactions and Creating-transactions-with-data-field.

getinfo

Getinfo method makes it possible to know the version of proxy server, which IP address is specified in the request, for example:

Request

curl PROXY_IP:PROXY_PORT -X POST --data '{"id":1,"method":"getinfo"}'

Result

{“result”:{“version”:“0.2 “},“error”:null}

Clone this wiki locally