onion-wownero-blockchain-ex.../README.md

133 lines
4.4 KiB
Markdown
Raw Normal View History

2016-09-17 08:30:12 +00:00
# Onion Monero Prover
2016-05-07 09:32:28 +00:00
2016-09-17 08:30:12 +00:00
Currently, to prove to someone that you send them some monero, you can use this: [checktx](http://xmr.llcoins.net/checktx.html). Altought its useful, it is limited
in that it:
2016-05-07 09:32:28 +00:00
2016-09-17 08:30:12 +00:00
- uses JavaScript and
- not available as hidden services.
2016-05-07 09:32:28 +00:00
2016-05-09 01:40:16 +00:00
In this example, these limitations are addressed by development of
2016-09-17 08:30:12 +00:00
an Onion Monero Prover. The example not only shows how to use Monero C++ libraries, but also demonstrates how to use:
2016-05-09 01:40:16 +00:00
- [crow](https://github.com/ipkn/crow) - C++ micro web framework
- [lmdb++](https://github.com/bendiken/lmdbxx) - C++ wrapper for the LMDB
- [mstch](https://github.com/no1msd/mstch) - C++ {{mustache}} templates
- [rapidjson](https://github.com/miloyip/rapidjson) - C++ JSON parser/generator
2016-05-07 09:32:28 +00:00
2016-07-20 21:17:43 +00:00
## Address
2016-05-21 07:50:28 +00:00
Tor users:
2016-09-17 08:30:12 +00:00
- [ggggg](http://xmrblocksvckbwvx.onion)
2016-05-21 07:50:28 +00:00
2016-07-20 21:16:22 +00:00
Non tor users, can use its clearnet version (thanks to [Gingeropolous](https://github.com/Gingeropolous)):
2016-05-21 07:50:28 +00:00
2016-07-20 21:17:43 +00:00
- [http://explore.MoneroWorld.com](http://explore.moneroworld.com)
2016-05-21 07:50:28 +00:00
2016-05-08 08:45:51 +00:00
## Prerequisite
2016-05-07 09:32:28 +00:00
2016-05-09 09:51:25 +00:00
Everything here was done and tested using Monero 0.9.4 on Ubuntu 16.04 x86_64.
2016-05-07 09:32:28 +00:00
2016-05-08 08:45:51 +00:00
Instruction for Monero 0.9 compilation and Monero headers and libraries setup are
as shown here:
- [Compile Monero 0.9 on Ubuntu 16.04 x64](https://github.com/moneroexamples/compile-monero-09-on-ubuntu-16-04)
- [lmdbcpp-monero](https://github.com/moneroexamples/lmdbcpp-monero.git)
## C++ code
2016-05-07 09:32:28 +00:00
2016-05-08 08:45:51 +00:00
```c++
```
2016-05-08 09:46:01 +00:00
## Example screenshot
2016-05-08 09:56:26 +00:00
![Onion Monero Blockchain Explorer](https://raw.githubusercontent.com/moneroexamples/onion-monero-blockchain-explorer/master/screenshot/screenshot.jpg)
2016-05-08 09:46:01 +00:00
2016-05-28 01:53:11 +00:00
## Compile and run the explorer
2016-05-23 01:17:15 +00:00
2016-05-28 02:07:37 +00:00
##### Monero headers and libraries setup
2016-05-28 01:53:11 +00:00
The Onion Explorer uses Monero C++ libraries and headers. Also some functionality
in the Explorer for mempool is achieved through [patching](https://github.com/moneroexamples/compile-monero-09-on-ubuntu-16-04/blob/master/res/tx_blob_to_tx_info.patch)
the Monero deamon.
Instructions how to download Monero source files, apply a patch, compile Monero,
setup header and library files are presented here:
2016-05-28 01:55:54 +00:00
- https://github.com/moneroexamples/compile-monero-09-on-ubuntu-16-04 (Ubuntu 16.04)
- https://github.com/moneroexamples/compile-monero-09-on-arch-linux (Arch Linux)
2016-05-28 01:53:11 +00:00
2016-05-28 02:12:50 +00:00
##### Custom lmdb database (optional)
2016-05-28 01:53:11 +00:00
Most unique search abilities of the Onion Explorer are achieved through using
a [custom lmdb database](https://github.com/moneroexamples/lmdbcpp-monero.git) constructed based on the Monero blockchain.
The reason for the custom database is that Monero's own lmdb database has limited
search abilities. For example, its not possible to search for a tx having a
given key image, except by performing an exhaustive search on the blockchain which is very time consuming.
2016-05-28 01:53:11 +00:00
Instruction how to compile the `lmdbcpp-monero` are provided here:
2016-05-28 02:06:35 +00:00
2016-05-28 01:53:11 +00:00
- https://github.com/moneroexamples/lmdbcpp-monero.git
The custom database is rather big, 12GB now, and it must be running alongside Monero deamon
so that it keeps updating itself with new information from new blocks as they are added
to the blockchain.
For these reasons, its use is optional. However, without it, some searches wont be possible,
e.g., searching for key images, output and tx public keys, encrypted payments id.
2016-05-28 01:53:11 +00:00
2016-05-28 02:12:50 +00:00
##### Compile and run the explorer
2016-05-28 02:06:35 +00:00
Once the Monero is compiled and setup, the explorer can be downloaded and compiled
as follows:
2016-05-08 08:45:51 +00:00
```bash
# download the source code
2016-05-21 06:23:56 +00:00
git clone https://github.com/moneroexamples/onion-monero-blockchain-explorer.git
2016-05-08 08:45:51 +00:00
# enter the downloaded sourced code folder
cd onion-monero-blockchain-explorer
# create the makefile
cmake .
# compile
make
```
2016-05-28 02:06:35 +00:00
When compilation finishes executable `xmrblocks` should be created.
To run it:
```
./xmrblocks
```
Example output:
```bash
[mwo@arch onion-monero-blockchain-explorer]$ ./xmrblocks
2016-May-28 10:04:49.160280 Blockchain initialized. last block: 1056761, d0.h0.m12.s47 time ago, current difficulty: 1517857750
(2016-05-28 02:04:49) [INFO ] Crow/0.1 server is running, local port 8081
```
Go to your browser: http://127.0.0.1:8081
2016-05-08 08:45:51 +00:00
## Other examples
2016-05-23 01:17:15 +00:00
2016-05-08 08:45:51 +00:00
Other examples can be found on [github](https://github.com/moneroexamples?tab=repositories).
Please know that some of the examples/repositories are not
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.
Some Monero are also welcome:
```
48daf1rG3hE1Txapcsxh6WXNe9MLNKtu7W7tKTivtSoVLHErYzvdcpea2nSTgGkz66RFP4GKVAsTV14v6G3oddBTHfxP6tU
```