CIP-0176 | Serialize is_valid as the trailing element of each block transaction - #1261
CIP-0176 | Serialize is_valid as the trailing element of each block transaction#1261Lucsanszky wants to merge 1 commit into
is_valid as the trailing element of each block transaction#1261Conversation
…ransaction Replace the block-level invalid_transactions index list with a trailing is_valid flag on each transaction in a block. The flag is set by the block producer, so it is placed after all the author-supplied fields, keeping those in a contiguous prefix and giving future block-producer- supplied fields a natural position at the end of the transaction. Motivated by IntersectMBO/cardano-ledger#5912. Submitted in tandem with an amendment to CIP-0167.
is_valid as the trailing element of each block transaction
rphair
left a comment
There was a problem hiding this comment.
thanks @Lucsanszky; this & the concurrent update both look realistic and the maintenance on these CIPs is much appreciated.
@lehins (cc @carlostome @williamdemeo) the CIP editors can approve this & the concurrent update once confirmed consistent with the ledger spec, but also because of implications between Tx and block body I think we should tag reviewers & advocates of both CIP-0167 and CIP-0176 to be aware of possible impact: @ch1bo @colll78 @Quantumplation @Ryun1 @teodanciu
If neither disputed nor explicitly confirmed this would naturally get tagged Confirmed from Triage at the next CIP meeting (https://hackmd.io/@cip-editors/143) with Last Check for merge at the meeting after that.
rphair
left a comment
There was a problem hiding this comment.
Given that both this & its concurrent PR are confirmed all around from the Ledger side, we only have the remaining question of possible ecosystem impact, as tagged already to a handful of experts above (sorry @fallen-icarus I didn't think of tagging you before; only now does it seem like this might affect transaction dependencies).
And since there's been no objection yet upon presentation this week, we would normally take the next CIP meeting (https://hackmd.io/@cip-editors/143) as an opportunity to find who else in Consensus (cc @perturbing), applications (cc @colll78 @Crypto2099), etc. might object to either of these CIPs.
Therefore, since that's what we would be doing at Last Check anyway, I'm approving this (based on apparent sensibility + consistency with that Ledger already plans to do) & marking it as such. That will give us another week for any objections & other editors (cc @Ryun1 @ch1bo) to point out any problems or other stakeholder that we should wait until getting a review from.
ch1bo
left a comment
There was a problem hiding this comment.
This is a breaking change, but one for the better and it greatly simplifies the block structure. Glad that we seemingly came to agreement about the per tx overhead being worth the simplicity!
| ### Implementation Plan | ||
|
|
||
| The implementation of this CIP should not proceed without an assessment of the potential impact on all the components that deserialise blocks. | ||
| Leios and Peras R&D teams should also be aware of these changes. |
What
Amends CIP-0176 to replace the block-level
invalid_transactionsindex list with a trailingis_validflag on each transaction in a block:block_bodybecomes a plain list ofblock_transactionsblock_transaction = [transaction_body, transaction_witness_set, auxiliary_data/ nil, bool], where the trailingboolis theis_validflag set by the block producerWhy
feeChangeAmount) would need the same treatment. Placing producer-set fields after all author-supplied fields gives them a natural, extensible position at the end of each block transaction.The block body hash is unaffected: it remains a single hash over the serialized
block_bodyas a whole.Motivated by IntersectMBO/cardano-ledger#5912.
Submitted in tandem with an amendment to CIP-0167 (#1262), which describes the mempool side of the same transaction wire-format split.