Skip to content

Should the transactions retrieved from the mempool match those from a forged block? #23

Answered by dcoutts
dnadales asked this question in Q&A
Discussion options

You must be logged in to vote

Suppose the newBlock does not contain all of the txs, what is the consequence?

The main thing that the txs is used for is tracing, so that would cause some confusion but not any behaviour changes.

It's also used in an exceptional case:

              -- We just produced a block that is invalid according to the
              -- ledger in the ChainDB, while the mempool said it is valid.
              -- There is an inconsistency between the two!
              --
              -- Remove all the transactions in that block, otherwise we'll
              -- run the risk of forging the same invalid block again. This
              -- means that we'll throw away some good transactions in the
      …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dnadales
Comment options

dnadales Mar 24, 2023
Maintainer Author

@dcoutts
Comment options

Answer selected by dnadales
@dnadales
Comment options

dnadales Jun 14, 2023
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants