Closed hosie closed 3 months ago
According to different sources including web3js states that logIndex: Number - integer of the log index position in the block. null when its pending log.
which means that the behaviour is correct but the documentation seems wrong. Since Firefly has a pluggable architecture to support other blockchain protocols, this value might be different.
Better source is the Ethereum documentation https://ethereum.org/en/developers/docs/apis/json-rpc which states the same logIndex: QUANTITY - integer of the log index position in the block. null when its pending log.
Coupling this with the transaction index allows a user to have a unique ID for an event.
Thanks @EnriqueL8 With that behaviour, the following statement from the docs would remain true, which is very important
**The string is alphanumerically sortable as a plain string;**
Assign @dwertent to this one I add him to a triage group
docs say
However, what I observe is that the value in this segment increases across transactions and only resets to 0 on a new block. So itsems to be the event /log index within a block.
e.g. when I have 1 event per transaction, 2nd segment and 3rd segment are always equal.
If I have 2 events per transaction, then I see segment 3 increase sequentially on every event and segment 2 increases by one on every other event
Curious if the docs are wrong or whether this is a code bug.