-
Notifications
You must be signed in to change notification settings - Fork 70
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
chore: refactor allocate command #1912
Conversation
looks great |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default parameters Required
need to be changed
cmd/boost/direct_deal.go
Outdated
&cli.StringFlag{ | ||
Name: "piece-file", | ||
Usage: "file containing piece-info[s] to create the allocation. Each line in the file should be in the format 'pieceCid,pieceSize,miner,tmin,tmax,expiration'", | ||
Required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required
shouble true
->false
AND
boost/cmd/boost/direct_deal.go
Line 35 in b363965
Required: true, |
boost/cmd/boost/direct_deal.go
Line 41 in b363965
Required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
b363965
to
52b46f9
Compare
52b46f9
to
017d69c
Compare
@beck-8 Can you please also test this as a user? A real world test would reveal any missing features which might make life easier for users. |
Sorry, I don't have datacap credit, so I can't do the test. |
for _, msg := range msgs { | ||
mcid, sent, err := lib.SignAndPushToMpool(cctx, ctx, gapi, n, msg) | ||
if err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the user-retry plan if things fail here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message failure is a little tricky. One way would be to simply print the CIDs we already have sent successfully and users can get the param from those and decode into a list of piece details. Other way would be to print the allocation list and a diff can be used to remove the already published allocation details from the file and then user can retry.
I could print the success list in case of failure but that could be huge depending upon the input file and not a pretty output.
Let me know your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this relate to the CSV input thing so that the file drops out and the format could get re-absorbed with a manual run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand that comment. Can you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, error retries are difficult to handle. You can only succeed once, otherwise it will take a lot of time to filter out the wrong entries. This is the cost of using on-chain submissions.
Allows using a file to allocate in CSV format. The delimiter is ","
Fixes #1897