Replies: 3 comments 4 replies
-
Regarding
|
Beta Was this translation helpful? Give feedback.
-
Hi @dantaik , thanks for the comments and feedback! Really nice to have more eyes on the protocol/code.
In
Since both values are computed using the unfiltered "raw" version of the txList, shouldn't we be fine? |
Beta Was this translation helpful? Give feedback.
-
Upon reviewing the |
Beta Was this translation helpful? Give feedback.
-
The current implementation of
proveIncorrectPreconfirmation
assumes that the inclusion of a Taiko L2 contract can be verified by simply checking if thetxListHash
in a preconfirmation receipt matches the block'sblobHash
. However, this assumption is incorrect. Here's why:In Taiko's permissionless rollup design, multiple proposers (e.g., Alice and Bob) can propose blocks simultaneously. The final order of these blocks is only known once both transactions are confirmed on-chain. For example, if a specific transaction appears in both Alice's and Bob's
txList
(Data Availability - DA), and Alice's block is confirmed first, this transaction will be part of Alice's L2 block. However, in Bob's L2 block, the same transaction will be ignored, even though it was originally included in Bob'stxList
when his block was proposed.In other words, the
txList
(provided as calldata or a blob) serves as the source for deriving the actual L2 block. The finalized L2 block will include only the valid transactions from thetxList
, and any invalid or duplicate transactions will be ignored. Therefore, theproveIncorrectPreconfirmation
can only be valid if the block in question has been verified.To handle this properly, you should use Taiko's
getLastVerifiedBlock
to check if the block is newer than the last verified block. If so, callgetBlock
to retrieve itsverifiedTransitionId
, and then usegetTransition
to obtain the block'sblockHash
. From here, the challenge becomes verifying whether or not a given transaction is included in the block with the correspondingblockHash
.Change to the Taiko BCR Protocol?
Initially, I considered modifying the Taiko protocol client code to ensure that all transactions included in a block are valid. If any invalid transactions are found, the entire block would be marked as invalid. However, this approach introduces significant complications. It would cause a mismatch between the number of L2 blocks and the number of L1 block proposals, further increasing the complexity of the protocol contracts.
Beta Was this translation helpful? Give feedback.
All reactions