From a1d977ba2a4765410946af88c9e70041ff703aee Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Tue, 1 May 2018 09:15:17 +0800 Subject: [PATCH] new link added --- README.md | 113 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 86a504b..8eaf951 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Onion Monero Blockchain Explorer -Currently available Monero blockchain explorers have several limitations which are of +Currently available Monero blockchain explorers have several limitations which are of special importance to privacy-oriented users: - they use JavaScript, @@ -13,10 +13,10 @@ special importance to privacy-oriented users: In this example, these limitations are addressed by development of -an Onion Monero Blockchain Explorer. The example not only shows how to use +an Onion Monero Blockchain Explorer. The example not only shows how to use Monero C++ libraries, but also demonstrates how to use: - - [crow](https://github.com/ipkn/crow) - C++ micro web framework + - [crow](https://github.com/ipkn/crow) - C++ micro web framework - [mstch](https://github.com/no1msd/mstch) - C++ {{mustache}} templates - [json](https://github.com/nlohmann/json) - JSON for Modern C++ - [fmt](https://github.com/fmtlib/fmt) - Small, safe and fast string formatting library @@ -24,28 +24,28 @@ Monero C++ libraries, but also demonstrates how to use: ## Addresses Tor users: - + - [http://dvwae436pd7nt4bc.onion](http://dvwae436pd7nt4bc.onion) (Front-end templates are [maintained by @suhz](https://github.com/suhz/onion-monero-blockchain-explorer/tree/moneroexplorer.com/src/templates)). - -Clearnet versions: +Clearnet versions: + - [https://labor.serveo.net/](https://labor.serveo.net/) - temprorary link (slow), bleading edge version. - [https://xmrchain.net/](https://xmrchain.net/) - https enabled, most popular and very stable. - [https://MoneroExplorer.com/](https://moneroexplorer.com/) - nice looking one, https enabled. - [https://monerohash.com/explorer/](https://monerohash.com/explorer/) - nice looking one, https enabled. - - [http://explore.MoneroWorld.com](http://explore.moneroworld.com) - same as the second one. + - [http://explore.MoneroWorld.com](http://explore.moneroworld.com) - same as the second one. - [https://moneroexplorer.pro/](https://moneroexplorer.pro/) - nice looking one, https enabled. - [http://monerochain.com/](http://monerochain.com/) - JSON API based, multiple nodes. - [https://blox.minexmr.com/](https://blox.minexmr.com/) - - https enabled. - + Testnet version: - [http://nimis.serveo.net/](http://nimis.serveo.net/) - bleeding edge version (down currently). - [https://testnet.xmrchain.com/](https://testnet.xmrchain.com/) - https enabled. - [https://explorer.monero-otc.com/](https://explorer.monero-otc.com/) - https enabled. - + Stagenet version: - - [http://162.210.173.150:8083/](http://162.210.173.150:8083/) - recent version. + - [http://162.210.173.150:8083/](http://162.210.173.150:8083/) - recent version. i2p users (main Monero network): @@ -57,7 +57,7 @@ Alternative block explorers: - [https://monerobase.com](https://monerobase.com/) - [http://chainradar.com](http://chainradar.com/xmr/blocks) - + ## Onion Monero Blockchain Explorer features The key features of the Onion Monero Blockchain Explorer are: @@ -87,8 +87,8 @@ The key features of the Onion Monero Blockchain Explorer are: Current development branch: - https://github.com/moneroexamples/onion-monero-blockchain-explorer/tree/devel - - + + ## Compilation on Ubuntu 16.04 @@ -102,7 +102,7 @@ sudo apt update sudo apt install git build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libcurl4-openssl-dev libgtest-dev libreadline-dev libzmq3-dev libsodium-dev -# go to home folder +# go to home folder cd ~ git clone --recursive https://github.com/monero-project/monero @@ -136,7 +136,7 @@ mkdir build && cd build # create the makefile cmake .. -# altearnatively can use: cmake -DMONERO_DIR=/path/to/monero_folder .. +# altearnatively can use: cmake -DMONERO_DIR=/path/to/monero_folder .. # if monero is not in ~/monero # # also can build with ASAN (sanitizers), for example @@ -147,8 +147,8 @@ make ``` When compilation finishes executable `xmrblocks` should be created. Before running -please make sure that `~/Downloads` folder exists and is writable. -Time zone library that explorer is using, puts there +please make sure that `~/Downloads` folder exists and is writable. +Time zone library that explorer is using, puts there its database of time zone offsets To run it: @@ -157,7 +157,7 @@ To run it: ``` By default it will look for blockchain in its default location i.e., `~/.bitmonero/lmdb`. -You can use `--bc-path` option if its in different location. +You can use `--bc-path` option if its in different location. Example output: ```bash @@ -177,7 +177,7 @@ xmrblocks, Onion Monero Blockchain Explorer: -s [ --stagenet ] [=arg(=1)] (=0) use stagenet blockchain --enable-pusher [=arg(=1)] (=0) enable signed transaction pusher --enable-mixin-details [=arg(=1)] (=0) - enable mixin details for key images, + enable mixin details for key images, e.g., timescale, mixin of mixins, in tx context --enable-key-image-checker [=arg(=1)] (=0) @@ -186,38 +186,38 @@ xmrblocks, Onion Monero Blockchain Explorer: enable outputs key file checker --enable-json-api [=arg(=1)] (=1) enable JSON REST api --enable-tx-cache [=arg(=1)] (=0) enable caching of transaction details - --show-cache-times [=arg(=1)] (=0) show times of getting data from cache + --show-cache-times [=arg(=1)] (=0) show times of getting data from cache vs no cache --enable-block-cache [=arg(=1)] (=0) enable caching of block details --enable-js [=arg(=1)] (=0) enable checking outputs and proving txs using JavaScript on client side --enable-autorefresh-option [=arg(=1)] (=0) - enable users to have the index page on + enable users to have the index page on autorefresh --enable-emission-monitor [=arg(=1)] (=0) enable Monero total emission monitoring thread -p [ --port ] arg (=8081) default explorer port --testnet-url arg you can specify testnet url, if you run - it on mainnet or stagenet. link will + it on mainnet or stagenet. link will show on front page to testnet explorer - --stagenet-url arg you can specify stagenet url, if you + --stagenet-url arg you can specify stagenet url, if you run it on mainnet or testnet. link will show on front page to stagenet explorer --mainnet-url arg you can specify mainnet url, if you run - it on testnet or stagenet. link will + it on testnet or stagenet. link will show on front page to mainnet explorer - --no-blocks-on-index arg (=10) number of last blocks to be shown on + --no-blocks-on-index arg (=10) number of last blocks to be shown on index page - --mempool-info-timeout arg (=5000) maximum time, in milliseconds, to wait + --mempool-info-timeout arg (=5000) maximum time, in milliseconds, to wait for mempool data for the front page - --mempool-refresh-time arg (=5) time, in seconds, for each refresh of + --mempool-refresh-time arg (=5) time, in seconds, for each refresh of mempool state - -b [ --bc-path ] arg path to lmdb folder of the blockchain, + -b [ --bc-path ] arg path to lmdb folder of the blockchain, e.g., ~/.bitmonero/lmdb - --ssl-crt-file arg path to crt file for ssl (https) + --ssl-crt-file arg path to crt file for ssl (https) functionality - --ssl-key-file arg path to key file for ssl (https) + --ssl-key-file arg path to key file for ssl (https) functionality -d [ --deamon-url ] arg (=http:://127.0.0.1:18081) Monero deamon url @@ -235,57 +235,57 @@ alias xmrblockstestnet='~/onion-monero-blockchain-explorer/build/xmrblocks -t -- These are aliases similar to those used for http://139.162.32.245:8081/ and http://139.162.32.245:8082/, respectively. -## Enable Monero emission +## Enable Monero emission -Obtaining current Monero emission amount is not straight forward. Thus, by default it is -disabled. To enable it use `--enable-emission-monitor` flag, e.g., +Obtaining current Monero emission amount is not straight forward. Thus, by default it is +disabled. To enable it use `--enable-emission-monitor` flag, e.g., ```bash -xmrblocks --enable-emission-monitor +xmrblocks --enable-emission-monitor ``` This flag will enable emission monitoring thread. When started, the thread will initially scan the entire blockchain, and calculate the cumulative emission based on each block. -Since it is a separate thread, the explorer will work as usual during this time. -Every 10000 blocks, the thread will save current emission in a file, by default, - in `~/.bitmonero/lmdb/emission_amount.txt`. For testnet or stagenet networks, +Since it is a separate thread, the explorer will work as usual during this time. +Every 10000 blocks, the thread will save current emission in a file, by default, + in `~/.bitmonero/lmdb/emission_amount.txt`. For testnet or stagenet networks, it is `~/.bitmonero/testnet/lmdb/emission_amount.txt` or `~/.bitmonero/stagenet/lmdb/emission_amount.txt`. This file is used so that we don't - need to rescan entire blockchain whenever the explorer is restarted. When the + need to rescan entire blockchain whenever the explorer is restarted. When the explorer restarts, the thread will first check if `~/.bitmonero/lmdb/emission_amount.txt` is present, read its values, and continue from there if possible. Subsequently, only the initial use of the tread is time consuming. Once the thread scans the entire blockchain, it updates the emission amount using new blocks as they come. Since the explorer writes this file, there can - be only one instance of it running for mainnet, testnet and stagenet. Thus, for example, you cant have + be only one instance of it running for mainnet, testnet and stagenet. Thus, for example, you cant have two explorers for mainnet running at the same time, as they will be trying to write and read the same file at the same time, leading to unexpected results. Off course having one instance for mainnet and one instance for testnet is fine, as they write to different files. - - When the emission monitor is enabled, information about current emission of coinbase and fees is + + When the emission monitor is enabled, information about current emission of coinbase and fees is displayed on the front page, e.g., : - + ``` Monero emission (fees) is 14485540.430 (52545.373) as of 1313448 block ``` -The values given, can be checked using Monero daemon's `print_coinbase_tx_sum` command. +The values given, can be checked using Monero daemon's `print_coinbase_tx_sum` command. For example, for the above example: `print_coinbase_tx_sum 0 1313449`. - -To disable the monitor, simply restart the explorer without `--enable-emission-monitor` flag. + +To disable the monitor, simply restart the explorer without `--enable-emission-monitor` flag. ## Enable JavaScript for decoding proving transactions -By default, decoding and proving tx's outputs are done on the server side. To do this on the client side +By default, decoding and proving tx's outputs are done on the server side. To do this on the client side (private view and tx keys are not send to the server) JavaScript-based decoding can be enabled: ``` xmrblocks --enable-js ``` - + ## Enable SSL (https) -By default, the explorer does not use ssl. But it has such a functionality. +By default, the explorer does not use ssl. But it has such a functionality. As an example, you can generate your own ssl certificates as follows: @@ -299,12 +299,12 @@ openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt Having the `crt` and `key` files, run `xmrblocks` in the following way: ```bash -./xmrblocks --ssl-crt-file=/tmp/server.crt --ssl-key-file=/tmp/server.key +./xmrblocks --ssl-crt-file=/tmp/server.crt --ssl-key-file=/tmp/server.key ``` Note: Because we generated our own certificate, modern browsers will complain about it as they cant verify the signatures against any third party. So probably -for any practical use need to have properly issued ssl certificates. +for any practical use need to have properly issued ssl certificates. ## JSON API @@ -573,7 +573,7 @@ Partial results shown: For `txprove=0` we check which outputs belong to given address and corresponding viewkey. For `txprove=1` we use to prove to the recipient that we sent them founds. For this, we use recipient's address and our tx private key as a viewkey value, - i.e., `viewkey=` + i.e., `viewkey=` Checking outputs: @@ -611,10 +611,10 @@ curl -w "\n" -X GET "http://127.0.0.1:8081/api/outputs?txhash=17049bc5f2d9fbca1 Proving transfer: We use recipient's address (i.e. not our address from which we sent xmr to recipient). -For the viewkey, we use `tx_private_key` (although the GET variable is still called `viewkey`) that we obtained by sending this txs. +For the viewkey, we use `tx_private_key` (although the GET variable is still called `viewkey`) that we obtained by sending this txs. ```bash -# this is for testnet transaction +# this is for testnet transaction curl -w "\n" -X GET "http://127.0.0.1:8082/api/outputs?txhash=94782a8c0aa8d8768afa0c040ef0544b63eb5148ca971a024ac402cad313d3b3&address=9wUf8UcPUtb2huK7RphBw5PFCyKosKxqtGxbcKBDnzTCPrdNfJjLjtuht87zhTgsffCB21qmjxjj18Pw7cBnRctcKHrUB7N&viewkey=e94b5bfc599d2f741d6f07e3ab2a83f915e96fb374dfb2cd3dbe730e34ecb40b&txprove=1" ``` @@ -682,7 +682,7 @@ curl -w "\n" -X GET "http://127.0.0.1:8081/api/networkinfo" #### api/outputsblocks -Search for our outputs in last few blocks (up to 5 blocks), using provided address and viewkey. +Search for our outputs in last few blocks (up to 5 blocks), using provided address and viewkey. ```bash @@ -763,7 +763,7 @@ curl -w "\n" -X GET "http://127.0.0.1:8081/api/version" ```json { "data": { - "api": 65536, + "api": 65536, "blockchain_height": 1357031, "git_branch_name": "update_to_current_monero", "last_git_commit_date": "2017-07-25", @@ -774,7 +774,7 @@ curl -w "\n" -X GET "http://127.0.0.1:8081/api/version" } ``` -api number is store as `uint32_t`. In this case `65536` represents +api number is store as `uint32_t`. In this case `65536` represents major version 1 and minor version 0. In JavaScript to get these numbers, one can do as follows: @@ -812,4 +812,3 @@ finished and may not work as intended. ## How can you help? Constructive criticism, code and website edits are always good. They can be made through github. -