hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

`CommittedTransaction::error` is not part of the block hash #5001

Open mversic opened 2 months ago

mversic commented 2 months ago

Since CommittedTransaction::error is not protected by the block hash why keep it in the block? Every block replays all transactions and determines whether transaction is correct or faulty

If we keep it in the block, should we (during consensus voting) reject those blocks that have it set to an incorrect value?

mversic commented 1 month ago

It's worth pointing out that CommittedTransaction::error also isn't protected with block signature

mversic commented 1 month ago

while this doesn't affect consensus or integrity of the blockchain, client that receives a block can't ever be certain that this value is correct. Then again client can't trust any event or block stream produced by the node. Client should connect to a trusted node anyhow

mversic commented 1 month ago

IMO we should keep CommittedTransaction::error separate from the block but make sure we return it to clients on FindBlocks query and block stream. Nodes themselves have no use for it

Erigara commented 1 month ago

If we keep it in the block, should we (during consensus voting) reject those blocks that have it set to an incorrect value?

We already do that when validating transactions.