-
Notifications
You must be signed in to change notification settings - Fork 1
Servers roles in MetaHash
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.
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.
-
If you’d like to use metahash-fullnode-client, install it according to the instruction: metahash-fullnode-client/wiki/Create-docker-file. After that you will be able to perform all the mentioned methods on basis of the examples described here: metahash-fullnode-client/wiki/Usage.
-
If you’d like to work with torrent servers directly, read the following article containing some examples of performing methods mentioned above: Operations-with-MetaHash-address, and then you will be able to perform your methods on a similar basis.
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 in the network respond to the main requests as follows:
- mhc_send
- getinfo
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 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}
