Compare commits

...

43 Commits

Author SHA1 Message Date
onryo 9e65f7fb87 Fix link 1 month ago
onryo d766a3b7f3 Update theme section 1 month ago
onryo eec3147065 Upload theme example 1 month ago
onryo 6e29c31138 Add theme example 1 month ago
onryo 06ccaa5196 Upload theme example 1 month ago
onryo 3563771018 Add theme support 1 month ago
onryo 202c8bddb8 support new ported code from explorer.hush.is/blocks 1 month ago
onryo 72e2aed53a Merge pull request 'moved Support & Social section lower in README and updated weblinks to Markdown format from HTML' (#13) from jah into master 1 month ago
jahway603 a73b8f7db1 moved Support & Social section lower in README and updated weblinks to Markdown format from HTML 1 month ago
onryo 3c01918f39 add easier instruction 1 month ago
onryo 42f1597440 Merge pull request 'Merge Nginx example config & 404 example page' (#11) from jah into master 1 month ago
jahway603 5eaadde848 merging master into this branch 1 month ago
onryo 61f51ccec1 support new ported code from explorer.hush.is/blocks 1 month ago
onryo dc057441e2 port block stats from explorer.hush.is 1 month ago
onryo fe132c94c6 clarify what OS we use 1 month ago
onryo 1b055f0d58 add favicon 2 months ago
onryo ee5567e89c Add Ubuntu Mono 2 months ago
onryo c0ae5661e4 Update 'bin/home_update.pl' 2 months ago
onryo 0733e0d83e Update 'bin/blocks_update.pl' 2 months ago
onryo 837abce0c0 Update 'run_siona.sh' 2 months ago
onryo a73ee5e724 Update 'README.md' 2 months ago
onryo 17af5be0d3 update readme 2 months ago
onryo 2531d37544 rm update 2 months ago
onryo f3a246ea7d mv files 2 months ago
onryo 695fea4442 add chmod and rename 2 months ago
onryo ee860ec6fb add chmod and rename 2 months ago
onryo ef00f26d6e Update 'README.md' 2 months ago
onryo 734e10d134 rm git folder for now 11 months ago
onryo eb722cd1d9 adding permissions with chmod 11 months ago
onryo d4cbcbe0b3 Update 'git/README.md' 11 months ago
onryo b63e3b585e Update 'README.md' 11 months ago
onryo 4d0b2dbf4c Add README.md 11 months ago
onryo e4f812b6a9 Less folders 11 months ago
onryo a634223fcf Update copyright 11 months ago
onryo 2ce3d02f14 Install Perl modules 11 months ago
jahway603 195ae6f5e2 added more to example nginx conf 1 year ago
jahway603 20cb100c55 added example nginx conf 1 year ago
jahway603 829c9cf699 Update 'README.md' 1 year ago
Jonathan "Duke" Leto e99317c4ab / 1 year ago
Jonathan "Duke" Leto 611fcee98e = 1 year ago
Jonathan "Duke" Leto eab3cac952 add 404 image to 404 page 1 year ago
Jonathan "Duke" Leto f0d3b41ca7 add 404 image 1 year ago
Jonathan "Duke" Leto d4df266485 auto-refreshing 404 page 1 year ago
  1. 59
      404.html
  2. 77
      README.md
  3. 0
      address/template.html
  4. 95
      addresses/hushis.html
  5. 2
      addresses/hushland.html
  6. 0
      api/anonset.json
  7. 0
      api/coinsupply.json
  8. 0
      api/getblockchain.json
  9. 0
      api/getchaintips.json
  10. 0
      api/getchaintxstats.json
  11. 0
      api/getinfo.json
  12. 0
      api/getmininginfo.json
  13. 0
      api/gettxoutsetinfo.json
  14. 0
      api/index.html
  15. 0
      api/snapshots/snapshot-old.json
  16. 0
      api/snapshots/snapshot.json
  17. 0
      bin/HOWTO
  18. 0
      bin/Makefile
  19. 0
      bin/backup/update_blocks_redis.pl
  20. 0
      bin/balances.pl
  21. 0
      bin/block-340k.json
  22. 116
      bin/blocks_update.pl
  23. 0
      bin/example.html
  24. 7
      bin/home_update.pl
  25. 0
      bin/nope/README
  26. 0
      bin/nope/update_addresses.pl
  27. 117
      block/hushis.html
  28. 2
      block/hushland.html
  29. 100
      blocks/hushis.html
  30. 3
      blocks/hushland.html
  31. 77
      example-nginx.conf
  32. BIN
      favicon.ico
  33. BIN
      fonts/UbuntuMono.ttf
  34. 1
      git/explorer.hush.land/yep
  35. 1
      git/hush3/yep
  36. 30
      hushis.html
  37. 16
      hushland.html
  38. BIN
      images/hush-404.png
  39. BIN
      images/hush2.png
  40. BIN
      images/hushis0.png
  41. BIN
      images/hushis1.png
  42. BIN
      images/hushis3.png
  43. BIN
      images/hushland0.png
  44. BIN
      images/hushland1.png
  45. BIN
      images/hushland2.png
  46. BIN
      images/hushland3.png
  47. 0
      index-1.html
  48. 0
      index.html
  49. 29
      run_siona.sh
  50. 87
      tx/hushis.html
  51. 0
      tx/hushland.html
  52. 15
      update.sh
  53. 0
      var/www/explorer.hush.land/PID
  54. 23
      var/www/explorer.hush.land/crons/README
  55. 19
      var/www/explorer.hush.land/update_api.sh
  56. 17
      var/www/explorer.hush.land/update_explorer_data.sh
  57. 12
      var/www/explorer.hush.land/var/www/explorer.hush.land/PID
  58. 1
      var/www/explorer.hush.land/var/www/explorer.hush.land/index-new.html
  59. 15
      var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

59
404.html

@ -0,0 +1,59 @@
<!doctype html>
<head>
<title>Hush Explorer => Oops! Not found</title>
</body>
<style>
body {
width: 87%;
margin: 5 auto;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
background: #111111;
color: #cccccc;
}
a:link { color: #888888; }
a:visited { color: #888888; }
a:hover { color: #554200; }
a:active { color: #550000; }
</style>
<meta http-equiv="refresh" content="120">
</head>
<body>
<center>
<br/>
<br/>
<a href="https://hush.is">Hush</a>
|
<a href="https://explorer.hush.is">Explorer</a>
|
<a href="https://git.hush.is/hush/">Git</a>
|
<a href="https://hush.is/tg">Telegram</a>
|
<a href="https://hush.is/telegram_support">Telegram Support</a>
|
<a href="https://hush.is/telegram_mining">Telegram Mining</a>
|
<a href="https://hush.is/reddit">Reddit</a>
|
<a href="https://hush.is/youtube">YouTube</a>
|
<a href="https://hush.is/bitcointalk">BitcoinTalk</a>
|
<a href="https://hush.is/mastodon">Mastodon</a>
|
<a href="https://hush.is/matrix">Matrix</a>
<br/>
<h1>HUSH Blockchain Explorer</h1>
<h2>Ooooops! We could not find that block or transaction. </h2>
<p>
This page will automatically refresh every 2 minutes to see if it comes into existence.</h2>
</p>
<img src="/hush-404.png">
</body>
</html>

77
README.md

@ -1,32 +1,79 @@
# Siona
This is Siona, a maximum privacy block explorer designed for chains which support zaddrs
and which runs <a href="https://explorer.hush.is">explorer.hush.is</a> and <a href="https://explorer.hush.land">explorer.hush.land</a>.
It is written in Perl 5 and generates static HTML with no Javascript and basic inline CSS for styling. It requires a Redis server
This is Siona, a maximum privacy block explorer designed for chains which support zaddrs. It is written in Perl 5 and generates static HTML with no Javascript and basic inline CSS for styling. It requires a Redis server
running on localhost, which is for caching and reduces disk i/o.
# Installing dependencies
Siona runs on the following private blockchains:
- [explorer.hush.is](https://explorer.hush.is)
- [explorer.hush.land](https://explorer.hush.land)
- [explorer.dragonx.is](https://explorer.dragonx.is)
Requires JSON::Any and Redis Perl modules and redis-server an Debian package.
# Install dependencies on Debian/Ubuntu
# Instructions
Install redis-server and cpan:
Assume you put `update.sh` in /home/$USER and your Hush source code in ~/git/hush3 , add this to your $USER crontab with `crontab -e` :
```
sudo apt-get install redis-server -y
sudo apt-get install libpath-tiny-perl -y
```
Install JSON::Any.pm and Redis.pm Perl modules:
```
# set env vars that Siona will use
SIONA_DOMAIN=explorer.some.poop
SIONA_ACNAME=GAZOOTZ
SIONA_CLI=~/git/hush3/src/hush-cli -ac_NAME=${SIONA_ACNAME}
yes | sudo cpan install JSON::Any.pm
yes | sudo cpan install Redis.pm
```
# Git clone
Move to the root directory of the Explorer, it must be empty.
# update explorer data every 5 minutes
*/5 * * * * ~/update.sh
```
cd /var/www/dragonx.hush.land
git clone https://git.hush.is/hush/siona.git .
```
# Choose theme
- hushland (https://explorer.hush.land)
- hushis (https://explorer.hush.is)
hushland index page | hushland blocks page | hushland block page | hushland tx page
:-------------------------:|:----------------------------:|:--------------------------:|:-------------------------:
![](images/hushland0.png) | ![](images/hushland1.png) | ![](images/hushland3.png) | ![](images/hushland3.png)
hushis index page | hushis blocks page | hushis block page | hushis tx page
![](images/hushis0.png) | ![](images/hushis1.png) | ![](images/hush2.png) | ![](images/hushis3.png)
# First time run and update
```
CLI=/home/hush/hush3/src/hush-cli THEME=hushland DIR=/var/www/dragonx.hush.land/api DOMAIN=dragonx.hush.is ARRAKIS=DRAGONX ./run_siona.sh
```
# Update Explorer every 5 minutes with cron
```
ARRAKIS=DRAGONX
DOMAIN=dragonx.hush.land
CLI=/root/hush3/src/hush-cli
DIR=/var/www/dragonx.hush.land/api
*/5 * * * * cd /var/www/$DOMAIN && ./run_siona.sh
```
# Support and Socials
* Matrix: [https://hush.is/matrix](https://hush.is/matrix)
* Telegram: [https://hush.is/tg](https://hush.is/tg)
* Twitter: [https://hush.is/twitter](https://hush.is/twitter)
* PeerTube [https://hush.is/peertube](https://hush.is/peertube)
# Copyright
2016-2022 The Hush Developers
2016-2024 The Hush Developers
# License

0
var/www/explorer.hush.land/var/www/explorer.hush.land/address/template.html → address/template.html

95
addresses/hushis.html

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html>
<head>
<title>Hush Explorer: Speak And Transact Freely</title>
<style>
body {
width: 95%;
margin: 5 auto;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
background: #111111;
color: #cccccc;
}
a:link { color: #888888; }
a:visited { color: #888888; }
a:hover { color: #554200; }
a:active { color: #550000; }
</style>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{ Fuck Blockchain Analysts }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ ^__^
\ (==)\_______
(__)\ )\/\
U ||----w |
|| ||
- Duke Leto and The Hush Developers
-->
</head>
<body>
<center>
<br/>
<br/>
<a href="https://hush.is">Hush</a> | <a href="https://explorer.hush.is">Explorer</a>
| <a href="https://hush.is/twitter">Twitter</a> | <a href="https://hush.is/tg">Telegram</a> |
<a href="https://hush.is/telegram_support">Telegram Support</a> | <a href="https://hush.is/telegram_mining">Telegram Mining</a>
| <a href="https://hush.is/reddit">Reddit</a> | <a href="https://hush.is/youtube">YouTube</a>
| <a href="https://hush.is/bitcointalk">BitcoinTalk</a> | <a href="https://hush.is/mastodon">Mastodon</a>
| <a href="https://hush.is/matrix">Matrix</a>
<br/>
<h1>HUSH Blockchain Explorer</h1>
<div id=navbar>
<a href="/blocks/">Blocks</a> |
<a href="/addresses/">Addresses</a>
</div>
<br/>
<div id=stats>
<table width="100%" border=1>
<tr>
<td align=center>
<table>
<tr><th>Height</th><td>#BLOCKS#</td></tr>
<tr><th>UTXOs</th><td>#UTXOS#</td></tr>
<tr><th>Total Transparent Addresses</th><td>#TOTAL_ADDRESSES#</td></tr>
<tr><th>Total Shielded Addresses</th><td><font color=red>?????</font></td></tr>
<tr><th>Total Transparent Funds</th><td>#TOTAL# HUSH</td></tr>
<tr><th>Avg HUSH per Taddr</th><td>#AVG# HUSH</td></tr>
</table>
</td>
</tr>
<tr>
<td align=center>
<font color=red>
NOTE: these addresses have NO PRIVACY! They really should move funds to a zaddr!
</font>
#ADDRESS_DATA#
</td>
</tr>
</table>
</div>
<br>
</center>
<font color=red>
<pre>
_____________________
< Extreme Privacy!!!! >
---------------------
\ ^__^
\ (oo)\_______
(__)\ HUSH )\/\
U ||----w |
|| ||
</pre>
</font>
</body>
</html>

2
var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html → addresses/hushland.html

@ -21,7 +21,7 @@ a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../UbuntuMono.ttf') format('truetype') }
@font-face { font-family: 'Ubuntu Mono'; src: url('../fonts/UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/anonset.json → api/anonset.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/coinsupply.json → api/coinsupply.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getblockchain.json → api/getblockchain.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintips.json → api/getchaintips.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintxstats.json → api/getchaintxstats.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getinfo.json → api/getinfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getmininginfo.json → api/getmininginfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/gettxoutsetinfo.json → api/gettxoutsetinfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/index.html → api/index.html

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot-old.json → api/snapshots/snapshot-old.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot.json → api/snapshots/snapshot.json

0
var/www/explorer.hush.land/bin/HOWTO → bin/HOWTO

0
var/www/explorer.hush.land/bin/Makefile → bin/Makefile

0
var/www/explorer.hush.land/bin/backup/update_blocks_redis.pl → bin/backup/update_blocks_redis.pl

0
var/www/explorer.hush.land/bin/balances.pl → bin/balances.pl

0
var/www/explorer.hush.land/bin/block-340k.json → bin/block-340k.json

116
var/www/explorer.hush.land/bin/update_blocks_redis.pl → bin/blocks_update.pl

@ -15,38 +15,55 @@ my $j = JSON::Any->new;
#sleep 10;
# While Siona swims, we pave with bricks on the road she will run on...
my $acname = $ENV{SIONA_ACNAME} || 'HUSH';
my $ticker = $acname eq 'HUSH3' ? 'HUSH' : $acname;
my $domain = $ENV{SIONA_DOMAIN} || 'explorer.hush.land';
my $root = "/var/www/$domain";
my $basedir = "/var/www/$domain/var/www/$domain";
my $dir = shift || "$basedir/api";
my $cli = $ENV{SIONA_CLI} || "/home/hush/git/hush3/src/hush-cli";
my $domain = $ENV{DOMAIN};
my $cli = $ENV{CLI};
my $arrakis = $ENV{ARRAKIS};
my $dir = $ENV{DIR};
my $theme = $ENV{THEME};
my $getinfo = readfile("$dir/getinfo.json");
my $mining = readfile("$dir/getmininginfo.json");
my $blocksdir = "$basedir/blocks";
my $template = readfile("$blocksdir/template.html");
my $template = readfile("/var/www/$domain/blocks/$theme.html");
my $blocksdir = "/var/www/$domain/blocks/";
if($getinfo =~ m/"blocks": (\d+)/){ $STATS->{BLOCKS} ||= $1; }
if($getinfo =~ m/"tls_connections": (\d+)/){ $STATS->{TLS_CONNECTIONS} ||= $1; }
if($getinfo =~ m/"connections": (\d+)/){ $STATS->{CONNECTIONS} ||= $1; }
if($getinfo =~ m/"protocolversion": (\d+)/){ $STATS->{PROTOCOLVERSION} ||= $1; }
my @symbols = qw/
TX_TABLE BLOCKS_TABLE TLS_CONNECTIONS CONNECTIONS PROTOCOLVERSION
TX_TABLE BLOCKS_TABLE TLS_CONNECTIONS CONNECTIONS PROTOCOLVERSION BLOCKS_STATS
/;
my @blocks = ();
my $height = $STATS->{BLOCKS} || 0;
$STATS->{BLOCKS_TABLE} = "";
$STATS->{TX_TABLE} = "";
$STATS->{BLOCKS_STATS} = "";
my $mineraddress = "";
for my $h ($height-80 .. $height) {
my $avg_block_duration = 0;
my @block_durations = ();
my %unique_miners = ();
my $total_txs = 0;
my $longest_blocktime = 0;
my $NUM_BLOCKS_TO_SHOW = 50;
sub anonset_delta {
my $height = shift;
my $delta = 0;
{
my $cmd = "$cli z_anonsetblockdelta $height";
warn $cmd;
$delta = qx/$cmd/;
}
return $delta;
}
for my $h ($height-50 .. $height) {
#for my $h (910265 .. 910270) {
#last if($h < 0);
my $thisminer = "";
# TODO: actually look at the block reward for this height via
# the tx data from the very first txid in this block
my $reward = $h > 340000 ? "3.125 $ticker" : "12.5 $ticker";
# TODO: fix this garbage
my $reward = $h > 340000 ? "3.125 HUSH" : "12.5 HUSH";
my $block = get_block($h);
#die Dumper $block;
my $time = $block->{time};
@ -54,13 +71,14 @@ for my $h ($height-80 .. $height) {
my @txs = @{ $block->{tx} };
my $numtx = @txs;
# TODO: look on filesystem first? redis cache?
my $hash = qx!$cli getblockhash $h!;
my $hash = qx!$cli -ac_name=$arrakis getblockhash $h!;
chomp $hash;
my $blockdir = "$root/var/www/$domain/block/$hash";
my $root = "/var/www/$domain";
my $blockdir = "$root/block/$hash";
if (!-e "$root/block/$h") {
# make /block/HEIGHT work
my $cmd = "ln -s $blockdir $root/var/www/$domain/block/$h";
my $cmd = "ln -s $blockdir $root/block/$h";
qx{$cmd};
warn $cmd;
}
@ -69,8 +87,8 @@ for my $h ($height-80 .. $height) {
my $cmd = "mkdir -p $blockdir";
qx{$cmd};
warn $cmd;
my $block_template_file = "$basedir/block/template.html";
my $new_block_file = "$blockdir/index.html";
my $block_template_file = "/var/www/$domain/block/$theme.html";
my $new_block_file = "/var/www/$domain/block/$hash/index.html";
# TODO: process template with block details
my $block_template = readfile($block_template_file);
$block_template =~ s/#BLOCKS#/$h/g;
@ -84,9 +102,8 @@ for my $h ($height-80 .. $height) {
$block_template =~ s/#CHAINWORK#/$block->{chainwork}/ge;
$block_template =~ s/#MERKLEROOT#/$block->{merkleroot}/ge;
$block_template =~ s/#FINALSAPLINGROOT#/$block->{finalsaplingroot}/ge;
# TODO: fix block reward
my $blockreward = "3.125 $ticker";
$block_template =~ s/#BLOCKREWARD#/$blockreward/g;
# TODO
$block_template =~ s/#BLOCKREWARD#/3.125 HUSH/g;
$block_template =~ s/#BLOCKNONCE#/$block->{nonce}/ge;
$block_template =~ s/#DIFFICULTY#/$block->{difficulty}/ge;
$block_template =~ s/#NUM_TXS#/$numtx/g;
@ -100,7 +117,7 @@ HTML
my $txi = 0;
for my $tx (@txs) {
my $json = qx!$cli getrawtransaction $tx 1!;
my $json = qx!$cli -ac_name=$arrakis getrawtransaction $tx 1!;
# "vout": 0,
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj",
# address is duplicated in the JSON of getrawtransaction !! fuck.
@ -122,9 +139,9 @@ HTML
next if $@;
$TX->{$tx} = $o;
my $tx_dir = "$root/var/www/$domain/tx/$tx";
my $tx_file = "$root/var/www/$domain/tx/$tx/index.html";
my $tx_template_file = "$root/var/www/$domain/tx/template.html";
my $tx_dir = "$root/tx/$tx";
my $tx_file = "$root/tx/$tx/index.html";
my $tx_template_file = "$root/tx/$theme.html";
my $tx_template = readfile($tx_template_file);
my $txtime = localtime($o->{time});
#my $txsize = $o->{size} . " bytes";
@ -242,7 +259,7 @@ STUFF
} elsif ($txtype eq "Shielding") {
$stuff =<<STUFF;
$from ($valueBalanceThird $ticker) => zs1??? (shielding)
$from ($valueBalanceThird HUSH) => zs1??? (shielding)
STUFF
} elsif ($txtype eq "Notary") {
@ -279,7 +296,7 @@ STUFF
<tr>
<td style="font-size: 14px">$stuff</td>
<td style="font-size: 14px">$txtime</td>
<td style="font-size: 14px">$valueBalance $ticker</td>
<td style="font-size: 14px">$valueBalance HUSH</td>
</tr>
</table>
HTML
@ -318,9 +335,48 @@ HTML
;
}
my $total_block_duration = 0;
for my $duration (@block_durations) {
if ($duration ne '--') {
$total_block_duration += $duration;
}
}
$avg_block_duration = $total_block_duration / $NUM_BLOCKS_TO_SHOW;
if ($avg_block_duration > 0) {
$avg_block_duration = sprintf "%.2f", $avg_block_duration;
my $blocktime = 75; # please Satoshi let this never change again
my $deviation = 100*($avg_block_duration / $blocktime);
my $word = ($avg_block_duration > $blocktime) ? "above" : "below";
if ($word eq 'above') { $deviation -= 100; }
if ($word eq 'below') { $deviation -= 100; }
$word .= "!" if ($deviation >= 20);
my $num_miners = keys %unique_miners;
my $longblock_multiplier = sprintf "%.2f", $longest_blocktime / $avg_block_duration;
$deviation = sprintf "%.2f", $deviation;
my $tx_per_block = sprintf("%.2f", $total_txs / $NUM_BLOCKS_TO_SHOW);
$STATS->{BLOCKS_STATS} =<<STATS;
<table border=1>
<tr><th colspan=2>Block Stats in the last $NUM_BLOCKS_TO_SHOW blocks</th></tr>
<tr><td>Average Blocktime</td><td align=center>$avg_block_duration sec</td></tr>
<tr><td>Blocktime Deviation</td><td align=center> $deviation% $word 75 sec</td></tr>
<tr><td>Longest Blocktime</td><td align=center> $longest_blocktime sec (${longblock_multiplier}X average)</td></tr>
<tr><td>Total Transactions</td><td align=center> $total_txs</td></tr>
<tr><td>Transactions Per Block</td><td align=center> $tx_per_block </td></tr>
<tr><td>Unique Miner Addresses</td><td align=center> $num_miners </td></tr>
</table>
<br/>
STATS
}
sub get_raw {
my $tx = shift;
my $cmd = "$cli getrawtransaction $tx 1";
my $cmd = "$cli -ac_name=$arrakis getrawtransaction $tx 1";
warn $cmd;
my $json = qx!$cmd!;
# "vout": 0,
@ -383,7 +439,7 @@ sub get_block {
# create data if it's not there
if( $block =~ m/^HASH/ || length($block) == 0 ) {
my $cmd = "$cli getblock $height";
my $cmd = "$cli -ac_name=$arrakis getblock $height";
warn $cmd;
$block = qx/$cmd/;
}

0
var/www/explorer.hush.land/bin/example.html → bin/example.html

7
var/www/explorer.hush.land/bin/update.pl → bin/home_update.pl

@ -9,14 +9,15 @@ $|=1;
sleep 30;
# While Siona swims, we pave with bricks on the road she will run on...
# my $dir = shift || $ENV{HOME} . "/data";
my $dir = shift || '/var/www/explorer.hush.land/var/www/explorer.hush.land/api';
my $domain = $ENV{DOMAIN};
my $dir = $ENV{DIR};
my $theme = $ENV{THEME};
my $getinfo = readfile("$dir/getinfo.json");
my $mining = readfile("$dir/getmininginfo.json");
my $txstats = readfile("$dir/getchaintxstats.json");
# run the slowest last so the RPC interface isn't juggling
my $coinsupply = readfile("$dir/coinsupply.json");
my $template = readfile("/var/www/explorer.hush.land/var/www/explorer.hush.land/template.html");
my $template = readfile("/var/www/$domain/$theme.html");
#say $template;

0
var/www/explorer.hush.land/bin/nope/README → bin/nope/README

0
var/www/explorer.hush.land/bin/nope/update_addresses.pl → bin/nope/update_addresses.pl

117
block/hushis.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html>
<head>
<title>Hush Explorer: Speak And Transact Freely</title>
<style>
body {
width: 87%;
margin: 5 auto;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
background: #111111;
color: #cccccc;
}
a:link { color: #888888; }
a:visited { color: #888888; }
a:hover { color: #554200; }
a:active { color: #550000; }
</style>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{ Fuck Blockchain Analysts }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ ^__^
\ (@@)\_______
(__)\ )\/\
||----w |
|| ||
- Duke Leto and The Hush Developers
-->
</head>
<body>
<center>
<br/>
<br/>
<a href="https://hush.is">Hush</a>
|
<a href="https://explorer.hush.is">Explorer</a>
|
<a href="https://hush.is/twitter">Twitter</a>
|
<a href="https://hush.is/tg">Telegram</a>
|
<a href="https://hush.is/telegram_support">Telegram Support</a>
|
<a href="https://hush.is/telegram_mining">Telegram Mining</a>
|
<a href="https://hush.is/reddit">Reddit</a>
|
<a href="https://hush.is/youtube">YouTube</a>
|
<a href="https://hush.is/bitcointalk">BitcoinTalk</a>
|
<a href="https://hush.is/mastodon">Mastodon</a>
|
<a href="https://hush.is/matrix">Matrix</a>
<br/>
<h1>HUSH Blockchain Explorer</h1>
<div id=navbar>
<a href="/blocks/">Blocks</a>
</div>
<div id=stats>
<table width="100%" border=1>
<tr>
<td align=center>
<table>
<tr><th>Block Height</th><td><a href="/block/#BLOCKS#">#BLOCKS#</a></td></tr>
<tr><th>Block Hash</th><td><a href="/block/#BLOCKHASH#">#BLOCKHASH#</a></td></tr>
<tr><th>Previous Block Hash</th><td><a href="/block/#PREVIOUSBLOCKHASH#">#PREVIOUSBLOCKHASH#</a></td></tr>
<tr><th>Block Reward</th><td>#BLOCKREWARD#</td></tr>
<tr><th>Block Time</th><td>#BLOCKTIME#</td></tr>
<tr><th>Block Difficulty</th><td>#DIFFICULTY#</td></tr>
<tr><th>Block Size</th><td>#BLOCKSIZE# bytes</td></tr>
<tr><th>Block Version</th><td>#VERSION#</td></tr>
<tr><th>Block Bits</th><td>#BITS#</td></tr>
<tr><th>Block Nonce</th><td>#BLOCKNONCE#</td></tr>
<tr><th>Block Anchor</th><td>#ANCHOR#</td></tr>
<tr><th>Chainwork</th><td>#CHAINWORK#</td></tr>
<tr><th>Merkle Root</th><td>#MERKLEROOT#</td></tr>
<tr><th>Final Sapling Root</th><td>#FINALSAPLINGROOT#</td></tr>
<tr><th>Transactions</th><td> #NUM_TXS# </td></tr>
</table>
</td>
</tr>
<tr> <th>Transactions</th> </tr>
<tr>
<td>
#TX_TABLE#
<font color=red>
<pre>
_____________
< Extreme!!!! >
-------------
\ ^__^
\ (@@)\_______
(__)\ )\/\
||----w |
|| ||
</pre>
</font>
</td>
</tr>
</table>
</div>
<br>
</center>
</body>
</html>

2
var/www/explorer.hush.land/var/www/explorer.hush.land/block/template.html → block/hushland.html

@ -21,7 +21,7 @@ a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../../UbuntuMono.ttf') format('truetype') }
@font-face { font-family: 'Ubuntu Mono'; src: url('../../fonts/UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

100
blocks/hushis.html

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<title>Hush Explorer: Speak And Transact Freely</title>
<style>
body {
width: 87%;
margin: 5 auto;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
background: #111111;
color: #cccccc;
}
a:link { color: #888888; }
a:visited { color: #888888; }
a:hover { color: #554200; }
a:active { color: #550000; }
</style>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{ Fuck Blockchain Analysts }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ ^__^
\ (@@)\_______
(__)\ )\/\
||----w |
|| ||
- Duke Leto and The Hush Developers
-->
<!-- this explorer must be hosted at / or this needs to be changed.
Not specifying a hostname makes it compatible with Tor/i2p/etc and other mirrors
- Duke
-->
<meta http-equiv="refresh" content="120; URL=/blocks/">
</head>
<body>
<center>
<br/>
<br/>
<a href="https://hush.is">Hush</a>
|
<a href="https://explorer.hush.is">Explorer</a>
|
<a href="https://git.hush.is/hush/">Git</a>
|
<a href="https://hush.is/tg">Telegram</a>
|
<a href="https://hush.is/telegram_support">Telegram Support</a>
|
<a href="https://hush.is/telegram_mining">Telegram Mining</a>
|
<a href="https://hush.is/reddit">Reddit</a>
|
<a href="https://hush.is/youtube">YouTube</a>
|
<a href="https://hush.is/bitcointalk">BitcoinTalk</a>
|
<a href="https://hush.is/mastodon">Mastodon</a>
|
<a href="https://hush.is/matrix">Matrix</a>
<br/>
<h1>HUSH Blockchain Explorer</h1>
<div id=navbar>
<a href="/blocks/">Blocks</a>
</div>
#BLOCKS_STATS#
<br/>
<div id=stats>
<table width="100%" border=1>
<tr>
<th>Height</th>
<th>Block Hash</th>
<th>Block Time</th>
<th>Duration</th>
<th>Miner</th>
<th>Reward</th>
<th>Transactions</th>
</tr>
#BLOCKS_TABLE#
</table>
</td>
</tr>
</table>
</div>
<br>
</center>
</body>
</html>

3
var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/template.html → blocks/hushland.html

@ -21,7 +21,7 @@ a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../UbuntuMono.ttf') format('truetype') }
@font-face { font-family: 'Ubuntu Mono'; src: url('../fonts/UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
@ -66,6 +66,7 @@ a:hover { color: #b3b3b3 }
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
#BLOCKS_STATS#
#BLOCKS_TABLE#
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>

77
example-nginx.conf

@ -0,0 +1,77 @@
# example siona explorer nginx.conf
# change explorer.YOURDOMAIN.NET to the hostname you'll be using
server {
root /var/www/explorer.YOURDOMAIN.NET;
index index.html index.htm;
server_name explorer.YOURDOMAIN.NET www.explorer.YOURDOMAIN.NET;
add_header X-Hush-Is-Privacy "Yes";
add_header X-Is-Zcash-Mainnet-A-Honeypot "Yes";
add_header X-Fuck-Blockchain-Analysts "Yes";
location / {
try_files $uri $uri/ =404;
}
# this allows another site to get API data
location /api {
add_header Access-Control-Allow-Origin "*";
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/explorer.YOURDOMAIN.NET/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/explorer.YOURDOMAIN.NET/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
error_page 404 /404.html;
location = /404.html {
internal;
}
# BOT PROTECTION BELOW - thanks Duke for this
if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 444; }
if ($http_user_agent ~* "SemrushBot|xforce-security.com|TestBot|MauiBot|CCBot|SummalyBot|PetalBot|BLEXBot|expanseinc.com|clark-crawler|AhrefsBot|mj12bot|YisouSpider|opensiteexplorer|seznambot|dataforseo") {
return 444;
}
location ~* .(display_errors|set_time_limit|allow_url_include.*disable_functions.*open_basedir|set_magic_quotes_runtime|webconfig.txt.php|file_put_contentssever_root|wlwmanifest) {
return 444;
}
location ~* ^/wp-content/.*$ {
return 444;
}
# thanks Onryo for this
location ~* ^/wp-admin/.*$ {
return 444;
}
}
server {
if ($host = www.explorer.YOURDOMAIN.NET) {
return 301 https://$host$request_uri;
}
if ($host = explorer.YOURDOMAIN.NET) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name explorer.YOURDOMAIN.NET www.explorer.YOURDOMAIN.NET;
return 404;
}
# OPTIONAL - Block to run siona explorer over TOR
#server {
# listen 127.0.0.1:80;
# root /var/www/explorer.YOURDOMAIN.NET;
# index index.html;
# server_name http://YOUR-LONG-TOR-ONION-SITE-NAME.onion ;
}
# TODO - Add block to run siona explorer over i2p

BIN
favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
fonts/UbuntuMono.ttf

Binary file not shown.

1
git/explorer.hush.land/yep

@ -1 +0,0 @@
yep

1
git/hush3/yep

@ -1 +0,0 @@
git clone https://git.hush.is/hush/hush3

30
var/www/explorer.hush.land/var/www/explorer.hush.land/index-prev.html → hushis.html

@ -76,20 +76,20 @@
<tr>
<td align=center>
<table>
<tr><th>Block Height</th><td><a href="/block/00000007235bcfad2de9c91c13a895263644b362a50efa0e9d91d79ccffcf13b">798463</a></td></tr>
<tr><th>Block Hash</th><td><a href="/block/00000007235bcfad2de9c91c13a895263644b362a50efa0e9d91d79ccffcf13b">00000007235bcfad2de9c91c13a895263644b362a50efa0e9d91d79ccffcf13b</a></td></tr>
<tr><th>Block Height</th><td><a href="/block/#BLOCKHASH#">#BLOCKS#</a></td></tr>
<tr><th>Block Hash</th><td><a href="/block/#BLOCKHASH#">#BLOCKHASH#</a></td></tr>
<!-- <tr><th>Notarized Height</th><td><a href="/block/#NOTARIZED#">#NOTARIZED#</a></td></tr> -->
<!-- <tr><th>Notarized Hash</th><td><a href="/block/0000000000000000000000000000000000000000000000000000000000000000"> 0000000000000000000000000000000000000000000000000000000000000000</a></td></tr> -->
<tr><th>Longest Chain</th><td><a href="/block/798463">798463</a></td></tr>
<tr><th>Chain Tip Time</th><td> <font size=small>Mon Jan 10 14:56:50 2022<!-- 1641826610 --></font></td></tr>
<tr><th>Total Transactions</th><td> 1237062</td></tr>
<tr><th>Transaction Rate</th><td> 0.9788 per minute (Monthly Avg)</td></tr>
<!-- <tr><th>Notarized Hash</th><td><a href="/block/#NOTARIZEDHASH#"> #NOTARIZEDHASH#</a></td></tr> -->
<tr><th>Longest Chain</th><td><a href="/block/#LONGESTCHAIN#">#LONGESTCHAIN#</a></td></tr>
<tr><th>Chain Tip Time</th><td> <font size=small>#TIPTIME#</font></td></tr>
<tr><th>Total Transactions</th><td> #TXCOUNT#</td></tr>
<tr><th>Transaction Rate</th><td> #TXRATE# per minute (Monthly Avg)</td></tr>
<!--<tr><th>Transactions Per Day</th><td> #TXS_PER_DAY#</td></tr> -->
<tr><th>Difficulty</th><td> 10543947</td></tr>
<tr><th>Network Solution Rate (Hashrate)</th><td> 2.44 MegaSols/s</td></tr>
<tr><th>Circulating Supply</th><td> 11859692.58202515 <b>HUSH</b></td></tr>
<tr><th>Shielded Supply</th><td> 5773652.68191908 <b>HUSH</b></td></tr>
<tr><th>Percent Shielded</th><td> 48.683 %</td></tr>
<tr><th>Difficulty</th><td> #DIFFICULTY#</td></tr>
<tr><th>Network Solution Rate (Hashrate)</th><td> #NETWORKSOLPS# MegaSols/s</td></tr>
<tr><th>Circulating Supply</th><td> #SUPPLY# <b>HUSH</b></td></tr>
<tr><th>Shielded Supply</th><td> #ZFUNDS# <b>HUSH</b></td></tr>
<tr><th>Percent Shielded</th><td> #ZFUNDS_PERCENT# %</td></tr>
</table>
</td>
</tr>
@ -107,7 +107,7 @@
<li>No images (<a href="https://en.wikipedia.org/wiki/Web_beacon">web bugs</a>)</li>
<li>No external CSS, only a few lines of inline per page</li>
<li>Visited/unvisited links are the same color so screenshots do not leak metadata</li>
<li>Tor Hidden Service Coming Soon</li>
<li>Tor Hidden Service: <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion">http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion</a></li>
</ul>
This Explorer doesn't snoop on your privacy! There is no Javascript or images for that reason.
Either could be used to steal your privacy. This explorer is natively compatible with Tor, i2p
@ -131,10 +131,10 @@ The code to this explorer is still under development and will be released in due
<table border=1>
<tr><td>
11 of 11 peers connected via <font color=green>TLS 1.3</font>
#TLS_CONNECTIONS# of #CONNECTIONS# peers connected via <font color=green>TLS 1.3</font>
</td></tr>
<tr><td>
Protocol Version <font color=orange>1987424</font>
Protocol Version <font color=orange>#PROTOCOLVERSION#</font>
</td></tr>
</center>

16
var/www/explorer.hush.land/var/www/explorer.hush.land/template.html → hushland.html

@ -23,7 +23,7 @@ a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('UbuntuMono.ttf') format('truetype') }
@font-face { font-family: 'Ubuntu Mono'; src: url('fonts/UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
@ -68,7 +68,7 @@ a:hover { color: #b3b3b3 }
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt"><p>This is the most private and secure Blockchain Explorer in Zcash World, inspiration goes to <a href="https://xmrchain.net" class="mainlink">xmrchain.net</a>! There is no Javascript both client or server-side, it has no cookies, web analytics trackers, no images, no external CSS, visited and unvisited links are the same color so screenshots do not leak metadata, likewise it is available as a <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="mainlink">Tor hidden service</a>.</p></div>
<div class="blockt"><p>This is the most private and secure Blockchain Explorer in Zcash World called <a href="https://git.hush.is/hush/siona">Siona</a>, inspiration goes to xmrchain.net! There is no JavaScript both client or server-side, it has no cookies, web analytics trackers, images or external CSS, visited and unvisited links are the same color so screenshots do not leak metadata, likewise it is available as a <a href="http://hush3zkprw7xglpsevqesaehnamcc3o2mtc3ined6pyb4gwopn2iewqd.onion" class="mainlink">Tor hidden service</a>!</p></div>
<table>
<tr>
<td style="font-size: 14px; width: 50%">#TIPTIME#</td>
@ -78,7 +78,7 @@ a:hover { color: #b3b3b3 }
<table>
<tr>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Block Height: #BLOCKS# </a></td>
<td style="font-size: 14px; width: 50%"><a href="https://git.hush.is/hush/anonsets" class="mainlinkexplorer">Anonymity Set</a>:<span class='anonset'> 2410752 </span></td>
<td style="font-size: 14px; width: 50%">Percent Shielded: #ZFUNDS_PERCENT# </td>
</tr>
</table>
<table>
@ -100,16 +100,6 @@ a:hover { color: #b3b3b3 }
</tr>
</table>
<table>
<td style="font-size: 14px; width: 50%">Price:<span class='price'> 0.00000273 BTC</span></td>
<td style="font-size: 14px; width: 50%">Total Volume:<span class='volume'> .0077033708 BTC </span></td>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Percent Shielded: #ZFUNDS_PERCENT# </td>
<td style="font-size: 14px; width: 50%"><a href="/addresses/" class="mainlinkexplorer">T-addresses list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">#CONNECTIONS# peers connected via TLS 1.3</td>
<td style="font-size: 14px; width: 50%">Protocol Version: #PROTOCOLVERSION#</td>

BIN
images/hush-404.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
images/hush2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
images/hushis0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

BIN
images/hushis1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

BIN
images/hushis3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
images/hushland0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
images/hushland1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

BIN
images/hushland2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

BIN
images/hushland3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

0
var/www/explorer.hush.land/var/www/explorer.hush.land/index-1.html → index-1.html

0
var/www/explorer.hush.land/var/www/explorer.hush.land/index.html → index.html

29
run_siona.sh

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# UPDATE EXPLORER DATA
NEWFILE=/var/www/$DOMAIN/blocks/index.new.html
INDEXFILE=/var/www/$DOMAIN/blocks/index.html
# reads data from api
/var/www/$DOMAIN/bin/blocks_update.pl > $NEWFILE
if [ -s $NEWFILE ]; then
cp $NEWFILE $INDEXFILE
fi
# UDPATE API
$CLI -ac_name=$ARRAKIS getinfo &> api/getinfo.json
$CLI -ac_name=$ARRAKIS getmininginfo &> api/getmininginfo.json
$CLI -ac_name=$ARRAKIS getblockchaininfo &> api/getblockchain.json
$CLI -ac_name=$ARRAKIS getchaintxstats &> api/getchaintxstats.json
$CLI -ac_name=$ARRAKIS gettxoutsetinfo &> api/gettxoutsetinfo.json
$CLI -ac_name=$ARRAKIS coinsupply &> api/coinsupply.json
$CLI -ac_name=$ARRAKIS getchaintips &> api/getchaintips.json
$CLI -ac_name=$ARRAKIS getchaintxstats &> api/getchaintxstats.json
# UPDATE INDEX.HTML
perl bin/home_update.pl > index-1.html
cat index-1.html > index.html

87
tx/hushis.html

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<title>Hush Explorer: Speak And Transact Freely</title>
<style>
body {
width: 95%;
margin: 5 auto;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
background: #111111;
color: #cccccc;
}
a:link { color: #888888; }
a:visited { color: #888888; }
a:hover { color: #554200; }
a:active { color: #550000; }
</style>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{ Fuck Blockchain Analysts }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ ^__^
\ (@@)\_______
(__)\ )\/\
||----w |
|| ||
- Duke Leto and The Hush Developers
-->
</head>
<body>
<center>
<br/>
<br/>
<a href="https://hush.is">Hush</a> | <a href="https://explorer.hush.is">Explorer</a>
| <a href="https://hush.is/twitter">Twitter</a> | <a href="https://hush.is/tg">Telegram</a> |
<a href="https://hush.is/telegram_support">Telegram Support</a> | <a href="https://hush.is/telegram_mining">Telegram Mining</a>
| <a href="https://hush.is/reddit">Reddit</a> | <a href="https://hush.is/youtube">YouTube</a>
| <a href="https://hush.is/bitcointalk">BitcoinTalk</a> | <a href="https://hush.is/mastodon">Mastodon</a>
| <a href="https://hush.is/matrix">Matrix</a>
<br/>
<h1>HUSH Blockchain Explorer</h1>
<div id=navbar>
<a href="/blocks/">Blocks</a>
</div>
<div id=stats>
<table width="100%" border=1>
<tr>
<td align=center>
<table>
<tr><th>Block Height</th><td><a href="/block/#BLOCKHEIGHT#">#BLOCKHEIGHT#</a></td></tr>
<tr><th>Block Hash</th><td><a href="/block/#BLOCKHASH#">#BLOCKHASH#</a></td></tr>
<tr><th>Transaction ID</th><td><a href="/tx/#TXID#">#TXID#</a></td></tr>
<tr><th>Transaction Time</th><td>#TXTIME#</td></tr>
<!-- <tr><th>Transaction Size</th><td>#TXSIZE#</td></tr> -->
</table>
</td>
</tr>
<tr>
<td align=center>
#TX_DATA#
</td>
</tr>
</table>
</div>
<br>
</center>
<font color=red>
<pre>
_____________
< Extreme!!!! >
-------------
\ ^__^
\ (@@)\_______
(__)\ )\/\
||----w |
|| ||
</pre>
</font>
</body>
</html>

0
var/www/explorer.hush.land/var/www/explorer.hush.land/tx/template.html → tx/hushland.html

15
update.sh

@ -1,15 +0,0 @@
#!/usr/bin/env bash
DOMAIN=$(SIONA_DOMAIN)
DIR="/var/www/$DOMAIN"
DIRDIR="$DIR$DIR"
cd $DIR && ./update_explorer_data.sh
cd $DIR && ./update_api.sh
# Anonset
cd $DIRDIR && anonset=$(curl -s "https://$DOMAIN/api/getchaintxstats.json" | jq -r '.shielded_pool_size') && sed -i "s|<span class='anonset'>.*</span>|<span class='anonset'> $anonset </span>|g" template.html
perl $DIR/bin/update.pl > $DIRDIR/index-1.html
cd $DIRDIR && cat index-1.html > index.html

0
var/www/explorer.hush.land/PID

23
var/www/explorer.hush.land/crons/README

@ -1,23 +0,0 @@
# cron jobs to run explorer
```
# m h dom mon dow command
*/7 * * * * ./update_explorer_data.sh
*/5 * * * * ./update_api.sh
#*/7 * * * * ./hush_cron.sh
# restart hushd every 4 hours
# start it if it's not running
20 */4 * * * ./restart-hushd.sh
*/10 * * * * /var/www/explorer.hush.land/update.sh
```
Restarting hushd used to be needed before the LOCK bug fixed in dev (which will be in 3.9.1), so
that is optional if you are using the latest code.
The times the cronjobs run are specifically chosen to try and run in a specific order, since
the output of one cron is used in another.

19
var/www/explorer.hush.land/update_api.sh

@ -1,19 +0,0 @@
#!/usr/bin/env bash
# Copyright 2016-2022 The Hush Developers
DOMAIN=${SIONA_DOMAIN}
CLI=${SIONA_CLI}
# this is optional and not used yet here
ACNAME=${SIONA_ACNAME}
DIR=/var/www/$DOMAIN/var/www/$DOMAIN/api
# TODO: remove IP info from getpeerinfo
#$CLI getpeerinfo > $DIR/getpeerinfo.json
$CLI getinfo &> $DIR/getinfo.json
$CLI getmininginfo &> $DIR/getmininginfo.json
$CLI getblockchaininfo &> $DIR/getblockchain.json
$CLI getchaintxstats &> $DIR/getchaintxstats.json
$CLI gettxoutsetinfo &> $DIR/gettxoutsetinfo.json
$CLI coinsupply &> $DIR/coinsupply.json
$CLI getchaintips &> $DIR/getchaintips.json
$CLI getchaintxstats &> $DIR/getchaintxstats.json

17
var/www/explorer.hush.land/update_explorer_data.sh

@ -1,17 +0,0 @@
#!/usr/bin/env bash
cli=$(SIONA_CLI)
# only ask for data if we don't have it
#if [ -s ~/data/blocks/block-$HEIGHT.json ]; then
# HEIGHT=$($cli getblockcount); $cli getblock $HEIGHT > ~/data/blocks/block-$HEIGHT.json
#fi
NEWFILE=/var/www/$domain/var/www/$domain/blocks/index.new.html
INDEXFILE=/var/www/$domain/var/www/$domain/blocks/index.html
# reads data from /var/www/$domain/api
/var/www/$domain/bin/update_blocks_redis.pl > $NEWFILE
if [ -s $NEWFILE ]; then
cp $NEWFILE $INDEXFILE
fi

12
var/www/explorer.hush.land/var/www/explorer.hush.land/PID

@ -1,12 +0,0 @@
226212
226355
226361
226664
227090
227309
227738
227933
228039
228062
228077
228090

1
var/www/explorer.hush.land/var/www/explorer.hush.land/index-new.html

@ -1 +0,0 @@
No such file or directory at /var/www/explorer.hush.land/bin/update.pl line 47.

15
var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
DOMAIN=explorer.hush.land/var/www/explorer.hush.land
DIR=/var/www
echo $$ >> $DIR/$DOMAIN/PID
# make a backup so we can diff them
cp $DIR/$DOMAIN/{index,index-prev}.html
# let index.html settle
sleep 2
perl /var/www/explorer.hush.land/bin/update.pl /var/www/explorer.hush.land/api &> $DIR/$DOMAIN/index-new.html
cp $DIR/$DOMAIN/index-new.html $DIR/$DOMAIN/index.html
Loading…
Cancel
Save