Skip to content

Conversation

@dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Apr 6, 2021

Depends on ipfs/go-graphsync#164
Supercedes #177 #172 #182 #181

Currently the channel monitor watches the data-rate and if it falls too low, the monitor sends a Restart message to the other party in the data transfer.

This is complex to do for retrieval deals, because the monitor needs to be aware of pauses and resumes.

Instead this PR simplifies the monitor's behaviour so that now:

  • The monitor doesn't watch the data-rate
  • The monitor just watches for errors fired from the transport layer
  • When there is an error, the monitor tries to reconnect to the peer
  • Once the connection is established, the monitor sends a restart message
  • If there is no response to the restart message, the data transfer fails

@dirkmc dirkmc force-pushed the feat/chanmon-retrieval branch 2 times, most recently from 8f97b44 to 099aa0e Compare April 8, 2021 12:14
@codecov-io
Copy link

codecov-io commented Apr 8, 2021

Codecov Report

Merging #190 (689c5fe) into master (dbc57eb) will decrease coverage by 0.46%.
The diff coverage is 72.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #190      +/-   ##
==========================================
- Coverage   65.42%   64.95%   -0.47%     
==========================================
  Files          25       25              
  Lines        2600     2594       -6     
==========================================
- Hits         1701     1685      -16     
- Misses        558      568      +10     
  Partials      341      341              
Impacted Files Coverage Δ
channels/channels.go 70.88% <0.00%> (-0.46%) ⬇️
channels/channels_fsm.go 63.63% <0.00%> (-2.18%) ⬇️
network/libp2p_impl.go 68.90% <0.00%> (-2.40%) ⬇️
transport/graphsync/graphsync.go 76.19% <45.45%> (-0.42%) ⬇️
channelmonitor/channelmonitor.go 74.88% <81.05%> (-2.49%) ⬇️
impl/events.go 72.95% <100.00%> (+0.19%) ⬆️
impl/impl.go 59.55% <100.00%> (+1.07%) ⬆️

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 dbc57eb...689c5fe. Read the comment docs.

@dirkmc dirkmc force-pushed the feat/chanmon-retrieval branch from 099aa0e to 1d99682 Compare April 8, 2021 12:21
@dirkmc dirkmc marked this pull request as ready for review April 9, 2021 08:47
@dirkmc dirkmc self-assigned this Apr 9, 2021
@dirkmc dirkmc added the x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs label Apr 9, 2021
@dirkmc dirkmc requested a review from nonsense April 9, 2021 11:24
@dirkmc dirkmc force-pushed the feat/chanmon-retrieval branch from 8f19d0a to 10de9cb Compare April 15, 2021 12:25
@dirkmc dirkmc force-pushed the feat/chanmon-retrieval branch from 720f4bd to 6798477 Compare April 16, 2021 13:30
@dirkmc dirkmc merged commit f14cc40 into master Apr 16, 2021
@dirkmc dirkmc deleted the feat/chanmon-retrieval branch April 16, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants