Compare commits

...

10 Commits

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.0.2)
set(PROJECT_NAME
xmrblocks)
@ -14,7 +14,7 @@ endif()
if (NOT MONERO_DIR)
set(MONERO_DIR ~/monero)
set(MONERO_DIR ~/wownero)
endif()
message(STATUS MONERO_DIR ": ${MONERO_DIR}")

@ -5,7 +5,7 @@ special importance to privacy-oriented users:
- they use JavaScript,
- have images which might be used for [cookieless tracking](http://lucb1e.com/rp/cookielesscookies/),
- track users activates through google analytics,
- track users activities through google analytics,
- are closed sourced,
- are not available as hidden services,
- do not support Monero testnet nor stagenet networks,
@ -38,8 +38,6 @@ Testnet version:
Stagenet version:
- [https://stagenet.xmrchain.net/](https://stagenet.xmrchain.net/)
- [https://monero-stagenet.exan.tech/](https://monero-stagenet.exan.tech/)
- [http://162.210.173.150:8083/](http://162.210.173.150:8083/)
- [https://community.xmr.to/explorer/stagenet/](https://community.xmr.to/explorer/stagenet/)
i2p users (main Monero network):
@ -48,7 +46,7 @@ i2p users (main Monero network):
Alternative block explorers:
- [http://moneroblocks.info](http://moneroblocks.info/)
- [https://localmonero.co/blocks](https://localmonero.co/blocks)
- [https://monerovision.com](https://monerovision.com)
@ -65,7 +63,7 @@ The key features of the Onion Monero Blockchain Explorer are:
- 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,
- detailed information about ring members, such as their age, timescale, and ring sizes,
- showing number of amount output indices,
- support Monero testnet and stagnet networks,
- tx checker and pusher for online pushing of transactions,
@ -131,7 +129,7 @@ You can use `-b` option if its in different location.
For example:
```bash
./xmrblocks -b /home/mwo/non-defult-monero-location/lmdb/
./xmrblocks -b /home/mwo/non-default-monero-location/lmdb/
```
Example output:
@ -233,7 +231,7 @@ Every 10000 blocks, the thread will save current emission in a file, by default,
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 can't 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
@ -271,7 +269,7 @@ Having the `crt` and `key` files, run `xmrblocks` in the following way:
```
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
about it as they can't verify the signatures against any third party. So probably
for any practical use need to have properly issued ssl certificates.
## JSON API
@ -296,8 +294,8 @@ Partial results shown:
"data": {
"block_height": 1268252,
"coinbase": false,
"confirmations": 1,
"current_height": 1268253,
"confirmations": 1057855,
"current_height": 2326107,
"extra": "01be23e277aed6b5f41f66b05244bf994c13108347366ec678ae16657f0fc3a22b",
"inputs": [
{
@ -306,11 +304,13 @@ Partial results shown:
"mixins": [
{
"block_no": 1238623,
"public_key": "0a5b853c55303c10e1326acfb085b9e246e088b1ccac7e37f7a810d46a28a914"
"public_key": "0a5b853c55303c10e1326acfb085b9e246e088b1ccac7e37f7a810d46a28a914",
"tx_hash": "686555fb053dd53f6f9eb79449e2bdcd377221f823f508158d70d4a1966fe955"
},
{
"block_no": 1246942,
"public_key": "527cf86f5abbfb006c970f7c6eb40493786d4751306f8985c6a43f98a88c0dff"
"public_key": "527cf86f5abbfb006c970f7c6eb40493786d4751306f8985c6a43f98a88c0dff",
"tx_hash": "4fa1999f9e0d2ad031dbe5594f2e8336651b6cad19dd3cee7980a01c47600f91"
}
]
}
@ -340,6 +340,7 @@ Partial results shown:
},
"status": "success"
}
```
#### api/transactions

@ -45,7 +45,7 @@ foreach (l ${LIBS})
find_library(Xmr_${L}_LIBRARY
NAMES ${l}
PATHS ${CMAKE_LIBRARY_PATH}
PATH_SUFFIXES "/src/${l}" "/src/" "/external/db_drivers/lib${l}" "/lib" "/src/crypto" "/src/crypto/wallet" "/contrib/epee/src" "/external/easylogging++/" "/external/${l}" "external/miniupnp/miniupnpc"
PATH_SUFFIXES "/src/${l}" "/src/" "/external/db_drivers/lib${l}" "/lib" "/src/crypto" "/src/crypto/wallet" "/contrib/epee/src" "/external/easylogging++/" "/external/${l}" "external/miniupnp/miniupnpc" "/external/RandomWOW"
NO_DEFAULT_PATH
)
@ -76,7 +76,7 @@ include_directories(
${MONERO_SOURCE_DIR}/src/crypto
${MONERO_SOURCE_DIR}/src/crypto/wallet
${MONERO_SOURCE_DIR}/external
${MONERO_SOURCE_DIR}/external/randomx/src
${MONERO_SOURCE_DIR}/external/RandomWOW/src
${MONERO_SOURCE_DIR}/build
${MONERO_SOURCE_DIR}/external/easylogging++
${MONERO_SOURCE_DIR}/contrib/epee/include

@ -1,4 +1,5 @@
# first build mstch template library
cmake_minimum_required(VERSION 3.0.2)
add_subdirectory("mstch")

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

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.0.2)
project(myxrm)

@ -18,7 +18,7 @@ namespace xmreg
p.add("txhash", -1);
options_description desc(
"xmrblocks, Onion Monero Blockchain Explorer");
"xmrblocks, Wownero Blockchain Explorer");
desc.add_options()
("help,h", value<bool>()->default_value(false)->implicit_value(true),
@ -44,7 +44,7 @@ namespace xmreg
("enable-autorefresh-option", value<bool>()->default_value(false)->implicit_value(true),
"enable users to have the index page on autorefresh")
("enable-emission-monitor", value<bool>()->default_value(false)->implicit_value(true),
"enable Monero total emission monitoring thread")
"enable Wownero total emission monitoring thread")
("port,p", value<string>()->default_value("8081"),
"default explorer port")
("bindaddr,x", value<string>()->default_value("0.0.0.0"),
@ -64,7 +64,7 @@ namespace xmreg
("concurrency,c", value<size_t>()->default_value(0),
"number of threads handling http queries. Default is 0 which means it is based you on the cpu")
("bc-path,b", value<string>(),
"path to lmdb folder of the blockchain, e.g., ~/.bitmonero/lmdb")
"path to lmdb folder of the blockchain, e.g., ~/.wownero/lmdb")
("ssl-crt-file", value<string>(),
"path to crt file for ssl (https) functionality")
("ssl-key-file", value<string>(),

@ -297,13 +297,13 @@ CurrentBlockchainStatus::is_thread_running()
return is_running;
}
bf::path CurrentBlockchainStatus::blockchain_path {"/home/mwo/.bitmonero/lmdb"};
bf::path CurrentBlockchainStatus::blockchain_path {"/home/mwo/.wownero/lmdb"};
cryptonote::network_type CurrentBlockchainStatus::nettype {cryptonote::network_type::MAINNET};
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:34568"};
uint64_t CurrentBlockchainStatus::blockchain_chunk_size {10000};

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

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.0.2)
project(mycrypto)

@ -76,7 +76,7 @@ extern __thread randomx_vm *rx_vm;
#define TMPL_MY_CHECKRAWOUTPUTKEYS TMPL_DIR "/checkrawoutputkeys.html"
#define ONIONEXPLORER_RPC_VERSION_MAJOR 1
#define ONIONEXPLORER_RPC_VERSION_MINOR 1
#define ONIONEXPLORER_RPC_VERSION_MINOR 2
#define MAKE_ONIONEXPLORER_RPC_VERSION(major,minor) (((major)<<16)|(minor))
#define ONIONEXPLORER_RPC_VERSION \
MAKE_ONIONEXPLORER_RPC_VERSION(ONIONEXPLORER_RPC_VERSION_MAJOR, ONIONEXPLORER_RPC_VERSION_MINOR)
@ -2103,7 +2103,7 @@ show_my_outputs(string tx_hash_str,
{"blk_height" , tx_blk_height_str},
{"tx_size" , fmt::format("{:0.4f}",
static_cast<double>(txd.size) / 1024.0)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.12f}", true)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.11f}", true)},
{"blk_timestamp" , blk_timestamp},
{"delta_time" , age.first},
{"outputs_no" , static_cast<uint64_t>(txd.output_pub_keys.size())},
@ -2663,7 +2663,7 @@ show_my_outputs(string tx_hash_str,
context["show_inputs"] = show_key_images;
context["inputs_no"] = static_cast<uint64_t>(inputs.size());
context["sum_mixin_xmr"] = xmreg::xmr_amount_to_str(
sum_mixin_xmr, "{:0.12f}", false);
sum_mixin_xmr, "{:0.11f}", false);
uint64_t possible_spending {0};
@ -2696,7 +2696,7 @@ show_my_outputs(string tx_hash_str,
}
context["possible_spending"] = xmreg::xmr_amount_to_str(
possible_spending, "{:0.12f}", false);
possible_spending, "{:0.11f}", false);
add_css_style(context);
@ -4501,10 +4501,41 @@ json_transaction(string tx_hash_str)
json& mixins = inputs.back()["mixins"];
for (const output_data_t& output_data: outputs)
// mixin counter
size_t count = 0;
for (const uint64_t& abs_offset: absolute_offsets)
{
// get basic information about mixn's output
cryptonote::output_data_t output_data = outputs.at(count++);
tx_out_index tx_out_idx;
try
{
// get pair pair<crypto::hash, uint64_t> where first is tx hash
// and second is local index of the output i in that tx
tx_out_idx = core_storage->get_db()
.get_output_tx_and_index(in_key.amount, abs_offset);
}
catch (const OUTPUT_DNE& e)
{
string out_msg = fmt::format(
"Output with amount {:d} and index {:d} does not exist!",
in_key.amount, abs_offset);
cerr << out_msg << '\n';
break;
}
string out_pub_key_str = pod_to_hex(output_data.pubkey);
mixins.push_back(json {
{"public_key" , pod_to_hex(output_data.pubkey)},
{"tx_hash" , pod_to_hex(tx_out_idx.first)},
{"block_no" , output_data.height},
});
}
@ -6060,9 +6091,9 @@ construct_tx_context(transaction tx, uint16_t with_ring_signatures = 0)
{"blk_height" , tx_blk_height_str},
{"tx_blk_height" , tx_blk_height},
{"tx_size" , fmt::format("{:0.4f}", tx_size)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.12f}", false)},
{"tx_fee" , xmreg::xmr_amount_to_str(txd.fee, "{:0.11f}", false)},
{"tx_fee_micro" , xmreg::xmr_amount_to_str(txd.fee*1e6, "{:0.4f}", false)},
{"payed_for_kB" , fmt::format("{:0.12f}", payed_for_kB)},
{"payed_for_kB" , fmt::format("{:0.11f}", payed_for_kB)},
{"tx_version" , static_cast<uint64_t>(txd.version)},
{"blk_timestamp" , blk_timestamp},
{"blk_timestamp_uint" , blk.timestamp},

@ -85,7 +85,7 @@ public:
using login_opt = boost::optional<epee::net_utils::http::login>;
rpccalls(string _deamon_url = "http:://127.0.0.1:18081",
rpccalls(string _deamon_url = "http:://127.0.0.1:34568",
login_opt _login = login_opt {},
uint64_t _timeout = 200000);

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

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

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

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

@ -0,0 +1,30 @@
var config = {
testnet: false, // this is adjusted page.h if needed. dont need to change manually
stagenet: false, // this is adjusted page.h if needed. dont need to change manually
coinUnitPlaces: 11,
txMinConfirms: 4, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero
coinSymbol: 'WOW',
openAliasPrefix: "wow",
coinName: 'Wownero',
coinUriPrefix: 'wownero:',
addressPrefix: 4146,
integratedAddressPrefix: 6810,
subAddressPrefix: 12208,
addressPrefixTestnet: 53,
integratedAddressPrefixTestnet: 54,
subAddressPrefixTestnet: 63,
addressPrefixStagenet: 24,
integratedAddressPrefixStagenet: 25,
subAddressPrefixStagenet: 36,
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
txChargeRatio: 0.5,
defaultMixin: 21, // minimum mixin for hardfork v9
txChargeAddress: '',
idleTimeout: 30,
idleWarningDuration: 20,
maxBlockNumber: 500000000,
avgBlockTime: 300,
debugMode: false
};

@ -69,7 +69,7 @@
</table>
<h3>
Sum XMR from matched outputs (i.e., incoming XMR):
Sum WOW from matched outputs (i.e., incoming WOW):
{{#found_our_outputs}}
{{sum_xmr}}
{{/found_our_outputs}}
@ -142,7 +142,7 @@
</div>
<h3>
Sum XMR from matched and marked by * ring member's outputs: {{sum_mixin_xmr}}
Sum WOW from matched and marked by * ring member's outputs: {{sum_mixin_xmr}}
<br/>
<span style="font-size: 16px"> Possible spending is:
{{possible_spending}} (tx fee included)
@ -155,7 +155,7 @@
<br/>
<span style="font-size: 14px">
Number of possible our mixins is {{no_all_possible_mixins}}
for {{all_possible_mixins_amount}} xmr
for {{all_possible_mixins_amount}} wow
(amount as uint64).
</span>
</h3>

@ -55,7 +55,7 @@
</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}} wow</h3>
<div class="center">
<table class="center">
<tr>
@ -81,7 +81,7 @@
<input type="radio" id="tab-1" name="tab-group-1" checked>
<label for="tab-1">Decode outputs</label>
<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 Wownero address/subaddress and viewkey</h4>
<h5 style="margin: 0px">
For RingCT transactions, outputs' amounts are also decoded
<br/>
@ -89,7 +89,7 @@
</h5>
<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="text" name="xmr_address" size="110" placeholder="Monero address/subaddress"><br/>
<input type="text" name="xmr_address" size="110" placeholder="Wownero address/subaddress"><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}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
@ -103,10 +103,10 @@
<label for="tab-2">Prove sending</label>
<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 Wownero in this transaction</h4>
<h5 style="margin: 0px">
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>wownero-wallet-cli</i> command line tool
<br/>
Note: address/subaddress and tx private key are sent to the server, as the calculations are done on the server side
</h5>
@ -140,14 +140,14 @@
{{/enable_mixins_details}}
{{^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}} wow</h3>
{{/inputs_xmr_sum_not_zero}}
{{#inputs_xmr_sum_not_zero}}
{{^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}} wow</h3>
{{/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}} wow</h3>
{{/have_any_unknown_amount}}
{{/inputs_xmr_sum_not_zero}}

@ -2,8 +2,8 @@
<H4>Block hash (height): {{blk_hash}} ({{blk_height}})</H4>
<h4>
Eight RandomX and correspoding assembly x86 programs used
to calcualte the PoW hash of the block.<br/>
Eight RandomX and corresponding assembly x86 programs used
to calculate the PoW hash of the block.<br/>
The RandomX programs are executed on RandomX virtual machine.
</h4>
<h5>

@ -9,12 +9,12 @@
<div class="center">
<form action="/checkandpush" method="post" style="width:100%; margin-top:15px" class="style-1">
Paste here either a hex string of raw transaction<br/>
(the <i>tx_blob</i> response in the wallet RPC, or the <i>raw_monero_tx</i>
(the <i>tx_blob</i> response in the wallet RPC, or the <i>raw_wownero_tx</i>
file saved by the wallet CLI with <i>--do-not-relay</i> option specified),<br/>
or base64 encoded, unsigned or signed transaction data<br/>
<br/>
(In Linux, can get the raw tx data: <i>cat raw_monero_tx | xclip -selection clipboard</i>)<br/>
(In Windows, can get the raw tx data: <i>certutil.exe -encode -f raw_monero_tx encoded.txt & type "encoded.txt" | clip</i>)<br/>
(In Linux, can get the raw tx data: <i>cat raw_wownero_tx | xclip -selection clipboard</i>)<br/>
(In Windows, can get the raw tx data: <i>certutil.exe -encode -f raw_wownero_tx encoded.txt & type "encoded.txt" | clip</i>)<br/>
<textarea name="rawtxdata" rows="20" cols="80"></textarea>
<br/>

@ -944,6 +944,14 @@ decode_ringct(rct::rctSig const& rv,
mask,
hw::get_device("default"));
break;
case rct::RCTTypeBulletproofPlus:
case rct::RCTTypeTriptych:
amount = rct::decodeRctSimple(rv,
rct::sk2rct(scalar1),
i,
mask,
hw::get_device("default"));
break;
case rct::RCTTypeFull:
amount = rct::decodeRct(rv,
rct::sk2rct(scalar1),

@ -8,7 +8,7 @@
#define PATH_SEPARARTOR '/'
#define XMR_AMOUNT(value) \
static_cast<double>(value) / 1e12
static_cast<double>(value) / 1e11
#define REMOVE_HASH_BRAKETS(a_hash) \
a_hash.substr(1, a_hash.size()-2)
@ -224,7 +224,7 @@ get_payment_id(const transaction& tx,
inline double
get_xmr(uint64_t core_amount)
{
return static_cast<double>(core_amount) / 1e12;
return static_cast<double>(core_amount) / 1e11;
}
array<size_t, 5>

Loading…
Cancel
Save