Compare commits

...

9 Commits
master ... aeon

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set(PROJECT_NAME set(PROJECT_NAME
xmrblocks) aeonblocks)
project(${PROJECT_NAME}) project(${PROJECT_NAME})
@ -15,13 +15,13 @@ if (WIN32)
endif() endif()
if (NOT MONERO_DIR) if (NOT AEON_DIR)
set(MONERO_DIR ~/monero) set(AEON_DIR ~/aeon)
endif() endif()
message(STATUS MONERO_DIR ": ${MONERO_DIR}") message(STATUS AEON_DIR ": ${AEON_DIR}")
set(MONERO_SOURCE_DIR ${MONERO_DIR} set(MONERO_SOURCE_DIR ${AEON_DIR}
CACHE PATH "Path to the root directory for Monero") CACHE PATH "Path to the root directory for Monero")
# set location of monero build tree # set location of monero build tree
@ -119,6 +119,7 @@ set(LIBRARIES
checkpoints checkpoints
version version
epee epee
sodium
${Boost_LIBRARIES} ${Boost_LIBRARIES}
pthread pthread
unbound unbound

@ -1,102 +1,25 @@
# Onion Monero Blockchain Explorer # Onion Aeon Blockchain Explorer
Currently available Monero blockchain explorers have several limitations which are of The Onion Monero Blockchain Explorer was ported to Aeon. The port was
special importance to privacy-oriented users: conducted by [stoffu](https://github.com/moneroexamples/onion-monero-blockchain-explorer/pull/118).
- they use JavaScript,
- have images which might be used for [cookieless tracking](http://lucb1e.com/rp/cookielesscookies/),
- track users activates through google analytics,
- are closed sourced,
- are not available as hidden services,
- do not support Monero testnet nor stagenet networks,
- have limited JSON API.
## Addresses
In this example, these limitations are addressed by development of Mainnet
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 - [https://aeonblocks.com/](https://aeonblocks.com/)
- [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
## Explorer hosts
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:
- [http://172.104.45.209:8081/](http://172.104.45.209:8081/) - devel version, javascript enabled.
- [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.
- [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.
i2p users (main Monero network):
- [http://7o4gezpkye6ekibhgpkg7v626ze4idsirapufzrefkdysa6zxhha.b32.i2p/](http://7o4gezpkye6ekibhgpkg7v626ze4idsirapufzrefkdysa6zxhha.b32.i2p/)
Alternative block explorers: Alternative block explorers:
- [http://moneroblocks.info](http://moneroblocks.info/) - [https://chainradar.com/aeon/blocks](https://chainradar.com/aeon/blocks)
- [https://monerobase.com](https://monerobase.com/)
- [https://monerovision.com](https://monerovision.com)
- [http://chainradar.com](http://chainradar.com/xmr/blocks)
## Onion Monero Blockchain Explorer features
The key features of the Onion Monero Blockchain Explorer are:
- no cookies, no web analytics trackers, no images,
- by default no JavaScript, but can be enabled for client side decoding and proving transactions,
- open sourced,
- made fully in C++,
- showing encrypted payments ID,
- showing ring signatures,
- showing transaction extra field,
- showing public components of Monero addresses,
- decoding which outputs and mixins belong to the given Monero address and viewkey,
- can prove that you send Monero to someone,
- detailed information about ring members, such as, their age, timescale and their ring sizes,
- showing number of amount output indices,
- support Monero testnet and stagnet networks,
- tx checker and pusher for online pushing of transactions,
- estimate possible spendings based on address and viewkey,
- can provide total amount of all miner fees,
- decoding encrypted payment id,
- decoding outputs and proving txs sent to sub-address.
## Development branch
Current development branch:
- https://github.com/moneroexamples/onion-monero-blockchain-explorer/tree/devel
## Compilation on Ubuntu 16.04/18.04 ## Compilation on Ubuntu 16.04
##### Compile latest Monero development version ##### Compile latest Aeon development version
Download and compile recent Monero into your home folder: Download and compile recent Aeon into your home folder:
```bash ```bash
# first install monero dependecines # first install monero dependecines
@ -112,7 +35,7 @@ git clone --recursive https://github.com/monero-project/monero
cd monero/ cd monero/
# checkout last monero version # checkout last monero version
git checkout -b last_release v0.12.1.0 git checkout -b last_release v0.12.0.0
make make
``` ```

@ -166,10 +166,10 @@ main(int ac, const char* av[])
string deamon_url {*deamon_url_opt}; string deamon_url {*deamon_url_opt};
if (testnet && deamon_url == "http:://127.0.0.1:18081") if (testnet && deamon_url == "http:://127.0.0.1:11181")
deamon_url = "http:://127.0.0.1:28081"; deamon_url = "http:://127.0.0.1:21181";
if (stagenet && deamon_url == "http:://127.0.0.1:18081") if (stagenet && deamon_url == "http:://127.0.0.1:11181")
deamon_url = "http:://127.0.0.1:38081"; deamon_url = "http:://127.0.0.1:31181";
uint64_t mempool_info_timeout {5000}; uint64_t mempool_info_timeout {5000};
@ -323,7 +323,7 @@ main(int ac, const char* av[])
|| post_body.count("viewkey") == 0 || post_body.count("viewkey") == 0
|| post_body.count("tx_hash") == 0) || post_body.count("tx_hash") == 0)
{ {
return string("xmr address, viewkey or tx hash not provided"); return string("AEON address, viewkey or tx hash not provided");
} }
string tx_hash = remove_bad_chars(post_body["tx_hash"]); string tx_hash = remove_bad_chars(post_body["tx_hash"]);
@ -365,7 +365,7 @@ main(int ac, const char* av[])
|| post_body.count("txprvkey") == 0 || post_body.count("txprvkey") == 0
|| post_body.count("txhash") == 0) || post_body.count("txhash") == 0)
{ {
return string("xmr address, tx private key or " return string("AEON address, tx private key or "
"tx hash not provided"); "tx hash not provided");
} }

@ -69,7 +69,7 @@ namespace xmreg
"path to crt file for ssl (https) functionality") "path to crt file for ssl (https) functionality")
("ssl-key-file", value<string>(), ("ssl-key-file", value<string>(),
"path to key file for ssl (https) functionality") "path to key file for ssl (https) functionality")
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:18081"), ("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:11181"),
"Monero deamon url"); "Monero deamon url");

@ -303,7 +303,7 @@ cryptonote::network_type CurrentBlockchainStatus::nettype {cryptonote::network_t
string CurrentBlockchainStatus::output_file {"emission_amount.txt"}; string CurrentBlockchainStatus::output_file {"emission_amount.txt"};
string CurrentBlockchainStatus::deamon_url {"http:://127.0.0.1:18081"}; string CurrentBlockchainStatus::deamon_url {"http:://127.0.0.1:11181"};
uint64_t CurrentBlockchainStatus::blockchain_chunk_size {10000}; uint64_t CurrentBlockchainStatus::blockchain_chunk_size {10000};

@ -317,7 +317,7 @@ MempoolStatus::is_thread_running()
} }
bf::path MempoolStatus::blockchain_path {"/home/mwo/.bitmonero/lmdb"}; bf::path MempoolStatus::blockchain_path {"/home/mwo/.bitmonero/lmdb"};
string MempoolStatus::deamon_url {"http:://127.0.0.1:18081"}; string MempoolStatus::deamon_url {"http:://127.0.0.1:11181"};
cryptonote::network_type MempoolStatus::nettype {cryptonote::network_type::MAINNET}; cryptonote::network_type MempoolStatus::nettype {cryptonote::network_type::MAINNET};
atomic<bool> MempoolStatus::is_running {false}; atomic<bool> MempoolStatus::is_running {false};
boost::thread MempoolStatus::m_thread; boost::thread MempoolStatus::m_thread;

@ -1578,7 +1578,7 @@ public:
if (!xmreg::parse_str_address(xmr_address_str, address_info, nettype)) if (!xmreg::parse_str_address(xmr_address_str, address_info, nettype))
{ {
cerr << "Cant parse string address: " << xmr_address_str << endl; cerr << "Cant parse string address: " << xmr_address_str << endl;
return string("Cant parse xmr address: " + xmr_address_str); return string("Cant parse AEON address: " + xmr_address_str);
} }
// parse string representing given private key // parse string representing given private key

@ -81,7 +81,7 @@ class rpccalls
public: public:
rpccalls(string _deamon_url = "http:://127.0.0.1:18081", rpccalls(string _deamon_url = "http:://127.0.0.1:11181",
uint64_t _timeout = 200000); uint64_t _timeout = 200000);
bool bool

@ -28,7 +28,7 @@
<H4 style="margin:5px"> <H4 style="margin:5px">
Transactions:<br/> Sorry, its not possible to find txs associated with Transactions:<br/> Sorry, its not possible to find txs associated with
normal addresses in Monero normal addresses in Aeon
</H4> </H4>
<br/> <br/>

@ -15,7 +15,7 @@
<h4>Output keys for address: {{address}}</h4> <h4>Output keys for address: {{address}}</h4>
<h4>Viewkey: {{viewkey}}</h4> <h4>Viewkey: {{viewkey}}</h4>
{{#has_total_xmr}} {{#has_total_xmr}}
<h4>Total xmr: {{total_xmr}}</h4> <h4>Total AEON: {{total_xmr}}</h4>
{{/has_total_xmr}} {{/has_total_xmr}}
<div class="center"> <div class="center">

@ -1,8 +1,8 @@
<div class="center"> <div class="center">
<h6 style="margin-top:10px"> <h6 style="margin-top:10px">
<a href="https://github.com/moneroexamples/onion-monero-blockchain-explorer">source code</a> <a href="https://github.com/moneroexamples/onion-monero-blockchain-explorer/tree/aeon">source code</a>
| explorer version (api): {{git_branch_name}}-{{last_git_commit_date}}-{{last_git_commit_hash}} ({{api}}) | explorer version (api): {{git_branch_name}}-{{last_git_commit_date}}-{{last_git_commit_hash}} ({{api}})
| monero version: {{monero_version_full}} | Aeon version: {{monero_version_full}}
</h6> </h6>
</div> </div>
</body> </body>

@ -6,7 +6,7 @@
{{#refresh}} {{#refresh}}
<meta http-equiv="refresh" content="10"> <meta http-equiv="refresh" content="10">
{{/refresh}} {{/refresh}}
<title>Onion Monero Blockchain Explorer</title> <title>Onion Aeon Blockchain Explorer</title>
<!--<link rel="stylesheet" type="text/css" href="/css/style.css">--> <!--<link rel="stylesheet" type="text/css" href="/css/style.css">-->
<style type="text/css"> <style type="text/css">
{{#css_styles}}{{/css_styles}} {{#css_styles}}{{/css_styles}}
@ -19,7 +19,7 @@
<div> <div>
<div class="center"> <div class="center">
<h1 class="center"><a href="/">Onion Monero Blockchain Explorer</a></h1> <h1 class="center"><a href="/">Onion Aeon Blockchain Explorer</a></h1>
<h4 style="font-size: 15px; margin: 0px">({{^enable_js}}no javascript - {{/enable_js}}no cookies - no web analytics trackers - no images - open sourced)</h4> <h4 style="font-size: 15px; margin: 0px">({{^enable_js}}no javascript - {{/enable_js}}no cookies - no web analytics trackers - no images - open sourced)</h4>
</div> </div>

@ -55,7 +55,7 @@
{{#emission}} {{#emission}}
<h3 style="font-size: 12px; margin-top: 2px"> <h3 style="font-size: 12px; margin-top: 2px">
Monero emission (fees) is {{amount}} ({{fee_amount}}) as of {{blk_no}} block Aeon emission (fees) is {{amount}} ({{fee_amount}}) as of {{blk_no}} block
</h3> </h3>
{{/emission}} {{/emission}}

@ -4,19 +4,19 @@ var config = {
coinUnitPlaces: 12, coinUnitPlaces: 12,
txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero
coinSymbol: 'XMR', coinSymbol: 'AEON',
openAliasPrefix: "xmr", openAliasPrefix: "aeon",
coinName: 'Monero', coinName: 'Aeon',
coinUriPrefix: 'monero:', coinUriPrefix: 'aeon:',
addressPrefix: 18, addressPrefix: 0xB2,
integratedAddressPrefix: 19, integratedAddressPrefix: 0x2733,
subAddressPrefix: 42, subAddressPrefix: 0x06B8,
addressPrefixTestnet: 53, addressPrefixTestnet: 0x0426,
integratedAddressPrefixTestnet: 54, integratedAddressPrefixTestnet: 0x2C27,
subAddressPrefixTestnet: 63, subAddressPrefixTestnet: 0x0AAC,
addressPrefixStagenet: 24, addressPrefixStagenet: 0x011A,
integratedAddressPrefixStagenet: 25, integratedAddressPrefixStagenet: 0x2C1B,
subAddressPrefixStagenet: 36, subAddressPrefixStagenet: 0x0B20,
feePerKB: new JSBigInt('2000000000'),//20^10 - for testnet its not used, as fee is dynamic. feePerKB: new JSBigInt('2000000000'),//20^10 - for testnet its not used, as fee is dynamic.
dustThreshold: new JSBigInt('1000000000'),//10^10 used for choosing outputs/change - we decompose all the way down if the receiver wants now regardless of threshold dustThreshold: new JSBigInt('1000000000'),//10^10 used for choosing outputs/change - we decompose all the way down if the receiver wants now regardless of threshold
txChargeRatio: 0.5, txChargeRatio: 0.5,

@ -69,7 +69,7 @@
</table> </table>
<h3> <h3>
Sum XMR from matched outputs (i.e., incoming XMR): Sum AEON from matched outputs (i.e., incoming AEON):
{{#found_our_outputs}} {{#found_our_outputs}}
{{sum_xmr}} {{sum_xmr}}
{{/found_our_outputs}} {{/found_our_outputs}}
@ -142,7 +142,7 @@
</div> </div>
<h3> <h3>
Sum XMR from matched and marked by * ring member's outputs: {{sum_mixin_xmr}} Sum AEON from matched and marked by * ring member's outputs: {{sum_mixin_xmr}}
<br/> <br/>
<span style="font-size: 16px"> Possible spending is: <span style="font-size: 16px"> Possible spending is:
{{possible_spending}} (tx fee included) {{possible_spending}} (tx fee included)

@ -56,7 +56,7 @@
</table> </table>
<h3>{{outputs_no}} output(s) for total of {{outputs_xmr_sum}} xmr</h3> <h3>{{outputs_no}} output(s) for total of {{outputs_xmr_sum}} AEON</h3>
<div class="center"> <div class="center">
<table class="center"> <table class="center">
<tr> <tr>
@ -82,7 +82,7 @@
<input type="radio" id="tab-1" name="tab-group-1" checked> <input type="radio" id="tab-1" name="tab-group-1" checked>
<label for="tab-1">Decode outputs</label> <label for="tab-1">Decode outputs</label>
<div class="content"> <div class="content">
<h4 style="margin: 0px">Check which outputs belong to given Monero address/subaddress and viewkey</h4> <h4 style="margin: 0px">Check which outputs belong to given Aeon address/subaddress and viewkey</h4>
<h5 style="margin: 0px"> <h5 style="margin: 0px">
For RingCT transactions, outputs' amounts are also decoded For RingCT transactions, outputs' amounts are also decoded
<br/> <br/>
@ -95,7 +95,7 @@
</h5> </h5>
<form action="/myoutputs" method="post" style="width:100%; margin-top:2px" class="style-1"> <form action="/myoutputs" method="post" style="width:100%; margin-top:2px" class="style-1">
<input type="hidden" name="tx_hash" value="{{tx_hash}}"><br/> <input type="hidden" name="tx_hash" value="{{tx_hash}}"><br/>
<input type="text" name="xmr_address" size="110" placeholder="Monero address/subaddress"><br/> <input type="text" name="xmr_address" size="110" placeholder="Aeon address/subaddress"><br/>
<input type="text" name="viewkey" size="110" placeholder="Private viewkey" style="margin-top:5px"><br/> <input type="text" name="viewkey" size="110" placeholder="Private viewkey" style="margin-top:5px"><br/>
<input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}"> <input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher--> <!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
@ -117,10 +117,10 @@
<label for="tab-2">Prove sending</label> <label for="tab-2">Prove sending</label>
<div class="content"> <div class="content">
<h4 style="margin: 0px">Prove to someone that you have sent them Monero in this transaction</h4> <h4 style="margin: 0px">Prove to someone that you have sent them Aeon in this transaction</h4>
<h5 style="margin: 0px"> <h5 style="margin: 0px">
Tx private key can be obtained using <i>get_tx_key</i> Tx private key can be obtained using <i>get_tx_key</i>
command in <i>monero-wallet-cli</i> command line tool command in <i>aeon-wallet-cli</i> command line tool
<br/> <br/>
{{#enable_js}} {{#enable_js}}
Note: address/subaddress and tx private key are NOT sent to the server, as the calculations are done on the client side Note: address/subaddress and tx private key are NOT sent to the server, as the calculations are done on the client side
@ -134,7 +134,7 @@
<input type="text" name="txprvkey" size="120" placeholder="Tx private key"><br/> <input type="text" name="txprvkey" size="120" placeholder="Tx private key"><br/>
<input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}"> <input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher--> <!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
<input type="text" name="xmraddress" size="120" placeholder="Recipient's monero address/subaddress" style="margin-top:5px"><br/> <input type="text" name="xmraddress" size="120" placeholder="Recipient's Aeon address/subaddress" style="margin-top:5px"><br/>
{{#enable_js}} {{#enable_js}}
<!-- if have js, DONOT submit the form to server. <!-- if have js, DONOT submit the form to server.
@ -356,7 +356,7 @@
decoding_results_str += "</table>"; decoding_results_str += "</table>";
decoding_results_str += "<h3>Sum XMR from matched outputs (i.e., incoming XMR): " + (sum_outptus / 1e12) + "</h3>" decoding_results_str += "<h3>Sum AEON from matched outputs (i.e., incoming AEON): " + (sum_outptus / 1e12) + "</h3>"
// decrypt payment_id8 which results in using // decrypt payment_id8 which results in using
@ -397,14 +397,14 @@
{{/enable_mixins_details}} {{/enable_mixins_details}}
{{^inputs_xmr_sum_not_zero}} {{^inputs_xmr_sum_not_zero}}
<h3>{{inputs_no}} input(s) for total of {{inputs_xmr_sum}} xmr</h3> <h3>{{inputs_no}} input(s) for total of {{inputs_xmr_sum}} AEON</h3>
{{/inputs_xmr_sum_not_zero}} {{/inputs_xmr_sum_not_zero}}
{{#inputs_xmr_sum_not_zero}} {{#inputs_xmr_sum_not_zero}}
{{^have_any_unknown_amount}} {{^have_any_unknown_amount}}
<h3>{{inputs_no}} inputs(s) for total of {{inputs_xmr_sum}} xmr</h3> <h3>{{inputs_no}} inputs(s) for total of {{inputs_xmr_sum}} AEON</h3>
{{/have_any_unknown_amount}} {{/have_any_unknown_amount}}
{{#have_any_unknown_amount}} {{#have_any_unknown_amount}}
<h3>{{inputs_no}} inputs(s) for total of at least {{inputs_xmr_sum}} xmr</h3> <h3>{{inputs_no}} inputs(s) for total of at least {{inputs_xmr_sum}} AEON</h3>
{{/have_any_unknown_amount}} {{/have_any_unknown_amount}}
{{/inputs_xmr_sum_not_zero}} {{/inputs_xmr_sum_not_zero}}

Loading…
Cancel
Save