From 439177a78f1b7024531bb198bc9f547bbd7117dc Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 10 Jan 2024 22:07:01 +0000 Subject: [PATCH 1/2] Add sigop related FAQ entries --- .../src/app/docs/api-docs/api-docs-data.ts | 21 ++++++++++++++++++ .../app/docs/api-docs/api-docs.component.html | 22 +++++++++++++++++++ 2 files changed, 43 insertions(+) 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 c5319bf2a..86a63e513 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -10081,6 +10081,27 @@ export const faqData = [ fragment: "how-do-mempool-goggles-work", title: "How do Mempool Goggles work?", }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + fragment: "what-are-sigops", + title: "What are sigops?", + }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + fragment: "what-is-adjusted-vsize", + title: "What is adjusted vsize?", + }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + fragment: "why-do-the-projected-block-fee-ranges-overlap", + title: "Why do the projected block fee ranges overlap?", + }, { type: "category", category: "self-hosting", diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 77cf01326..c3a260995 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -368,6 +368,28 @@ + +

A "sigop" is a way of accounting for the cost of "signature operations" in Bitcoin script, like OP_CHECKSIG, OP_CHECKSIGVERIFY, OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY

+

These signature operations incur different costs depending on whether they are single or multi-sig operations, and on where they appear in a Bitcoin transaction.

+

By consensus, each Bitcoin block is permitted to include a maximum of 80,000 sigops.

+
+ + +

Bitcoin blocks have two independent consensus-enforced resource constraints - a 4MWU weight limit, and the 80,000 sigop limit.

+

Most transactions use a more of the weight limit than the sigop limit. However, some transactions use a disproportionate number of sigops compared to their weight.

+

To account for this, Bitcoin Core calculates and uses an "adjusted vsize" equal 5 times the number of sigops, or the unadjusted vsize, whichever is larger.

+

Then, during block template construction, Bitcoin Core selects transactions in descending order of fee rate measured in satoshis per adjusted vsize

+

On mempool.space, effective fee rates for unconfirmed transactions are also measured in terms of satoshis per adjusted vsize, after accounting for CPFP relationships and other dependencies.

+
+ + +

The projected mempool blocks represent what we expect the next blocks would look like if they were mined right now, and so each projected block follows all of the same rules and constraints as real mined blocks.

+

Those constraints can sometimes cause transactions with lower fee rates to be included "ahead" of transactions with higher rates.

+

For example, if one projected block has a very small amount of space left, it might be able to fit one more tiny low fee rate transaction, while larger higher fee rate transactions have to wait for the following block.

+

A similar effect can occur when there are a large number of transactions with very many sigops. In that scenario, each projected block can only include up to 80,000 sigops worth of transactions, after which the remaining space can only be filled by potentially much lower fee transactions with zero sigops.

+

In extreme cases this can produce several projected blocks in a row with overlapping fee ranges, as a result of each projected block containing both high-feerate high-sigop transactions and lower feerate zero-sigop transactions.

+
+ 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. From e9a67adf4fb0648e5ccb01c2f20a63bbb4ae70f7 Mon Sep 17 00:00:00 2001 From: softsimon Date: Fri, 12 Jan 2024 09:50:33 +0700 Subject: [PATCH 2/2] Adding links to FAQ sections from TX page --- .../src/app/components/block/block.component.html | 2 +- .../src/app/components/block/block.component.scss | 5 ----- .../transaction/transaction.component.html | 12 ++++++++++-- frontend/src/styles.scss | 4 ++++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/components/block/block.component.html b/frontend/src/app/components/block/block.component.html index e908d5b24..b34b39c8c 100644 --- a/frontend/src/app/components/block/block.component.html +++ b/frontend/src/app/components/block/block.component.html @@ -59,7 +59,7 @@ - Health + Health  - Adjusted vsize + Adjusted vsize + + + + @@ -321,7 +325,11 @@ - Sigops + Sigops + + + + diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index be8cec328..8a4fe3c9a 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -1191,3 +1191,7 @@ app-global-footer { line-height: 0.5; border-radius: 0.2rem; } + +.info-link fa-icon { + color: rgba(255, 255, 255, 0.4); +}