diff --git a/contributors/Arooba-git.txt b/contributors/Arooba-git.txt new file mode 100644 index 000000000..833d78ff4 --- /dev/null +++ b/contributors/Arooba-git.txt @@ -0,0 +1,3 @@ +I hereby accept the terms of the Contributor License Agreement in the CONTRIBUTING.md file of the mempool/mempool git repository as of January 25, 2022. + +Signed: Arooba-git \ No newline at end of file diff --git a/frontend/src/app/components/start/start.component.ts b/frontend/src/app/components/start/start.component.ts index d29372d97..ff66e7b97 100644 --- a/frontend/src/app/components/start/start.component.ts +++ b/frontend/src/app/components/start/start.component.ts @@ -298,6 +298,10 @@ export class StartComponent implements OnInit, OnDestroy { } ngOnDestroy() { + if (this.blockchainContainer?.nativeElement) { + // clean up scroll position to prevent caching wrong scroll in Firefox + this.blockchainContainer.nativeElement.scrollLeft = 0; + } this.timeLtrSubscription.unsubscribe(); this.chainTipSubscription.unsubscribe(); this.markBlockSubscription.unsubscribe(); diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index f4b4602ad..5cc5ca3aa 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -8671,6 +8671,15 @@ export const faqData = [ type: "endpoint", category: "advanced", showConditions: bitcoinNetworks, + options: { officialOnly: true }, + fragment: "how-do-block-audits-work", + title: "How do block audits work?", + }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + options: { officialOnly: true }, fragment: "what-is-block-health", title: "What is block health?", }, diff --git a/frontend/src/app/docs/api-docs/api-docs-nav.component.html b/frontend/src/app/docs/api-docs/api-docs-nav.component.html index c8460ada4..3abdc91be 100644 --- a/frontend/src/app/docs/api-docs/api-docs-nav.component.html +++ b/frontend/src/app/docs/api-docs/api-docs-nav.component.html @@ -1,4 +1,4 @@
-1 )">{{ item.title }}
- -1 )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }} + -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ) )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }}{{ item.title }} | {{ item.category }} |
For unconfirmed CPFP transactions, Mempool will show the effective feerate (along with descendent & ancestor transaction information) on the transaction page. For confirmed transactions, CPFP relationships are not stored, so this additional information is not shown.
+A block audit visually compares Mempool's expected block to the actual block for a particular block height.
+How is the expected block determined? Mempool monitors its view of the mempool and runs a re-implementation of Bitcoin Core's transaction selection algorithm to determine the transactions it expects to see in upcoming blocks (source code here). Since there is a continual flow of new transactions, this algorithm runs every 2 seconds, and as a result, you will see the transactions projected to be in upcoming blocks change in near real-time.
+At the moment a new block is mined, Mempool saves a snapshot of its projected block template for the next block. We call this snapshot the expected block for the block height in question, and it serves as the basis for the block audit.
+When details for an expected block and actual block are available, we can compare them. The purpose of block audits is to deduce when miners intentionally include or exclude transactions from blocks they mine. Since this information cannot be precisely known, Mempool uses a handful of heuristics to accomplish this.
+Block audits highlight transactions in different colors to convey these heuristics:
+Added
A transaction is highlighted blue if it is not present in the expected block, present in the actual block, and also either:
+Added transactions do not negatively affect block health.
Recently broadcasted
A transaction is highlighted dark pink if it is present in the expected block, not present in the actual block, and was first seen by Mempool's Bitcoin node within 3 minutes of the block being mined.
Due to network latency and other factors, it can take time for a miner's Bitcoin nodes to receive a transaction, so we do not assume a miner has intentionally excluded such a transaction from a block.
Recently-broadcasted transactions do not negatively affect block health.
Marginal fee
+ A transaction is darkened if it is in the low end of the expected feerate range and missing in either the expected block or the actual block.
Such a transaction may have been displaced by an added transaction, or it may have been displaced by another transaction from the mempool that was also at the low end of the expected feerate range for the block. In either case, the deviation is not considered notable.
+Marginal fee transactions do not negatively affect block health.
Removed
A transaction is highlighted bright pink if it is present in the expected block, not present in the actual block, and qualifies as neither recently-broadcasted nor marginal-fee. In other words, it has been in the mempool long enough to be widely propagated and has a feerate that is well within the range expected for the block. There is a chance such a transaction may have been intentionally excluded from the block.
Removed transactions do negatively affect block health.
See how results of the block audit are used to devise the block health score below.
+Because of this feature's resource usage and availability requirements, it is only supported on official mempool.space instances.
+Block health indicates the extent of potential censorship in a block. This is determined by counting how many expected transactions a block is missing—a block that is not missing any expected transactions will have 100% health, while a block missing 1 or more expected transactions will have sub-100% health.
-How does this work? Let sexpected be the set of all transactions Mempool expected to be in a block and let sactual be the set of all transactions actually in a block. Let n be the number of all transactions in both sexpected and sactual.
-Then let r be the number of removed transactions—all transactions expected to be in sactual but not actually in it (excluding those that have been recently broadcast; see below).
+Block health is a measure of how many transactions appear to be intentionally excluded from a block—a block without any transactions that appear intentionally excluded will have 100% health, while a block with 1 or more transactions that appear intentionally excluded will have sub-100% health.
+How is it calculated? Let sexpected be the set of all transactions in Mempool's expected block and let sactual be the set of all transactions in the actual block. Then let n be the number of all transactions in both sexpected and sactual.
+Furthermore, let r be the number of transactions Mempool deduces were intentionally excluded from sactual.
Block health is calculated as n / ( n + r ).
-Transactions appearing in both sexpected and sactual are used (instead of a block's full transaction count) in order to minimize chances that block health is impacted by missing transactions that don't imply censorship:
+The number of transactions appearing in both sexpected and sactual is used (instead of a block's full transaction count) in order to minimize chances that block health is inadvertently impacted by transactions that were most likely not intentionally excluded:
Mempool uses a re-implementation of Bitcoin Core's transaction selection algorithm to determine the transactions it expects to see in the next block.
+As a result, block health is not intended to be a measure of how closely an expected block resembles an actual block. The actual block can be vastly different from the expected block, but if no transactions appear to be intentionally excluded, it will have a high health rating (extreme example).
+See more context in our FAQ on block audits.
+Because of this feature's resource usage and availability requirements, it is only supported on official mempool.space instances.