Merge branch 'master' into nymkappa/accel-dashboard-cleanup
This commit is contained in:
		
						commit
						cc06f85e73
					
				| @ -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 } = {}; | ||||
|  | ||||
| @ -208,6 +208,7 @@ export const TransactionFlags = { | ||||
|   no_rbf:                                                      0b00000010n, | ||||
|   v1:                                                          0b00000100n, | ||||
|   v2:                                                          0b00001000n, | ||||
|   v3:                                                          0b00010000n, | ||||
|   // address types
 | ||||
|   p2pk:                                               0b00000001_00000000n, | ||||
|   p2ms:                                               0b00000010_00000000n, | ||||
|  | ||||
| @ -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; | ||||
| 
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| <div [ngClass]="{'widget': widget}"> | ||||
| <div [ngClass]="{'widget': widget, 'extra-margin-right': widget}"> | ||||
| 
 | ||||
|   <div class="clearfix"></div> | ||||
| 
 | ||||
|  | ||||
| @ -4,6 +4,12 @@ | ||||
|   margin-top: 13px; | ||||
| } | ||||
| 
 | ||||
| .extra-margin-right { | ||||
|   @media (max-width: 380px) { | ||||
|     margin-left: -10px; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| tr, td, th { | ||||
|   border: 0px; | ||||
|   padding-top: 0.65rem; | ||||
|  | ||||
| @ -31,7 +31,7 @@ tr, td, th { | ||||
| } | ||||
| 
 | ||||
| .transaction { | ||||
|   width: 20%; | ||||
|   width: 65%; | ||||
|   overflow: hidden; | ||||
|   text-overflow: ellipsis; | ||||
|   white-space: nowrap; | ||||
| @ -57,7 +57,7 @@ tr, td, th { | ||||
| } | ||||
| 
 | ||||
| .output { | ||||
|   width: 20%; | ||||
|   width: 50%; | ||||
|   overflow: hidden; | ||||
|   text-overflow: ellipsis; | ||||
|   white-space: nowrap; | ||||
|  | ||||
| @ -427,6 +427,7 @@ | ||||
| 
 | ||||
| .card-title-liquid { | ||||
|   padding-top: 20px; | ||||
|   margin-left: 10px; | ||||
| } | ||||
| 
 | ||||
| .in-progress-message { | ||||
|  | ||||
| @ -1017,7 +1017,7 @@ export const restApiDocsData = [ | ||||
|     fragment: "get-address-transactions", | ||||
|     title: "GET Address Transactions", | ||||
|     description: { | ||||
|       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 <code>:last_seen_txid</code> (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 <code>after_txid</code> 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, | ||||
|  | ||||
| @ -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'] }, | ||||
|  | ||||
							
								
								
									
										6
									
								
								production/nginx/http-acl.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								production/nginx/http-acl.conf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| # used for "internal" API restriction | ||||
| geo $remote_addr $mempool_external { | ||||
| 	127.0.0.1	''; | ||||
| 	::1		''; | ||||
| 	default		1; | ||||
| } | ||||
| @ -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 | ||||
|  | ||||
| @ -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; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user