Merge branch 'mempool:master' into tooltip-overflow-bug
This commit is contained in:
commit
643402c046
@ -9,7 +9,7 @@ class Audit {
|
|||||||
auditBlock(transactions: MempoolTransactionExtended[], projectedBlocks: MempoolBlockWithTransactions[], mempool: { [txId: string]: MempoolTransactionExtended }, useAccelerations: boolean = false)
|
auditBlock(transactions: MempoolTransactionExtended[], projectedBlocks: MempoolBlockWithTransactions[], mempool: { [txId: string]: MempoolTransactionExtended }, useAccelerations: boolean = false)
|
||||||
: { censored: string[], added: string[], fresh: string[], sigop: string[], fullrbf: string[], accelerated: string[], score: number, similarity: number } {
|
: { censored: string[], added: string[], fresh: string[], sigop: string[], fullrbf: string[], accelerated: string[], score: number, similarity: number } {
|
||||||
if (!projectedBlocks?.[0]?.transactionIds || !mempool) {
|
if (!projectedBlocks?.[0]?.transactionIds || !mempool) {
|
||||||
return { censored: [], added: [], fresh: [], sigop: [], fullrbf: [], accelerated: [], score: 0, similarity: 1 };
|
return { censored: [], added: [], fresh: [], sigop: [], fullrbf: [], accelerated: [], score: 1, similarity: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
const matches: string[] = []; // present in both mined block and template
|
const matches: string[] = []; // present in both mined block and template
|
||||||
@ -144,7 +144,12 @@ class Audit {
|
|||||||
|
|
||||||
const numCensored = Object.keys(isCensored).length;
|
const numCensored = Object.keys(isCensored).length;
|
||||||
const numMatches = matches.length - 1; // adjust for coinbase tx
|
const numMatches = matches.length - 1; // adjust for coinbase tx
|
||||||
const score = numMatches > 0 ? (numMatches / (numMatches + numCensored)) : 0;
|
let score = 0;
|
||||||
|
if (numMatches <= 0 && numCensored <= 0) {
|
||||||
|
score = 1;
|
||||||
|
} else if (numMatches > 0) {
|
||||||
|
score = (numMatches / (numMatches + numCensored));
|
||||||
|
}
|
||||||
const similarity = projectedWeight ? matchedWeight / projectedWeight : 1;
|
const similarity = projectedWeight ? matchedWeight / projectedWeight : 1;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -36,14 +36,14 @@
|
|||||||
<div id="become-sponsor-container">
|
<div id="become-sponsor-container">
|
||||||
<div class="become-sponsor community">
|
<div class="become-sponsor community">
|
||||||
<p style="font-weight: 700; font-size: 18px;">If you're an individual...</p>
|
<p style="font-weight: 700; font-size: 18px;">If you're an individual...</p>
|
||||||
<a href="/sponsor" class="btn" style="background-color: rgba(152, 88, 255, 0.75); box-shadow: 0px 0px 50px 5px rgba(152, 88, 255, 0.75)" i18n="about.community-sponsor-button">Become a Community Sponsor</a>
|
<a href="https://mempool.space/sponsor" class="btn" style="background-color: rgba(152, 88, 255, 0.75); box-shadow: 0px 0px 50px 5px rgba(152, 88, 255, 0.75)" i18n="about.community-sponsor-button">Become a Community Sponsor</a>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Exclusive swag</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Exclusive swag</p>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Your avatar on the About page</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Your avatar on the About page</p>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> And more coming soon :)</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> And more coming soon :)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="become-sponsor enterprise">
|
<div class="become-sponsor enterprise">
|
||||||
<p style="font-weight: 700; font-size: 18px;">If you're a business...</p>
|
<p style="font-weight: 700; font-size: 18px;">If you're a business...</p>
|
||||||
<a href="/enterprise" class="btn" style="background-color: rgba(152, 88, 255, 0.75); box-shadow: 0px 0px 50px 5px rgba(152, 88, 255, 0.75)" i18n="about.enterprise-sponsor-button">Become an Enterprise Sponsor</a>
|
<a href="https://mempool.space/enterprise" class="btn" style="background-color: rgba(152, 88, 255, 0.75); box-shadow: 0px 0px 50px 5px rgba(152, 88, 255, 0.75)" i18n="about.enterprise-sponsor-button">Become an Enterprise Sponsor</a>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Increased API limits</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Increased API limits</p>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Co-branded instance</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> Co-branded instance</p>
|
||||||
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> 99% service-level agreement</p>
|
<p class="sponsor-feature"><fa-icon [icon]="['fas', 'check']"></fa-icon> 99% service-level agreement</p>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
|
<span id="successAlert" class="m-0 p-0 d-block" style="height: 1px;"></span>
|
||||||
<div class="row" *ngIf="showSuccess">
|
<div class="row" *ngIf="showSuccess">
|
||||||
<div class="col" id="successAlert">
|
<div class="col">
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
Transaction has now been <a class="alert-link" routerLink="/services/accelerator/history">submitted</a> to mining pools for acceleration.
|
Transaction has now been <a class="alert-link" routerLink="/services/accelerator/history">submitted</a> to mining pools for acceleration.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<span id="mempoolError" class="m-0 p-0 d-block" style="height: 1px;"></span>
|
||||||
<div class="row" *ngIf="error">
|
<div class="row" *ngIf="error">
|
||||||
<div class="col" id="mempoolError">
|
<div class="col">
|
||||||
<app-mempool-error [error]="error"></app-mempool-error>
|
<app-mempool-error [error]="error" [alertClass]="error === 'waitlisted' ? 'alert-mempool' : 'alert-danger'"></app-mempool-error>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -37,10 +39,10 @@
|
|||||||
<td class="item">
|
<td class="item">
|
||||||
Virtual size
|
Virtual size
|
||||||
</td>
|
</td>
|
||||||
<td class="units" [innerHTML]="'‎' + (estimate.txSummary.effectiveVsize | vbytes: 2)"></td>
|
<td style="text-align: end;" [innerHTML]="'‎' + (estimate.txSummary.effectiveVsize | vbytes: 2)"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="info">
|
<tr class="info">
|
||||||
<td class="info">
|
<td class="info" colspan=3>
|
||||||
<i><small>Size in vbytes of this transaction<span *ngIf="hasAncestors"> and its unconfirmed ancestors</span></small></i>
|
<i><small>Size in vbytes of this transaction<span *ngIf="hasAncestors"> and its unconfirmed ancestors</span></small></i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -48,12 +50,12 @@
|
|||||||
<td class="item">
|
<td class="item">
|
||||||
In-band fees
|
In-band fees
|
||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td style="text-align: end;">
|
||||||
{{ estimate.txSummary.effectiveFee | number : '1.0-0' }} <span class="symbol" i18n="shared.sats|sats">sats</span>
|
{{ estimate.txSummary.effectiveFee | number : '1.0-0' }} <span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="info group-last">
|
<tr class="info group-last">
|
||||||
<td class="info">
|
<td class="info" colspan=3>
|
||||||
<i><small>Fees already paid by this transaction<span *ngIf="hasAncestors"> and its unconfirmed ancestors</span></small></i>
|
<i><small>Fees already paid by this transaction<span *ngIf="hasAncestors"> and its unconfirmed ancestors</span></small></i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -95,7 +97,7 @@
|
|||||||
<td class="item">
|
<td class="item">
|
||||||
Next block market rate
|
Next block market rate
|
||||||
</td>
|
</td>
|
||||||
<td class="amt" style="font-size: 20px">
|
<td class="amt" style="font-size: 16px">
|
||||||
{{ estimate.targetFeeRate | number : '1.0-0' }}
|
{{ estimate.targetFeeRate | number : '1.0-0' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="units"><span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></td>
|
<td class="units"><span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></td>
|
||||||
@ -109,7 +111,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat"><app-fiat [value]="math.max(0, estimate.nextBlockFee - estimate.txSummary.effectiveFee)"></app-fiat></span>
|
<span class="fiat ml-1"><app-fiat [value]="math.max(0, estimate.nextBlockFee - estimate.txSummary.effectiveFee)"></app-fiat></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@ -129,7 +131,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat"><app-fiat [value]="estimate.mempoolBaseFee"></app-fiat></span>
|
<span class="fiat ml-1"><app-fiat [value]="estimate.mempoolBaseFee"></app-fiat></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="info group-last">
|
<tr class="info group-last">
|
||||||
@ -141,7 +143,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat"><app-fiat [value]="estimate.vsizeFee"></app-fiat></span>
|
<span class="fiat ml-1"><app-fiat [value]="estimate.vsizeFee"></app-fiat></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -158,11 +160,11 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat"><app-fiat [value]="estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee"></app-fiat></span>
|
<span class="fiat ml-1"><app-fiat [value]="estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee"></app-fiat></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="info group-last" style="border-bottom: 1px solid lightgrey">
|
<tr class="info group-last" style="border-bottom: 1px solid lightgrey">
|
||||||
<td class="info">
|
<td class="info" colspan=3>
|
||||||
<i><small>If your tx is accelerated to </small><small>{{ estimate.targetFeeRate | number : '1.0-0' }} <span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></small></i>
|
<i><small>If your tx is accelerated to </small><small>{{ estimate.targetFeeRate | number : '1.0-0' }} <span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></small></i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -181,13 +183,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat">
|
<span class="fiat ml-1">
|
||||||
<app-fiat [value]="maxCost" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat>
|
<app-fiat [value]="maxCost" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="info group-last">
|
<tr class="info group-last">
|
||||||
<td class="info">
|
<td class="info" colspan=3>
|
||||||
<i><small>If your tx is accelerated to </small><small>~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} <span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></small></i>
|
<i><small>If your tx is accelerated to </small><small>~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} <span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></small></i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -204,7 +206,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="units">
|
<td class="units">
|
||||||
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
<span class="symbol" i18n="shared.sats|sats">sats</span>
|
||||||
<span class="fiat">
|
<span class="fiat ml-1">
|
||||||
<app-fiat [value]="estimate.userBalance" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat>
|
<app-fiat [value]="estimate.userBalance" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.fee {
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
.rate {
|
.rate {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
.symbol {
|
.symbol {
|
||||||
@ -64,8 +61,6 @@
|
|||||||
|
|
||||||
.table-accelerator {
|
.table-accelerator {
|
||||||
tr {
|
tr {
|
||||||
text-wrap: wrap;
|
|
||||||
|
|
||||||
td {
|
td {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
@ -89,6 +84,7 @@
|
|||||||
}
|
}
|
||||||
&.info {
|
&.info {
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
|
white-space: initial;
|
||||||
}
|
}
|
||||||
&.amt {
|
&.amt {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@ -97,6 +93,9 @@
|
|||||||
&.units {
|
&.units {
|
||||||
padding-left: 0.2em;
|
padding-left: 0.2em;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,4 +105,8 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
white-space: initial;
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener } from '@angular/core';
|
import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener, ChangeDetectorRef } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { ApiService } from '../../services/api.service';
|
import { ApiService } from '../../services/api.service';
|
||||||
import { Subscription, catchError, of, tap } from 'rxjs';
|
import { Subscription, catchError, of, tap } from 'rxjs';
|
||||||
import { StorageService } from '../../services/storage.service';
|
import { StorageService } from '../../services/storage.service';
|
||||||
@ -63,7 +62,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
|
|||||||
constructor(
|
constructor(
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private storageService: StorageService,
|
private storageService: StorageService,
|
||||||
private router: Router,
|
private cd: ChangeDetectorRef
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
@ -163,13 +162,14 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
|
|||||||
scrollToPreview(id: string, position: ScrollLogicalPosition) {
|
scrollToPreview(id: string, position: ScrollLogicalPosition) {
|
||||||
const acceleratePreviewAnchor = document.getElementById(id);
|
const acceleratePreviewAnchor = document.getElementById(id);
|
||||||
if (acceleratePreviewAnchor) {
|
if (acceleratePreviewAnchor) {
|
||||||
|
this.cd.markForCheck();
|
||||||
acceleratePreviewAnchor.scrollIntoView({
|
acceleratePreviewAnchor.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
inline: position,
|
inline: position,
|
||||||
block: position,
|
block: position,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send acceleration request
|
* Send acceleration request
|
||||||
|
@ -244,10 +244,9 @@ main {
|
|||||||
.sidenav {
|
.sidenav {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
width: 225px;
|
width: 0px;
|
||||||
height: calc(100vh - 65px);
|
height: calc(100vh - 65px);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 65px;
|
top: 65px;
|
||||||
margin-left: -225px;
|
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
display: block;
|
display: block;
|
||||||
|
background-color: #1d1f31;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidenav a, button{
|
.sidenav a, button{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<h2>Privacy Policy</h2>
|
<h2>Privacy Policy</h2>
|
||||||
<h6>Updated: November 18, 2021</h6>
|
<h6>Updated: November 23, 2023</h6>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<li>If you provide your e-mail address, we may contact you regarding your account, billing purposess, or to update you about our services. We will not share this with any third-party.</li>
|
<li>If you provide your name, country, and/or e-mail address, we may use this information to manage your user account, for billing purposes, or to update you about our services. We will not share this with any third-party, except as detailed below if you sponsor The Mempool Open Source Project®, purchase a subscription to Mempool Enterprise®, or accelerate transactions using Mempool Accelerator™.</li>
|
||||||
|
|
||||||
<li>If you connect your Twitter account, we may store your Twitter identity, e-mail address, and profile photo. We may publicly display your profile photo or link to your profile on our website, if you sponsor The Mempool Open Source Project, claim your Lightning node, or other such use cases.</li>
|
<li>If you connect your Twitter account, we may store your Twitter identity, e-mail address, and profile photo. We may publicly display your profile photo or link to your profile on our website, if you sponsor The Mempool Open Source Project, claim your Lightning node, or other such use cases.</li>
|
||||||
|
|
||||||
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
<li>If you make a Bitcoin or Liquid payment, we will process your payment using our self-hosted BTCPay Server instance and not share these details with any third-party.</li>
|
<li>If you make a Bitcoin or Liquid payment, we will process your payment using our self-hosted BTCPay Server instance and not share these details with any third-party.</li>
|
||||||
|
|
||||||
<li>If you accelerate transactions using Mempool Accelerator(tm), we will store the TXID of your transactions you accelerate with us. We share this information with our mining pool partners, as well as publicly display accelerated transaction details on our website and APIs.</li>
|
<li>If you accelerate transactions using Mempool Accelerator™, we will store the TXID of your transactions you accelerate with us. We share this information with our mining pool partners, as well as publicly display accelerated transaction details on our website and APIs.</li>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
<div class="alert alert-danger" [innerHTML]="errorContent">
|
<div class="alert" [class]="alertClass" [innerHTML]="errorContent">
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,6 +33,7 @@ export function isMempoolError(error: string) {
|
|||||||
})
|
})
|
||||||
export class MempoolErrorComponent implements OnInit {
|
export class MempoolErrorComponent implements OnInit {
|
||||||
@Input() error: string;
|
@Input() error: string;
|
||||||
|
@Input() alertClass = 'alert-danger';
|
||||||
errorContent: SafeHtml;
|
errorContent: SafeHtml;
|
||||||
|
|
||||||
constructor(private sanitizer: DomSanitizer) { }
|
constructor(private sanitizer: DomSanitizer) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user