firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Unable to listen to events emitted before creating event listener

Open bharadwajambati172 opened this issue 3 years ago • 3 comments
trafficstars

Launched a fabric network using fabric cli with a total of 3 firefly nodes. Deployed asset-transfer-basic chaincode by following the steps mentioned in the documentation https://hyperledger.github.io/firefly/tutorials/custom_contracts/fabric.html.

Ran three blockchain transactions from org1 and then created an event listener from org2. After creating an event listener, org2 didn't receive any events. Ran fourth transaction from org1, now org2 received the fourth transaction but not the previous transactions.

Below is the payload used for creating event listener in org2

{
  "interface": {
    "id": "f1e5522c-59a5-4787-bbfd-89975e5b0954"
  },
  "location": {
    "channel": "firefly",
    "chaincode": "asset_transfer"
  },
  "event": {
    "name": "AssetCreated"
  },
  "options": {
    "firstEvent": "oldest"
  },
  "topic": "assets"
}

Expected:

Org2 should receive all the events emitted before creating an event listener

Actual:

Org2 didn't receive events emitted before creating an event listener

bharadwajambati172 avatar Jul 11 '22 15:07 bharadwajambati172

Thanks for reporting this @bharadwajambati172. I'll take a look at it and see if I can reproduce the same behavior.

nguyer avatar Jul 11 '22 15:07 nguyer

Notably in FireFly Core, we specifically convert "oldest" to "0" when creating a subscription. It's possible fabconnect doesn't actually honor "oldest" (would need to verify).

awrichar avatar Jul 11 '22 15:07 awrichar

Hello @awrichar and @nguyer I checked firefly project and I liked it. I am now in a process of learning Go lang and also study blockchain technology. So if it is possible I would like to try resolve this issue. Finally it would be appreciated if you guide me from where to start solve this issue, I mean if you can give me a guide from which area/folder to start. Thank you :smile:

sifisKoen avatar Nov 29 '23 07:11 sifisKoen