Compare commits

...

4 Commits
master ... v1.0

8 changed files with 36 additions and 14 deletions

View File

@ -43,7 +43,7 @@ ENV BITCOIN_NODE_USER bitcoinuser
ENV BITCOIN_NODE_PASS bitcoinpass
ENV TX_PER_SECOND_SPAN_SECONDS 150
ENV BACKEND_API bitcoind
ENV ELECTRS_API_URL https://www.blockstream.info/api
ENV ELECTRS_API_URL https://mempool.space/api
RUN cd /mempool.space/frontend/ && \
npm run build && \

View File

@ -1,10 +1,29 @@
# mempool.space
🚨This is beta software, and may have issues!🚨
Please help us test and report bugs to our GitHub issue tracker.
# mempool
## a mempool visualizer and explorer for Bitcoin
Mempool visualizer for the Bitcoin blockchain. Live demo: https://mempool.space/
![blockchain](https://pbs.twimg.com/media/EAETXWAU8AAj4IP?format=jpg&name=4096x4096)
![mempool](https://pbs.twimg.com/media/EAETXWCU4AAv2v-?format=jpg&name=4096x4096)
![blockchain](https://pbs.twimg.com/media/EAETXWAU8AAj4IP?format=jpg&name=4096x4096)
## Pick the right version for your use case
Mempool V1 has basic explorer functionality and can run from a Bitcoin Core full node on a Raspberry Pi (no pruning, txindex=1).
Mempool V2 is what runs on https://mempool.space and has advanced explorer functionality, but requires a fully synced electrs backend running on powerful server hardware.
# Mempool V1 using Docker (easy)
Install from Docker Hub, passing your Bitcoin Core RPC credentials as environment variables:
```bash
docker pull mempool/mempool:v1.0
docker create -p 80:80 -e BITCOIN_NODE_HOST=192.168.1.102 -e BITCOIN_NODE_USER=foo -e BITCOIN_NODE_PASS=bar --name mempool mempool/mempool:v1.0
docker start mempool
docker logs mempool
```
You should see mempool starting up, which takes over an hour (needs 8 blocks). When it's ready, visit http://127.0.0.1/ to see your mempool.
# Mempool V1 not using Docker (advanced)
## Dependencies
@ -13,6 +32,13 @@ Mempool visualizer for the Bitcoin blockchain. Live demo: https://mempool.space/
* MySQL or MariaDB (default config)
* Nginx (use supplied nginx.conf)
## Checking out release tag
```bash
git clone https://github.com/mempool-space/mempool.space
cd mempool.space
git checkout v1.0.0 # put latest release tag here
```
## Bitcoin Core (bitcoind)
Enable RPC and txindex in bitcoin.conf
@ -28,8 +54,6 @@ Enable RPC and txindex in bitcoin.conf
Install dependencies and build code:
```bash
cd mempool.space
# Install TypeScript Globally
npm install -g typescript

View File

@ -20,6 +20,6 @@
"BITCOIN_NODE_USER": "",
"BITCOIN_NODE_PASS": "",
"BACKEND_API": "bitcoind",
"ELECTRS_API_URL": "https://www.blockstream.info/api",
"ELECTRS_API_URL": "https://mempool.space/api",
"TX_PER_SECOND_SPAN_SECONDS": 150
}

View File

@ -203,7 +203,6 @@ class Blocks {
if (!numbers.length) { return 0; }
let medianNr = 0;
const numsLen = numbers.length;
numbers.sort();
if (numsLen % 2 === 0) {
medianNr = (numbers[numsLen / 2 - 1] + numbers[numsLen / 2]) / 2;
} else {

View File

@ -89,7 +89,6 @@ class ProjectedBlocks {
private median(numbers: number[]) {
let medianNr = 0;
const numsLen = numbers.length;
numbers.sort();
if (numsLen % 2 === 0) {
medianNr = (numbers[numsLen / 2 - 1] + numbers[numsLen / 2]) / 2;
} else {

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<h4 class="modal-title">Fee distribution for block
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="!isElectrsEnabled" href="https://mempool.space/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isElectrsEnabled" (click)="activeModal.dismiss()" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
</h4>
<button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross click')">

View File

@ -2,7 +2,7 @@
<div *ngFor="let block of blocks; let i = index; trackBy: trackByBlocksFn" >
<div (click)="openBlockModal(block);" class="text-center bitcoin-block mined-block" id="bitcoin-block-{{ block.height }}" [ngStyle]="getStyleForBlock(block)">
<div class="block-height">
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="!isElectrsEnabled" href="https://mempool.space/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isElectrsEnabled" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
</div>
<div class="block-body">

View File

@ -4,7 +4,7 @@
<tr>
<td class="text-left"><b>Transaction hash</b></td>
<td class="text-right">
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/tx/{{ tx?.txid }}" target="_blank">{{ tx?.txid | shortenString }}</a>
<a *ngIf="!isElectrsEnabled" href="https://mempool.space/tx/{{ tx?.txid }}" target="_blank">{{ tx?.txid | shortenString }}</a>
<a *ngIf="isElectrsEnabled" [routerLink]="['/explorer/tx/', tx?.txid]">{{ tx?.txid | shortenString }}</a>
</td>
</tr>