diff --git a/cmd/lotus-chainwatch/site/block.html b/cmd/lotus-chainwatch/site/block.html
new file mode 100644
index 000000000..b9aa09c32
--- /dev/null
+++ b/cmd/lotus-chainwatch/site/block.html
@@ -0,0 +1,61 @@
+
+
+
+ Lotus ChainWatch
+
+
+
+{{$cid := param "cid"}}
+
+
+
+
+
+
Miner: {{index (strings "blocks" "miner" "cid=?" $cid) 0}}
+
Parents:
+
+ {{range strings "block_parents" "parent" "block=?" $cid}}
+ {{$parent := .}}
+
{{. | substr 54 62}}
+ {{end}}
+
+
Messages:
+
+ {{range strings "block_messages" "message" "block=?" $cid}}
+ {{$msg := .}}
+
+ {{$msg | substr 54 62}} |
+
+ {{$from := qstr "select \"from\" from messages where cid=?" $msg}}
+ {{$nonce := qstr "select nonce from messages where cid=?" $msg}}
+ {{$from}} (N:{{$nonce}})
+ |
+ -> |
+
+ {{$to := qstr "select \"to\" from messages where cid=?" $msg}}
+ {{$to}}
+ |
+
+ Method:{{qstr "select method from messages where cid=?" $msg}}
+ |
+ {{$rec := qstrs `select r.exit, r.gas_used from messages
+ inner join block_messages bm on messages.cid = bm.message
+ inner join blocks b on bm.block = b.cid
+ inner join block_parents bp on b.cid = bp.parent
+ inner join blocks chd on bp.block = chd.cid
+ inner join receipts r on messages.cid = r.msg and chd.parentStateRoot = r.state
+ where messages.cid=? and b.cid=?` 2 $msg $cid}}
+ exit:{{index $rec 0}} |
+ gasUsed:{{index $rec 1}} |
+
+ {{end}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cmd/lotus-chainwatch/site/blocks.html b/cmd/lotus-chainwatch/site/blocks.html
new file mode 100644
index 000000000..6e38d9e2d
--- /dev/null
+++ b/cmd/lotus-chainwatch/site/blocks.html
@@ -0,0 +1,43 @@
+
+
+
+ Lotus ChainWatch
+
+
+
+{{$start := param "start" | parseInt}}
+
+
+
+
+
+
+ {{range pageDown $start 50}}
+
+
+ {{$h := .}}
+ {{$h}};
+ |
+
+ {{qstr `select count(distinct block_messages.message) from block_messages
+ inner join blocks b on block_messages.block = b.cid
+ where b.height = ?` $h}} Msgs
+ |
+
+ {{range strings "blocks" "cid" "height = ?" $h}}
+ {{. | substr 54 62}}
+ {{end}}
+ |
+
+ {{end}}
+
+
Next 50
+
+
+
+
+
diff --git a/cmd/lotus-chainwatch/site/index.html b/cmd/lotus-chainwatch/site/index.html
index 1a1c2813a..315ba5705 100644
--- a/cmd/lotus-chainwatch/site/index.html
+++ b/cmd/lotus-chainwatch/site/index.html
@@ -26,6 +26,11 @@
{{count "id_address_map" "id != address"}} Keys;
E% FIL in wallets; F% FIL in miners; M% in market; %G Other actors; %H FIL it treasury
+
+ {{$maxH := queryNum "select max(height) from blocks inner join blocks_synced bs on blocks.cid = bs.cid"}}
+
+ {{count "blocks"}}
Blocks; Current Height: {{$maxH}};
+