diff --git a/backend/src/api/common.ts b/backend/src/api/common.ts index 4ca0e50d1..45a3eb19b 100644 --- a/backend/src/api/common.ts +++ b/backend/src/api/common.ts @@ -245,6 +245,8 @@ export class Common { flags |= TransactionFlags.v1; } else if (tx.version === 2) { flags |= TransactionFlags.v2; + } else if (tx.version === 3) { + flags |= TransactionFlags.v3; } const reusedInputAddresses: { [address: string ]: number } = {}; const reusedOutputAddresses: { [address: string ]: number } = {}; diff --git a/backend/src/mempool.interfaces.ts b/backend/src/mempool.interfaces.ts index 71612f25f..114e0ab88 100644 --- a/backend/src/mempool.interfaces.ts +++ b/backend/src/mempool.interfaces.ts @@ -208,6 +208,7 @@ export const TransactionFlags = { no_rbf: 0b00000010n, v1: 0b00000100n, v2: 0b00001000n, + v3: 0b00010000n, // address types p2pk: 0b00000001_00000000n, p2ms: 0b00000010_00000000n, diff --git a/frontend/src/app/components/block-overview-graph/tx-view.ts b/frontend/src/app/components/block-overview-graph/tx-view.ts index da36b9880..f422e2cbe 100644 --- a/frontend/src/app/components/block-overview-graph/tx-view.ts +++ b/frontend/src/app/components/block-overview-graph/tx-view.ts @@ -4,6 +4,7 @@ import { SpriteUpdateParams, Square, Color, ViewUpdateParams } from './sprite-ty import { hexToColor } from './utils'; import BlockScene from './block-scene'; import { TransactionStripped } from '../../interfaces/node-api.interface'; +import { TransactionFlags } from '../../shared/filters.utils'; const hoverTransitionTime = 300; const defaultHoverColor = hexToColor('1bd8f4'); @@ -58,7 +59,7 @@ export default class TxView implements TransactionStripped { this.acc = tx.acc; this.rate = tx.rate; this.status = tx.status; - this.bigintFlags = tx.flags ? BigInt(tx.flags) : 0n; + this.bigintFlags = tx.flags ? (BigInt(tx.flags) ^ (this.acc ? TransactionFlags.acceleration : 0n)): 0n; this.initialised = false; this.vertexArray = scene.vertexArray; diff --git a/frontend/src/app/components/liquid-reserves-audit/federation-addresses-list/federation-addresses-list.component.html b/frontend/src/app/components/liquid-reserves-audit/federation-addresses-list/federation-addresses-list.component.html index 0a37b1d13..61de92e5d 100644 --- a/frontend/src/app/components/liquid-reserves-audit/federation-addresses-list/federation-addresses-list.component.html +++ b/frontend/src/app/components/liquid-reserves-audit/federation-addresses-list/federation-addresses-list.component.html @@ -1,4 +1,4 @@ -
:last_seen_txid
(see below)."
+ default: "Get transaction history for the specified address/scripthash, sorted with newest first. Returns up to 50 mempool transactions plus the first 25 confirmed transactions. You can request more confirmed transactions using an after_txid
query parameter."
},
urlString: "/address/:address/txs",
showConditions: bitcoinNetworks.concat(liquidNetworks),
@@ -10070,8 +10070,7 @@ export const restApiDocsData = [
"id": 89,
"user_id": 1,
"txid": "ae2639469ec000ed1d14e2550cbb01794e1cd288a00cdc7cce18398ba3cc2ffe",
- "status": "failed",
- "estimated_fee": 247,
+ "status": "failed"
"fee_paid": 0,
"added": 1706378712,
"last_updated": 1706378712,
@@ -10100,8 +10099,7 @@ export const restApiDocsData = [
"id": 88,
"user_id": 1,
"txid": "c5840e89173331760e959a190b24e2a289121277ed7f8a095fe289b37cee9fde",
- "status": "completed",
- "estimated_fee": 223,
+ "status": "completed"
"fee_paid": 140019,
"added": 1706378704,
"last_updated": 1706380231,
@@ -10130,8 +10128,7 @@ export const restApiDocsData = [
"id": 87,
"user_id": 1,
"txid": "178b5b9b310f0d667d7ea563a2cdcc17bc8cd15261b58b1653860a724ca83458",
- "status": "completed",
- "estimated_fee": 115,
+ "status": "completed"
"fee_paid": 90062,
"added": 1706378684,
"last_updated": 1706380231,
diff --git a/frontend/src/app/shared/filters.utils.ts b/frontend/src/app/shared/filters.utils.ts
index 3930dc8ca..1e55c495b 100644
--- a/frontend/src/app/shared/filters.utils.ts
+++ b/frontend/src/app/shared/filters.utils.ts
@@ -21,7 +21,7 @@ export const TransactionFlags = {
no_rbf: 0b00000010n,
v1: 0b00000100n,
v2: 0b00001000n,
- multisig: 0b00010000n,
+ v3: 0b00010000n,
// address types
p2pk: 0b00000001_00000000n,
p2ms: 0b00000010_00000000n,
@@ -34,6 +34,7 @@ export const TransactionFlags = {
cpfp_parent: 0b00000001_00000000_00000000n,
cpfp_child: 0b00000010_00000000_00000000n,
replacement: 0b00000100_00000000_00000000n,
+ acceleration: 0b00001000_00000000_00000000n,
// data
op_return: 0b00000001_00000000_00000000_00000000n,
fake_pubkey: 0b00000010_00000000_00000000_00000000n,
@@ -64,7 +65,7 @@ export const TransactionFilters: { [key: string]: Filter } = {
no_rbf: { key: 'no_rbf', label: 'RBF disabled', flag: TransactionFlags.no_rbf, toggle: 'rbf', important: true },
v1: { key: 'v1', label: 'Version 1', flag: TransactionFlags.v1, toggle: 'version' },
v2: { key: 'v2', label: 'Version 2', flag: TransactionFlags.v2, toggle: 'version' },
- // multisig: { key: 'multisig', label: 'Multisig', flag: TransactionFlags.multisig },
+ v3: { key: 'v3', label: 'Version 3', flag: TransactionFlags.v3, toggle: 'version' },
/* address types */
p2pk: { key: 'p2pk', label: 'P2PK', flag: TransactionFlags.p2pk, important: true },
p2ms: { key: 'p2ms', label: 'Bare multisig', flag: TransactionFlags.p2ms, important: true },
@@ -77,6 +78,7 @@ export const TransactionFilters: { [key: string]: Filter } = {
cpfp_parent: { key: 'cpfp_parent', label: 'Paid for by child', flag: TransactionFlags.cpfp_parent, important: true },
cpfp_child: { key: 'cpfp_child', label: 'Pays for parent', flag: TransactionFlags.cpfp_child, important: true },
replacement: { key: 'replacement', label: 'Replacement', flag: TransactionFlags.replacement, important: true },
+ acceleration: window?.['__env']?.ACCELERATOR ? { key: 'acceleration', label: 'Accelerated', flag: TransactionFlags.acceleration, important: false } : undefined,
/* data */
op_return: { key: 'op_return', label: 'OP_RETURN', flag: TransactionFlags.op_return, important: true },
fake_pubkey: { key: 'fake_pubkey', label: 'Fake pubkey', flag: TransactionFlags.fake_pubkey },
@@ -94,9 +96,9 @@ export const TransactionFilters: { [key: string]: Filter } = {
};
export const FilterGroups: { label: string, filters: Filter[]}[] = [
- { label: 'Features', filters: ['rbf', 'no_rbf', 'v1', 'v2', 'multisig'] },
+ { label: 'Features', filters: ['rbf', 'no_rbf', 'v1', 'v2', 'v3'] },
{ label: 'Address Types', filters: ['p2pk', 'p2ms', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh', 'p2tr'] },
- { label: 'Behavior', filters: ['cpfp_parent', 'cpfp_child', 'replacement'] },
+ { label: 'Behavior', filters: ['cpfp_parent', 'cpfp_child', 'replacement', 'acceleration'] },
{ label: 'Data', filters: ['op_return', 'fake_pubkey', 'inscription'] },
{ label: 'Heuristics', filters: ['coinjoin', 'consolidation', 'batch_payout'] },
{ label: 'Sighash Flags', filters: ['sighash_all', 'sighash_none', 'sighash_single', 'sighash_default', 'sighash_acp'] },
diff --git a/production/nginx/http-acl.conf b/production/nginx/http-acl.conf
new file mode 100644
index 000000000..9fa2d6493
--- /dev/null
+++ b/production/nginx/http-acl.conf
@@ -0,0 +1,6 @@
+# used for "internal" API restriction
+geo $remote_addr $mempool_external {
+ 127.0.0.1 '';
+ ::1 '';
+ default 1;
+}
diff --git a/production/nginx/location-api.conf b/production/nginx/location-api.conf
index bee4ce50d..49bda31a4 100644
--- a/production/nginx/location-api.conf
+++ b/production/nginx/location-api.conf
@@ -4,10 +4,17 @@
# Block the internal APIs of esplora
location /api/internal/ {
- return 403;
+ if ($mempool_external) {
+ return 403;
+ }
+ rewrite ^/api/(.*) /$1 break;
+ try_files /dev/null @esplora-api-cache-disabled;
}
location /api/v1/internal/ {
- return 403;
+ if ($mempool_external) {
+ return 403;
+ }
+ try_files /dev/null @mempool-api-v1-cache-normal;
}
# websocket has special HTTP headers
diff --git a/production/nginx/nginx.conf b/production/nginx/nginx.conf
index c08005d14..3646dd316 100644
--- a/production/nginx/nginx.conf
+++ b/production/nginx/nginx.conf
@@ -19,6 +19,7 @@ http {
# HTTP basic configuration
include mempool/production/nginx/http-basic.conf;
+ include mempool/production/nginx/http-acl.conf;
include mempool/production/nginx/http-proxy-cache.conf;
include mempool/production/nginx/http-language.conf;