question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unreliable event filtering

See original GitHub issue

The cookbook provides a strategy for testing events, using contract.on. However, this only seems to be reliable if run in a single test suite.

A separate part of the cookbook presents a strategy for returning a value from a state-changing function. This strategy can also be used to test events.

Going by the cookbook, we at Magmo used the first strategy. However, it forced us to run our jest test suites in serial with the --runInBand option. This is both time consuming, and worrying, since we cannot trust the behaviour of contract.on based on this issue.

Here is a repository reproducing the issue. On the first commit, yarn test will not work, but yarn testInBand will reliably work. On the second commit, yarn test will reliably work.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
ricmoocommented, Oct 28, 2019

We are still investigating, and plugging console.log statements all over the place, but it seems certain there is something wrong with how the initial getBlockNumber() is being used for the very first filter.

Thanks for your patience. 😃

1reaction
ricmoocommented, Oct 30, 2019

Huge thanks to @yuetloo for all her efforts in debugging this.

A fix has been added, and the tests are running, after they pass (usually about an hour) I will publish to NPM and update this ticket.

This has identified a few other quirks with events, which I’m addressing right now with the re-write of the v5 events.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event-triggered filtering for networked systems under unreliable ...
This paper is concerned with the event-triggered H ∞ filtering for discrete-time nonlinear systems with unreliable communication links.
Read more >
Event-triggered filtering for networked systems under unreliable ...
[4] proposed a centralized event-triggered control, in which the data is updated at the same time. Unlike centralized event-triggered control, ...
Read more >
Event-triggered H∞ filtering for discrete-time systems over ...
This paper considers the event-triggered H ∞ filtering problem for discrete-time linear systems subject to package dropouts.
Read more >
Cost-effective filtering of unreliable proximity detection results ...
This way the filtering is based on both, the external information (RSSI) ... and filters out the unreliable results based on custom metrics....
Read more >
Filtering and Control for Unreliable Communication - Hindawi
Filtering and Control for Unreliable Communication: The Discrete-Time Case ... Event-Based Control for Average Consensus of Wireless Sensor Networks with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found