A mempool (short for "memory pool") is a data structure that holds the queue of pending and unconfirmed transactions for a cryptocurrency network node. Every node on the network has its own mempool, which may contain different transactions.
A mempool explorer is a tool that enables you to explore a node’s mempool, by visualizing the transactions contained within it, and allowing you to search and view those pending transactions, as well as general information about the node’s mempool.
The mempool.space website invented the concept of visualizing a Bitcoin node’s mempool as projected blocks, which are visible on the left side of our main dashboard, and the inspiration for our half-filled block logo.
A blockchain is the distributed ledger that records the transactions for a cryptocurrency network. Miners amend the blockchain ledger by mining new blocks.
A block explorer is a tool that enables you to explore the blockchain of a cryptocurrency for real-time and historical information about a blockchain, including data related to blocks, transactions, addresses, and more.
Miners decide which transactions get included into the blocks they mine, and so they usually prioritize the transactions which pay them the highest transaction fees, measured in sats per virtual byte. This means to get confirmed sooner, you need to pay a higher fee.
"
+ },
+ {
+ type: "endpoint",
+ category: "help",
+ showConditions: bitcoinNetworks,
+ fragment: "how-to-get-transaction-confirmed-quickly",
+ title: "How can I get my transaction confirmed quickly?",
+ answer: "
If your wallet supports RBF, and your transaction was created with RBF enabled, you can bump the fee higher.
If your wallet does not support RBF, you can increase the effective fee rate of your transaction by spending its change output using a higher fee. This is called CPFP.
"
+ },
+ {
+ type: "endpoint",
+ category: "help",
+ showConditions: bitcoinNetworks,
+ fragment: "how-prevent-stuck-transaction-in-future",
+ title: "How can I prevent a transaction from getting stuck in the future?",
+ answer: "
You must use an adequate fee rate. Also consider using RBF if your wallet supports it so that you can bump the fee rate if needed.
"
+ },
+ {
+ type: "category",
+ category: "using",
+ fragment: "using-this-website",
+ title: "Using this website",
+ showConditions: bitcoinNetworks
+ },
+ {
+ type: "endpoint",
+ category: "how-to",
+ showConditions: bitcoinNetworks,
+ fragment: "looking-up-transactions",
+ title: "How can I look up a transaction?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "how-to",
+ showConditions: bitcoinNetworks,
+ fragment: "looking-up-addresses",
+ title: "How can I look up an address?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "how-to",
+ showConditions: bitcoinNetworks,
+ fragment: "looking-up-blocks",
+ title: "How can I look up a block?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "how-to",
+ showConditions: bitcoinNetworks,
+ fragment: "looking-up-fee-estimates",
+ title: "How can I look up fee estimates?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "how-to",
+ showConditions: bitcoinNetworks,
+ fragment: "looking-up-historical-trends",
+ title: "How can I explore historical trends?",
+ answer: "Because reasons."
+ },
+ {
+ type: "category",
+ category: "advanced",
+ fragment: "advanced",
+ title: "Advanced",
+ showConditions: bitcoinNetworks
+ },
+ {
+ type: "endpoint",
+ category: "advanced",
+ showConditions: bitcoinNetworks,
+ fragment: "who-runs-this-website",
+ title: "Who runs this website?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "advanced",
+ showConditions: bitcoinNetworks,
+ fragment: "host-my-own-instance-on-raspberry-pi",
+ title: "How can I host my own instance on a Raspberry Pi?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "advanced",
+ showConditions: bitcoinNetworks,
+ fragment: "host-my-own-instance-on-linux-server",
+ title: "How can I host my own instance on a Linux server?",
+ answer: "Because reasons."
+ },
+ {
+ type: "endpoint",
+ category: "advanced",
+ showConditions: bitcoinNetworks,
+ fragment: "install-mempool-with-docker",
+ title: "Can I install Mempool using Docker?",
+ answer: "Because reasons."
+ }
+];
diff --git a/frontend/src/app/components/docs/api-docs-nav.component.html b/frontend/src/app/components/docs/api-docs-nav.component.html
index 83eaaf9e8..c8460ada4 100644
--- a/frontend/src/app/components/docs/api-docs-nav.component.html
+++ b/frontend/src/app/components/docs/api-docs-nav.component.html
@@ -1,4 +1,4 @@
-
A mempool (short for "memory pool") is a data structure that holds the queue of pending and unconfirmed transactions for a cryptocurrency network node. Every node on the network has its own mempool, which may contain different transactions.
'
+ answer: "
A mempool (short for \"memory pool\") holds the queue of pending and unconfirmed transactions for a cryptocurrency network node. There is no one global mempool: every node on the network maintains its own mempool, so different nodes may hold different transactions in their mempools.
A mempool explorer is a tool that enables you to explore a node’s mempool, by visualizing the transactions contained within it, and allowing you to search and view those pending transactions, as well as general information about the node’s mempool.
The mempool.space website invented the concept of visualizing a Bitcoin node’s mempool as projected blocks, which are visible on the left side of our main dashboard, and the inspiration for our half-filled block logo.
'
+ answer: "
A mempool explorer is a tool that enables you to explore a node's mempool by visualizing its transactions, searching and viewing those transactions, and viewing aggregate and historical data about a node's mempool.
The mempool.space website invented the concept of visualizing a Bitcoin node's mempool as projected blocks. These blocks are the inspiration for our half-filled block logo.
Here's a snapshot of this visualization (which you can find on the main dashboard) as of block 729,131 in March 2022. Projected blocks are on the left, and confirmed blocks are on the right.
A blockchain is the distributed ledger that records the transactions for a cryptocurrency network. Miners amend the blockchain ledger by mining new blocks.
"
+ answer: "
A blockchain is a distributed ledger that records the transactions for a cryptocurrency network. Miners amend the blockchain ledger by mining new blocks.
A block explorer is a tool that enables you to explore the blockchain of a cryptocurrency for real-time and historical information about a blockchain, including data related to blocks, transactions, addresses, and more.
"
+ answer: "
A block explorer is a tool that enables you to explore real-time and historical information about the blockchain of a cryptocurrency. This includes data related to blocks, transactions, addresses, and more.
"
},
{
type: "endpoint",
@@ -4457,7 +4457,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "what-is-mining",
title: "What is mining?",
- answer: "Because reasons."
+ answer: "Mining is the process by which unconfirmed transactions are confirmed. Miners select unconfirmed transactions from their mempools and arrange them into a block such that they solve a particular math problem.
The first miner on the network that finds a suitable block gets all the transaction fees from the transactions in that block. As a result, miners tend to prioritize transactions with higher transaction fees.
"
},
{
type: "endpoint",
@@ -4465,7 +4465,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "what-are-mining-pools",
title: "What are mining pools?",
- answer: "Because reasons."
+ answer: "Mining pools are groups of miners that combine their computational power in order to increase the probability of finding new blocks."
},
{
type: "category",
@@ -4480,15 +4480,15 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "why-is-transaction-stuck-in-the-mempool",
title: "Why is my transaction stuck in the mempool?",
- answer: "
Miners decide which transactions get included into the blocks they mine, and so they usually prioritize the transactions which pay them the highest transaction fees, measured in sats per virtual byte. This means to get confirmed sooner, you need to pay a higher fee.
"
+ answer: "
Miners decide which transactions are included in the blocks they mine, so they usually prioritize transactions which pay them the highest transaction fees (transaction fees are measured in sats per virtual byte, or sat/vB). If your transcation is stuck in the mempool, your transaction probably has a lower transaction fee relative to other transactions currently in the mempool.
"
},
{
type: "endpoint",
category: "help",
showConditions: bitcoinNetworks,
fragment: "how-to-get-transaction-confirmed-quickly",
- title: "How can I get my transaction confirmed quickly?",
- answer: "
If your wallet supports RBF, and your transaction was created with RBF enabled, you can bump the fee higher.
If your wallet does not support RBF, you can increase the effective fee rate of your transaction by spending its change output using a higher fee. This is called CPFP.
"
+ title: "How can I get my transaction confirmed more quickly?",
+ answer: "
If your wallet supports RBF, and if your transaction was created with RBF enabled, you can bump the fee higher.
Otherwise, if your wallet does not support RBF, you can increase the effective fee rate of your transaction by spending its change output using a higher fee. This is called CPFP.
"
},
{
type: "endpoint",
@@ -4496,7 +4496,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "how-prevent-stuck-transaction-in-future",
title: "How can I prevent a transaction from getting stuck in the future?",
- answer: "
You must use an adequate fee rate. Also consider using RBF if your wallet supports it so that you can bump the fee rate if needed.
"
+ answer: "
You must use an adequate transaction fee commensurate with how quickly you need the transaction to be confirmed. Also consider using RBF if your wallet supports it so that you can bump the fee rate if needed.
"
},
{
type: "category",
@@ -4558,7 +4558,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "who-runs-this-website",
title: "Who runs this website?",
- answer: "Because reasons."
+ answer: "The official mempool.space website is operated by The Mempool Open Source Project. See more information on our About page. There are also many unofficial instances of this website operated by individual members of the Bitcoin community."
},
{
type: "endpoint",
@@ -4566,7 +4566,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "host-my-own-instance-on-raspberry-pi",
title: "How can I host my own instance on a Raspberry Pi?",
- answer: "Because reasons."
+ answer: "We support one-click installation on a number of Raspberry Pi fullnode distros including Umbrel, RaspiBlitz, MyNode, and RoninDojo."
},
{
type: "endpoint",
@@ -4574,7 +4574,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "host-my-own-instance-on-linux-server",
title: "How can I host my own instance on a Linux server?",
- answer: "Because reasons."
+ answer: "You can manually install mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments."
},
{
type: "endpoint",
@@ -4582,6 +4582,6 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "install-mempool-with-docker",
title: "Can I install Mempool using Docker?",
- answer: "Because reasons."
+ answer: "Yes, we publish Docker images (or you can build your own), and provide an example docker-compose template."
}
];
From 663cf100d17d29175077999549083a641dac65f4 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Sun, 27 Mar 2022 01:19:48 -0400
Subject: [PATCH 06/17] Add no-sanitize pipe
---
frontend/src/app/app.module.ts | 2 ++
frontend/src/app/shared/pipes/no-sanitize.pipe.ts | 11 +++++++++++
2 files changed, 13 insertions(+)
create mode 100644 frontend/src/app/shared/pipes/no-sanitize.pipe.ts
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 807c88ade..007763305 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -56,6 +56,7 @@ import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, fa
import { ApiDocsComponent } from './components/docs/api-docs.component';
import { DocsComponent } from './components/docs/docs.component';
import { ApiDocsNavComponent } from './components/docs/api-docs-nav.component';
+import { NoSanitizePipe } from './shared/pipes/no-sanitize.pipe';
import { CodeTemplateComponent } from './components/docs/code-template.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
@@ -119,6 +120,7 @@ import { DataCyDirective } from './data-cy.directive';
DashboardComponent,
DifficultyComponent,
ApiDocsComponent,
+ NoSanitizePipe,
CodeTemplateComponent,
TermsOfServiceComponent,
PrivacyPolicyComponent,
diff --git a/frontend/src/app/shared/pipes/no-sanitize.pipe.ts b/frontend/src/app/shared/pipes/no-sanitize.pipe.ts
new file mode 100644
index 000000000..039eafb76
--- /dev/null
+++ b/frontend/src/app/shared/pipes/no-sanitize.pipe.ts
@@ -0,0 +1,11 @@
+import { Pipe, PipeTransform } from '@angular/core';
+import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
+
+@Pipe({ name: 'noSanitize' })
+export class NoSanitizePipe implements PipeTransform {
+ constructor(private domSanitizer: DomSanitizer) { }
+
+ transform(html: string): SafeHtml {
+ return this.domSanitizer.bypassSecurityTrustHtml(html);
+ }
+}
From 918798aca3200b5660f2a99dcb6ee6b6f6f42b42 Mon Sep 17 00:00:00 2001
From: wiz
Date: Sat, 2 Apr 2022 10:14:22 -0400
Subject: [PATCH 07/17] Fix newsyslog configuration for mempool backend
---
production/newsyslog-mempool-backend.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/production/newsyslog-mempool-backend.conf b/production/newsyslog-mempool-backend.conf
index 8a3aab320..5c96da47a 100644
--- a/production/newsyslog-mempool-backend.conf
+++ b/production/newsyslog-mempool-backend.conf
@@ -1,2 +1,2 @@
-/var/log/mempool 640 10 * 168 J
-/var/log/mempool.debug 640 10 1000 * J
+/var/log/mempool 640 10 * @T00 C
+/var/log/mempool.debug 640 10 * @T00 C
From dfb5ba5c3609905277956364ad081a40a46d3d04 Mon Sep 17 00:00:00 2001
From: Antoni Spaanderman <56turtle56@gmail.com>
Date: Sun, 3 Apr 2022 21:41:12 +0200
Subject: [PATCH 08/17] Completely rewrote convertScriptSigAsm
it now gives identical output to esplora, tested with the following TXs (testnet):
88710a9a6751827490f260e307757543f533c0f18bcd6865794713d263d5f5a4
446b2aad074de94efa28a1e82d2e6016dcb8a8ca38aca1a5a8eac6ef54e56a2e
4cfc410092e9514c14f48b61e20d2d3baf540ae7e981a821dd8c05dd4b7cd591
4b55dde38173174ab09e5571ebffffca798ba11143d28b9770600ff376dc778a
---
backend/src/api/bitcoin/bitcoin-api.ts | 85 ++++++++++++++++----------
1 file changed, 54 insertions(+), 31 deletions(-)
diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts
index 061b3ced1..ec786593e 100644
--- a/backend/src/api/bitcoin/bitcoin-api.ts
+++ b/backend/src/api/bitcoin/bitcoin-api.ts
@@ -147,7 +147,7 @@ class BitcoinApi implements AbstractBitcoinApi {
scriptpubkey: vout.scriptPubKey.hex,
scriptpubkey_address: vout.scriptPubKey && vout.scriptPubKey.address ? vout.scriptPubKey.address
: vout.scriptPubKey.addresses ? vout.scriptPubKey.addresses[0] : '',
- scriptpubkey_asm: vout.scriptPubKey.asm ? this.convertScriptSigAsm(vout.scriptPubKey.asm) : '',
+ scriptpubkey_asm: vout.scriptPubKey.asm ? this.convertScriptSigAsm(vout.scriptPubKey.hex) : '',
scriptpubkey_type: this.translateScriptPubKeyType(vout.scriptPubKey.type),
};
});
@@ -157,7 +157,7 @@ class BitcoinApi implements AbstractBitcoinApi {
is_coinbase: !!vin.coinbase,
prevout: null,
scriptsig: vin.scriptSig && vin.scriptSig.hex || vin.coinbase || '',
- scriptsig_asm: vin.scriptSig && this.convertScriptSigAsm(vin.scriptSig.asm) || '',
+ scriptsig_asm: vin.scriptSig && this.convertScriptSigAsm(vin.scriptSig.hex) || '',
sequence: vin.sequence,
txid: vin.txid || '',
vout: vin.vout || 0,
@@ -290,38 +290,61 @@ class BitcoinApi implements AbstractBitcoinApi {
return transaction;
}
- private convertScriptSigAsm(str: string): string {
- const a = str.split(' ');
+ private convertScriptSigAsm(hex: string): string {
+ const buf = Buffer.from(hex, 'hex');
+
const b: string[] = [];
- a.forEach((chunk) => {
- if (chunk.substr(0, 3) === 'OP_') {
- chunk = chunk.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1');
- chunk = chunk.replace('OP_CHECKSEQUENCEVERIFY', 'OP_CSV');
- chunk = chunk.replace('OP_CHECKLOCKTIMEVERIFY', 'OP_CLTV');
- b.push(chunk);
+
+ let i = 0;
+ while (i < buf.length) {
+ const op = buf[i];
+ if (op >= 0x01 && op <= 0x4e) {
+ i++;
+ let push: number;
+ if (op === 0x4c) {
+ push = buf.readUInt8(i);
+ b.push('OP_PUSHDATA1');
+ i += 1;
+ } else if (op === 0x4d) {
+ push = buf.readUInt16LE(i);
+ b.push('OP_PUSHDATA2');
+ i += 2;
+ } else if (op === 0x4e) {
+ push = buf.readUInt32LE(i);
+ b.push('OP_PUSHDATA4');
+ i += 4;
+ } else {
+ push = op;
+ b.push('OP_PUSHBYTES_' + push);
+ }
+
+ const data = buf.slice(i, i + push);
+ if (data.length !== push) {
+ break;
+ }
+
+ b.push(data.toString('hex'));
+ i += data.length;
} else {
- chunk = chunk.replace('[ALL]', '01');
- if (chunk === '0') {
- b.push('OP_0');
- } else if (chunk.match(/^[^0]\d*$/)) {
- const chunkInt = parseInt(chunk, 10);
- if (chunkInt < 0) {
- b.push('OP_PUSHNUM_NEG' + -chunkInt);
+ const opcode = bitcoinjs.script.toASM([ op ]);
+ if (opcode && op < 0xfd) {
+ if (opcode === 'OP_1NEGATE') {
+ b.push('OP_PUSHNUM_NEG1');
+ } else if (/^OP_(\d+)$/.test(opcode) && opcode !== 'OP_0') {
+ b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
} else {
- b.push('OP_PUSHNUM_' + chunk);
+ b.push(opcode
+ .replace('OP_CHECKSEQUENCEVERIFY', 'OP_CSV')
+ .replace('OP_CHECKLOCKTIMEVERIFY', 'OP_CLTV')
+ );
}
} else {
- const dataLength = Math.round(chunk.length / 2);
- if (dataLength > 255) {
- b.push('OP_PUSHDATA2' + ' ' + chunk);
- } else if (dataLength > 75) {
- b.push('OP_PUSHDATA1' + ' ' + chunk);
- } else {
- b.push('OP_PUSHBYTES_' + dataLength + ' ' + chunk);
- }
+ b.push('OP_RETURN_' + op);
}
+ i += 1;
}
- });
+ }
+
return b.join(' ');
}
@@ -332,21 +355,21 @@ class BitcoinApi implements AbstractBitcoinApi {
if (vin.prevout.scriptpubkey_type === 'p2sh') {
const redeemScript = vin.scriptsig_asm.split(' ').reverse()[0];
- vin.inner_redeemscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(redeemScript, 'hex')));
+ vin.inner_redeemscript_asm = this.convertScriptSigAsm(redeemScript);
if (vin.witness && vin.witness.length > 2) {
const witnessScript = vin.witness[vin.witness.length - 1];
- vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
+ vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
if (vin.prevout.scriptpubkey_type === 'v0_p2wsh' && vin.witness) {
const witnessScript = vin.witness[vin.witness.length - 1];
- vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
+ vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
if (vin.prevout.scriptpubkey_type === 'v1_p2tr' && vin.witness && vin.witness.length > 1) {
const witnessScript = vin.witness[vin.witness.length - 2];
- vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
+ vin.inner_witnessscript_asm = this.convertScriptSigAsm(witnessScript);
}
}
From 096f2172c6a93473ce55e94f93368f281db4ad5e Mon Sep 17 00:00:00 2001
From: Antoni Spaanderman <56turtle56@gmail.com>
Date: Sun, 3 Apr 2022 21:58:53 +0200
Subject: [PATCH 09/17] more direct opcode comparison
---
backend/src/api/bitcoin/bitcoin-api.ts | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts
index ec786593e..17808d8bc 100644
--- a/backend/src/api/bitcoin/bitcoin-api.ts
+++ b/backend/src/api/bitcoin/bitcoin-api.ts
@@ -328,15 +328,16 @@ class BitcoinApi implements AbstractBitcoinApi {
} else {
const opcode = bitcoinjs.script.toASM([ op ]);
if (opcode && op < 0xfd) {
- if (opcode === 'OP_1NEGATE') {
+ if (op === 0x4f) {
b.push('OP_PUSHNUM_NEG1');
- } else if (/^OP_(\d+)$/.test(opcode) && opcode !== 'OP_0') {
+ } else if (/^OP_(\d+)$/.test(opcode) && op !== 0x00) {
b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
+ } else if (op === 0xb1) {
+ b.push('OP_CLTV');
+ } else if (op === 0xb2) {
+ b.push('OP_CSV');
} else {
- b.push(opcode
- .replace('OP_CHECKSEQUENCEVERIFY', 'OP_CSV')
- .replace('OP_CHECKLOCKTIMEVERIFY', 'OP_CLTV')
- );
+ b.push(opcode);
}
} else {
b.push('OP_RETURN_' + op);
From 53d68a3571e09fa777b651a03eb476b01d71b06e Mon Sep 17 00:00:00 2001
From: Antoni Spaanderman <56turtle56@gmail.com>
Date: Mon, 4 Apr 2022 17:16:34 +0200
Subject: [PATCH 10/17] name tapscript by its name + OP_CHECKSIGADD tapscript
opcode detection
---
backend/src/api/bitcoin/bitcoin-api.ts | 34 +++++++++++--------
.../transactions-list.component.html | 5 ++-
.../pipes/asm-styler/asm-styler.pipe.ts | 1 +
3 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts
index 17808d8bc..7b1fc161d 100644
--- a/backend/src/api/bitcoin/bitcoin-api.ts
+++ b/backend/src/api/bitcoin/bitcoin-api.ts
@@ -326,21 +326,27 @@ class BitcoinApi implements AbstractBitcoinApi {
b.push(data.toString('hex'));
i += data.length;
} else {
- const opcode = bitcoinjs.script.toASM([ op ]);
- if (opcode && op < 0xfd) {
- if (op === 0x4f) {
- b.push('OP_PUSHNUM_NEG1');
- } else if (/^OP_(\d+)$/.test(opcode) && op !== 0x00) {
- b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
- } else if (op === 0xb1) {
- b.push('OP_CLTV');
- } else if (op === 0xb2) {
- b.push('OP_CSV');
- } else {
- b.push(opcode);
- }
+ if (op === 0x00) {
+ b.push('OP_0');
+ } else if (op === 0x4f) {
+ b.push('OP_PUSHNUM_NEG1');
+ } else if (op === 0xb1) {
+ b.push('OP_CLTV');
+ } else if (op === 0xb2) {
+ b.push('OP_CSV');
+ } else if (op === 0xba) {
+ b.push('OP_CHECKSIGADD');
} else {
- b.push('OP_RETURN_' + op);
+ const opcode = bitcoinjs.script.toASM([ op ]);
+ if (opcode && op < 0xfd) {
+ if (/^OP_(\d+)$/.test(opcode)) {
+ b.push(opcode.replace(/^OP_(\d+)$/, 'OP_PUSHNUM_$1'));
+ } else {
+ b.push(opcode);
+ }
+ } else {
+ b.push('OP_RETURN_' + op);
+ }
}
i += 1;
}
diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html
index 72407a405..eded208bd 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.html
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.html
@@ -111,7 +111,10 @@
-
P2WSH witness script
+
P2TR tapscript
+
+
P2WSH witness script
+
diff --git a/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts b/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts
index f6f1a59ad..54a02e405 100644
--- a/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts
+++ b/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts
@@ -281,6 +281,7 @@ export class AsmStylerPipe implements PipeTransform {
case 'CHECKSIGVERIFY':
case 'CHECKMULTISIG':
case 'CHECKMULTISIGVERIFY':
+ case 'CHECKSIGADD':
style = 'crypto';
break;
From 039e6bbe7785a372619ecbb26c650244e916ffb2 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Tue, 12 Apr 2022 15:31:45 -0400
Subject: [PATCH 11/17] Add answers, fix accordions, tweak footer styling
Main purpose of this commit is to remove iframes from git
history. This commit squashes several commits that came
after iframes were added.
---
.../src/app/components/docs/api-docs-data.ts | 28 +++++++++----------
.../components/docs/api-docs.component.html | 10 +++----
.../components/docs/api-docs.component.scss | 4 +++
.../app/components/docs/api-docs.component.ts | 20 ++++++++++---
4 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/frontend/src/app/components/docs/api-docs-data.ts b/frontend/src/app/components/docs/api-docs-data.ts
index ed4703641..a369ac63b 100644
--- a/frontend/src/app/components/docs/api-docs-data.ts
+++ b/frontend/src/app/components/docs/api-docs-data.ts
@@ -4433,7 +4433,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "what-is-a-mempool-explorer",
title: "What is a mempool explorer?",
- answer: "
A mempool explorer is a tool that enables you to explore a node's mempool by visualizing its transactions, searching and viewing those transactions, and viewing aggregate and historical data about a node's mempool.
The mempool.space website invented the concept of visualizing a Bitcoin node's mempool as projected blocks. These blocks are the inspiration for our half-filled block logo.
Here's a snapshot of this visualization (which you can find on the main dashboard) as of block 729,131 in March 2022. Projected blocks are on the left, and confirmed blocks are on the right.
"
+ answer: "
A mempool explorer is a tool that enables you to view real-time and historical information about a node's mempool, visualize its transactions, and search and view those transactions.
The mempool.space website invented the concept of visualizing a Bitcoin node's mempool as projected blocks. These blocks are the inspiration for our half-filled block logo.
Here's a snapshot of this visualization (which you can find on the main dashboard) as of block 729,556 in March 2022. Projected blocks are on the left of the dotted white line, and confirmed blocks are on the right.
"
},
{
type: "endpoint",
@@ -4457,7 +4457,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "what-is-mining",
title: "What is mining?",
- answer: "Mining is the process by which unconfirmed transactions are confirmed. Miners select unconfirmed transactions from their mempools and arrange them into a block such that they solve a particular math problem.
The first miner on the network that finds a suitable block gets all the transaction fees from the transactions in that block. As a result, miners tend to prioritize transactions with higher transaction fees.
"
+ answer: "Mining is the process by which unconfirmed transactions in a mempool are confirmed into a block on a blockchain. Miners select unconfirmed transactions from their mempools and arrange them into a block such that they solve a particular math problem.
The first miner on the network to find a suitable block earns all the transaction fees from the transactions in that block. As a result, miners tend to prioritize transactions with higher transaction fees.
"
},
{
type: "endpoint",
@@ -4478,9 +4478,9 @@ export const faqData = [
type: "endpoint",
category: "help",
showConditions: bitcoinNetworks,
- fragment: "why-is-transaction-stuck-in-the-mempool",
+ fragment: "why-is-transaction-stuck-in-mempool",
title: "Why is my transaction stuck in the mempool?",
- answer: "
Miners decide which transactions are included in the blocks they mine, so they usually prioritize transactions which pay them the highest transaction fees (transaction fees are measured in sats per virtual byte, or sat/vB). If your transcation is stuck in the mempool, your transaction probably has a lower transaction fee relative to other transactions currently in the mempool.
"
+ answer: "
Miners decide which transactions are included in the blocks they mine, so they usually prioritize transactions which pay them the highest transaction fees (transaction fees are measured in sats per virtual byte, or sat/vB). If it's been a while and your transcation hasn't been confirmed, your transaction probably has a lower transaction fee relative to other transactions currently in the mempool.
"
},
{
type: "endpoint",
@@ -4494,7 +4494,7 @@ export const faqData = [
type: "endpoint",
category: "help",
showConditions: bitcoinNetworks,
- fragment: "how-prevent-stuck-transaction-in-future",
+ fragment: "how-prevent-stuck-transaction",
title: "How can I prevent a transaction from getting stuck in the future?",
answer: "
You must use an adequate transaction fee commensurate with how quickly you need the transaction to be confirmed. Also consider using RBF if your wallet supports it so that you can bump the fee rate if needed.
"
},
@@ -4511,7 +4511,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "looking-up-transactions",
title: "How can I look up a transaction?",
- answer: "Because reasons."
+ answer: "Search for the transaction ID in the search box at the top-right of this website."
},
{
type: "endpoint",
@@ -4519,7 +4519,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "looking-up-addresses",
title: "How can I look up an address?",
- answer: "Because reasons."
+ answer: "Search for the address in the search box at the top-right of this website."
},
{
type: "endpoint",
@@ -4527,7 +4527,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "looking-up-blocks",
title: "How can I look up a block?",
- answer: "Because reasons."
+ answer: "Search for the block number (or block hash) in the search box at the top-right of this website."
},
{
type: "endpoint",
@@ -4535,7 +4535,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "looking-up-fee-estimates",
title: "How can I look up fee estimates?",
- answer: "Because reasons."
+ answer: "
Low priority is suggested for confirmation within 6 blocks (~1 hour), Medium priority is suggested for confirmation within 3 blocks (~30 minutes), and High priority is suggested for confirmation in the next block (~10 minutes).
"
},
{
type: "endpoint",
@@ -4543,7 +4543,7 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "looking-up-historical-trends",
title: "How can I explore historical trends?",
- answer: "Because reasons."
+ answer: "See the graphs page for aggregate trends over time: mempool size over time and incoming transaction velocity over time."
},
{
type: "category",
@@ -4558,21 +4558,21 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "who-runs-this-website",
title: "Who runs this website?",
- answer: "The official mempool.space website is operated by The Mempool Open Source Project. See more information on our About page. There are also many unofficial instances of this website operated by individual members of the Bitcoin community."
+ answer: "The official mempool.space website is operated by The Mempool Open Source Project. See more information on our About page. There are also many unofficial instances of this website operated by individual members of the Bitcoin community."
},
{
type: "endpoint",
category: "advanced",
showConditions: bitcoinNetworks,
- fragment: "host-my-own-instance-on-raspberry-pi",
+ fragment: "host-my-own-instance-raspberry-pi",
title: "How can I host my own instance on a Raspberry Pi?",
- answer: "We support one-click installation on a number of Raspberry Pi fullnode distros including Umbrel, RaspiBlitz, MyNode, and RoninDojo."
+ answer: "We support one-click installation on a number of Raspberry Pi full-node distros including Umbrel, RaspiBlitz, MyNode, and RoninDojo."
},
{
type: "endpoint",
category: "advanced",
showConditions: bitcoinNetworks,
- fragment: "host-my-own-instance-on-linux-server",
+ fragment: "host-my-own-instance-linux-server",
title: "How can I host my own instance on a Linux server?",
answer: "You can manually install mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments."
},
diff --git a/frontend/src/app/components/docs/api-docs.component.html b/frontend/src/app/components/docs/api-docs.component.html
index e213d6a62..f33c777c9 100644
--- a/frontend/src/app/components/docs/api-docs.component.html
+++ b/frontend/src/app/components/docs/api-docs.component.html
@@ -9,12 +9,12 @@
-
+
{{ item.title }}
-
{{ item.title }}
{{ item.category }}
+
{{ item.title }}
{{ item.category }}
-
+
@@ -33,10 +33,10 @@
Reference for the {{ network.val === '' ? 'Bitcoin' : network.val.charAt(0).toUpperCase() + network.val.slice(1) }} API service.
A mempool explorer is a tool that enables you to view real-time and historical information about a node's mempool, visualize its transactions, and search and view those transactions.
The mempool.space website invented the concept of visualizing a Bitcoin node's mempool as projected blocks. These blocks are the inspiration for our half-filled block logo.
Here's a snapshot of this visualization (which you can find on the main dashboard) as of block 729,556 in March 2022. Projected blocks are on the left of the dotted white line, and confirmed blocks are on the right.
"
+ answer: "
A mempool explorer is a tool that enables you to view real-time and historical information about a node's mempool, visualize its transactions, and search and view those transactions.
The mempool.space website invented the concept of visualizing a Bitcoin node's mempool as projected blocks. These blocks are the inspiration for our half-filled block logo.
Projected blocks are on the left of the dotted white line, and confirmed blocks are on the right.