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

[WIP] Feat/debug accept message error #210

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aarshkshah1992
Copy link
Collaborator

To help debug the missing Accept messages on dealbot clients.

@aarshkshah1992 aarshkshah1992 requested a review from nonsense May 26, 2021 15:03
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #210 (6934ef0) into master (77b948c) will increase coverage by 0.17%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   64.82%   65.00%   +0.17%     
==========================================
  Files          25       25              
  Lines        2607     2626      +19     
==========================================
+ Hits         1690     1707      +17     
- Misses        573      575       +2     
  Partials      344      344              
Impacted Files Coverage Δ
transport/graphsync/graphsync.go 75.41% <60.00%> (-0.44%) ⬇️
impl/events.go 73.19% <80.00%> (+0.24%) ⬆️
channelmonitor/channelmonitor.go 74.19% <100.00%> (ø)
network/libp2p_impl.go 72.26% <0.00%> (+3.36%) ⬆️

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 77b948c...6934ef0. Read the comment docs.

impl/events.go Outdated
@@ -432,6 +448,10 @@ func (m *manager) validateVoucher(
}

result, err := validatorFunc(isRestart, sender, vouch, baseCid, stor)
if isPull {
log.Infof("\n ValidatePull, result=%s, err=%s", result, err)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Not sure why we have \n inside a log.Infof

@@ -592,7 +592,9 @@ func (t *Transport) gsReqRecdHook(p peer.ID, request graphsync.RequestData, hook
// when a DT request comes in on graphsync, it's a pull
chid = datatransfer.ChannelID{ID: msg.TransferID(), Initiator: p, Responder: t.peerID}
request := msg.(datatransfer.Request)
log.Debugf("will validate recieved gs request, chid=%s, request=%+v", chid, request)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
log.Debugf("will validate recieved gs request, chid=%s, request=%+v", chid, request)
log.Debugf("will validate received gs request, chid=%s, request=%+v", chid, request)

return nil, t.events.OnResponseReceived(chid, dtResponse)
err = t.events.OnResponseReceived(chid, dtResponse)
if err != nil {
log.Errorf("\n error receieved from OnResponseReceived is %s", err)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here - why \n at the start?

impl/events.go Outdated
if !response.EmptyVoucherResult() {
log.Debug("processing non-empty voucher result")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add the chid as part of this logline, so that we can correlate to which channel this refers?

Copy link
Member

@nonsense nonsense left a comment

Choose a reason for hiding this comment

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

added a few comments, that it'd be good to be addressed, but overall lgtm.

This was referenced Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants