Skip to content

don't receive events after some uptime #281

@MajesticRaven

Description

@MajesticRaven

Hi, I have some contracts on loom network and I wrote nodejs application for handling contract events from blockchain. Everything okay for first some hours, but some time later events didn't come. This problem is real only with uptime for some hours. When I emit event in first hour - application handle it and wrote to db, but after some hours - there are no events and I tried to debug it with debug mode and found smth interesting:

  1. for each subscription for each block we make rpc call to the node like

ws-rpc-client Sending RPC msg to wss://extdev-plasma-us1.dappchains.com/queryws, method getevmlogs

after receiving answer like

loom-provider Response payload {
  "id": 42,
  "jsonrpc": "2.0",
  "result": []
}

after which it sends requests for filter

loom-provider Request payload {
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x6dd392",
      "toBlock": "0x6dd394",
      "address": "0xd0c1a482d6eb9616c3ee860d87f18bb154e3014c",
      "topics": [
        "0x237d4a1ca852c519fa30ab619571a169a13767b6f3af65886d6ed5b6dd6273b6"
      ]
    }
  ],
  "id": 42,
  "jsonrpc": "2.0"
}

and don't receive anything. maybe i messed up with logs, but i can see only this picture for latest minute or smth like that (period when transaction was sent and added to blockchain and some more time)
for all blocks i have no handled events on nodejs part (as i can see - there are no responses for filters). and this problem is coming only with time
2. are u sure that for each subscription is good idea to call node? why not better to send information about new block to client and parse it and find topics on client?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions