Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix per channel event monitoring and past events fetching #1475

Merged
merged 4 commits into from
May 7, 2020

Conversation

andrevmatos
Copy link
Contributor

@andrevmatos andrevmatos commented May 7, 2020

Fixes #1434

Short description
Refactors the channel monitoring logic, which became more complex than it should. With little logs to investigate, and after some real life observation of some events being lost in very specific cases, this became the main target for thsi issue.
I did test by opening ~9 channels with hub, and this issue was not experienced.

Definition of Done

  • Steps to manually test the change have been documented
  • Acceptance criteria are met
  • Change has been manually tested by the reviewer (dApp)

Steps to manually test the change (dApp)

  1. Open and close a lot of channels with other nodes, with deposits, and check if any event is lost in the process
  2. It helps by reducing the default timeouts. It was discovered that hub's raiden-py still accepts transfers with channels at { settleTimeout: 60 } (passed directly to Raiden.openChannel method), which is a huge improvement on waiting time over default=500.

@codecov
Copy link

codecov bot commented May 7, 2020

Codecov Report

Merging #1475 into master will decrease coverage by 0.14%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1475      +/-   ##
==========================================
- Coverage   96.12%   95.98%   -0.15%     
==========================================
  Files         130      130              
  Lines        4798     4829      +31     
  Branches      963      969       +6     
==========================================
+ Hits         4612     4635      +23     
- Misses        139      148       +9     
+ Partials       47       46       -1     
Flag Coverage Δ
#dapp 91.56% <ø> (ø)
#sdk 97.61% <96.55%> (-0.21%) ⬇️
#sdk_integration ?
Impacted Files Coverage Δ
raiden-ts/src/utils/error.ts 98.68% <ø> (-0.02%) ⬇️
raiden-ts/src/transport/epics.ts 97.15% <80.00%> (-0.79%) ⬇️
raiden-ts/src/channels/epics.ts 98.95% <100.00%> (+0.37%) ⬆️
raiden-ts/src/channels/reducer.ts 98.78% <100.00%> (+0.04%) ⬆️
raiden-ts/src/channels/types.ts 100.00% <100.00%> (ø)
raiden-ts/src/channels/utils.ts 100.00% <100.00%> (ø)
raiden-ts/src/raiden.ts 94.05% <100.00%> (-0.27%) ⬇️
raiden-ts/src/services/epics.ts 99.07% <100.00%> (-0.03%) ⬇️
raiden-ts/src/transfers/epics/locked.ts 98.20% <100.00%> (-0.02%) ⬇️
raiden-ts/src/polyfills.ts 85.71% <0.00%> (-14.29%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c90c7fc...f03b99f. Read the comment docs.

Copy link
Contributor

@nephix nephix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened 5 channels with the hub and the issue didn't occur

@andrevmatos andrevmatos merged commit c680274 into master May 7, 2020
@andrevmatos andrevmatos deleted the fix/monitor_events branch May 7, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU goes crazy when opening a channel
2 participants