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

Add expected CID param to AddPiece #7175

Closed
wants to merge 1 commit into from
Closed

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Aug 24, 2021

Should address #7146 by making it impossible to put corrupted pieces into sectors (note that after one AddPiece call fails, subsequent calls should overwrite the bad data)

@magik6k magik6k requested a review from a team as a code owner August 24, 2021 19:48
@magik6k magik6k force-pushed the feat/ap-cid-check branch 2 times, most recently from 9ebc95d to 1af8d96 Compare August 24, 2021 19:51
@magik6k magik6k force-pushed the feat/ap-cid-check branch from 1af8d96 to 1916a78 Compare August 24, 2021 19:54
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Logic looks good, just making sure this isn't breaking the v0 API.

@@ -167,6 +167,7 @@ Inputs:
},
null,
1024,
null,
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't change. Do we need to stub out a version of the v0 API that passes nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the worker API which is mostly internal, and generally ok to change

Copy link
Member

Choose a reason for hiding this comment

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

Yeah... but is there any real reason to? Alternatively, if it's internal, is there any way to make sure it's always in the "unstable" API, and never gets stabilized?

Copy link
Member

Choose a reason for hiding this comment

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

(doesn't really block merge)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd call this API 'internal'.

That said, changing it does require miners to update all their workers, which can be quite inconvenient.. I maybe see a way to make this work without changing this API

@Stebalien
Copy link
Member

Flaky test disabled in #7176.

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #7175 (1916a78) into master (d61612e) will increase coverage by 4.52%.
The diff coverage is 56.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7175      +/-   ##
==========================================
+ Coverage   30.29%   34.82%   +4.52%     
==========================================
  Files         677      684       +7     
  Lines       79752    80153     +401     
==========================================
+ Hits        24159    27910    +3751     
+ Misses      50279    46583    -3696     
- Partials     5314     5660     +346     
Impacted Files Coverage Δ
api/proxy_gen.go 10.09% <0.00%> (ø)
api/version.go 80.00% <ø> (ø)
cmd/lotus-bench/main.go 0.00% <0.00%> (ø)
cmd/lotus-seed/seed/seed.go 43.83% <0.00%> (ø)
extern/sector-storage/partialfile/partialfile.go 43.90% <ø> (ø)
extern/sector-storage/storiface/worker.go 53.84% <ø> (ø)
extern/storage-sealing/input.go 61.13% <33.33%> (+1.97%) ⬆️
extern/sector-storage/ffiwrapper/sealer_cgo.go 60.44% <56.41%> (-0.48%) ⬇️
extern/sector-storage/mock/mock.go 64.98% <60.00%> (-0.39%) ⬇️
extern/sector-storage/manager.go 65.04% <100.00%> (ø)
... and 167 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 d61612e...1916a78. Read the comment docs.

@magik6k
Copy link
Contributor Author

magik6k commented Aug 27, 2021

#7185 was merged (with no worker-api breakage)

@magik6k magik6k closed this Aug 27, 2021
@Kubuxu Kubuxu deleted the feat/ap-cid-check branch November 25, 2021 18:56
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.

2 participants