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

itests: retry deal when control addr is out of funds #7454

Merged
merged 4 commits into from
Oct 11, 2021

Conversation

nonsense
Copy link
Member

@nonsense nonsense commented Oct 6, 2021

Should fix: #7102

Related: filecoin-project/go-fil-markets#638


I am trying to come up with a solution that doesn't involve adding another 1-2 states to go-fil-transfer and another 1-2 events and adding more state transitions.

I think a deal being stuck in the Publish state is the natural thing to happen in case we fail to transition to the Publishing state, i.e. we fail to initiate the PSD message.

Having discussed within the #ignite team, we decided against automatically trying to retry PSD messages. With this PR, a PSD message would be retried only if the node is bounced, as a Restart event is sent to deals that are not in a terminal state.


TODO:

  • add test case to handle case where we have very little FIL and actor fails differently
  • add test case to confirm that deal blocks in Publish state, unless we call MarketRetryPublishDeal
  • update go-fil-markets ref when related PR is merged so that we don't refer to a commit that's not on master

@nonsense nonsense force-pushed the nonsense/retry-in-publish-deal branch 5 times, most recently from 3013fed to 42017b9 Compare October 7, 2021 10:22
@nonsense nonsense marked this pull request as ready for review October 7, 2021 10:31
@nonsense nonsense requested a review from a team as a code owner October 7, 2021 10:31
@nonsense nonsense requested a review from dirkmc October 7, 2021 10:36
cmd/lotus-miner/market.go Outdated Show resolved Hide resolved
propcid := *deal

go func() {
time.Sleep(20 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we subscribe to deal events, and watch for publish, rather than using a sleep here? (or maybe subscribe to deal events and use a shorter sleep)

Copy link
Member Author

Choose a reason for hiding this comment

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

I will certainly use a shorter sleep. We can monitor for Publish, but you can't really tell if the Publish handler did something or not, and this is really what we are interested in.

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #7454 (a19dbb8) into master (b4302df) will increase coverage by 0.00%.
The diff coverage is 25.58%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7454   +/-   ##
=======================================
  Coverage   39.80%   39.81%           
=======================================
  Files         631      631           
  Lines       66851    66894   +43     
=======================================
+ Hits        26611    26631   +20     
- Misses      35618    35641   +23     
  Partials     4622     4622           
Impacted Files Coverage Δ
api/api_storage.go 0.00% <ø> (ø)
cmd/lotus-miner/market.go 23.06% <0.00%> (-0.86%) ⬇️
itests/kit/deals.go 77.98% <37.50%> (-5.01%) ⬇️
node/impl/storminer.go 27.32% <100.00%> (+0.28%) ⬆️
chain/events/message_cache.go 87.50% <0.00%> (-12.50%) ⬇️
extern/sector-storage/sched_resources.go 73.52% <0.00%> (-11.77%) ⬇️
chain/actors/builtin/paych/paych.go 19.31% <0.00%> (-4.55%) ⬇️
storage/wdpost_sched.go 77.22% <0.00%> (-1.99%) ⬇️
chain/events/events_called.go 83.90% <0.00%> (-1.96%) ⬇️
itests/kit/blockminer.go 93.65% <0.00%> (-1.59%) ⬇️
... and 15 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 b4302df...a19dbb8. Read the comment docs.

@nonsense nonsense force-pushed the nonsense/retry-in-publish-deal branch from f4f5c12 to 4938e2f Compare October 11, 2021 11:11
@nonsense nonsense force-pushed the nonsense/retry-in-publish-deal branch from 4938e2f to a19dbb8 Compare October 11, 2021 12:04
@jennijuju jennijuju added this to the v1.13.1 milestone Oct 11, 2021
@jennijuju jennijuju added the P2 P2: Should be resolved label Oct 11, 2021
Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dirkmc dirkmc merged commit f943381 into master Oct 11, 2021
@dirkmc dirkmc deleted the nonsense/retry-in-publish-deal branch October 11, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow manual retry of deal publishing
3 participants