Re: Invalid Transactions in Commit Blocks


Tsvetan Georgiev
 

Hi Tomás,

The transactions are validated and then committed by the peers. The transactions that are invalid are not committed and their content will not change the world state (the KVS): https://hyperledger-fabric.readthedocs.io/en/latest/txflow.html - point 5 in particular...

The HLF SDKs have the APIs to retrieve the transactions from a block and check if valid or invalid. You can walk the blocks if you need a full ledger scan for example or if you need to dynamically react you can use the block event listener.



Both SDKs provide a way to check if a transaction within a block is validated or invalidated by the peer.



Senofi

Tsvetan Georgiev
Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io







---- On Fri, 19 Feb 2021 15:28:10 -0500 Tomás Peixinho <tom.peixinho@...> wrote ----

Hey everyone,

I've been wondering about something. I know that a block can be commited with transactions inside it that are marked as invalid and therefore don't alter the world state. Is there anyway (I assumed there was a way using block events, but I really haven't found anything) to check which transactions in the block are actually "commited"? I know that they are all commited, but what I mean is if there is a way to know that they were actually processed and affected the world state. Because in my case specifically, knowing that a block was committed isn't really all that useful, if all the transactions inside it were invalid and nothing actually happened.

Thanks for the help

Tomás





Join fabric@lists.hyperledger.org to automatically receive all group messages.