diff --git a/proposals/bot-controller-slingshot.md b/proposals/bot-controller-slingshot.md new file mode 100644 index 00000000..655f089b --- /dev/null +++ b/proposals/bot-controller-slingshot.md @@ -0,0 +1,165 @@ +# Dealbot Controller for Slingshot Retrieval + +Authors: @mgoelzer + +Initial PR: [#96](https://github.com/protocol/web3-dev-team/pull/96) + + + + + +## Purpose & impact +#### Background & intent +_Describe the desired state of the world after this project? Why does that matter?_ + + +Like [#87](https://github.com/protocol/web3-dev-team/pull/87), this proposal is for a Dealbot controller. Controllers drive the execution of Dealbots for specific purposes. + +In order to judge the Slingshot competition, a large number of retrievals need to be made to check the data stored in the competition. Without this controller, this checking will be substantially more time-consuming and manual. + + +#### Assumptions & hypotheses +_What must be true for this project to matter?_ + + + - The [Dealbots project](https://github.com/protocol/web3-dev-team/pull/84) must resulting in working dealbots that can be run in parallel with tasks dispatched by a single controller. + - `{miner,CID}` tuples of Slingshot data must be available. + - A low-latency, high-speed link to a go-ipfs node must be available from the bots in the mainnet dealbot cluster. + +#### User workflow example +_How would a developer or user use this new capability?_ + +Input: + + - A list of `{miner,CID}` tuples to be retrieved + +Output: + + - Each successful retrieval must be written to the go-ipfs node mentioned above for later download and review locally. (Note: Filecoin retrieval to go-ipfs node storage already exists and does not need to be built for this project.) + - An output metadata file listing all retrievals attempted their outcome. An outcome would be a timestamped record of either: + - a success status for the retrieval and the IPFS hash where the retrieved data can be found + - a failure status for the retrieval (along with the exact error message of the failure) + + Here is an example of what the metadata file might look like: + +``` +[ + // example of a successful retrieval + { + "request":{"datetime":"YYYY-MM-DD hh:mm:ss","minerId:"f0XXXX","CID":"bafxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, // <-- the input dealbot team was given + "retrievalResult":"success", + "ipfsHash":"Qmxxxxxxxxxxxxxxxxxxxxxxxxxxx", // <-- where the retrieved data lives on Riba's ipfs node + }, + + // example of a failed retrieval + { + "request":{"datetime":"YYYY-MM-DD hh:mm:ss","minerId:"f0YYYY","CID":"bafyyyyyyyyyyyyyyyyyyyyyyyyyyy"}, + "retrievalResult":"failure", + "errorMessage":"deal failed: (State=26) error calling node: publishing deal: mpool push: failed to push message: not enough funds (required: 0.19999999998338535 FIL, balance: 0.037461935577982576 FIL): not enough funds to execute transaction", + }, + + ...more retrieval attempt objects... +] +``` + +#### Impact +_How would this directly contribute to web3 dev stack product-market fit?_ + + + +This work enables the Slingshot competition, which increases usage of our stack by onboarding more useful content onto the Filecoin network. + +#### Internal leverage +_How much would nailing this project improve our knowledge and ability to execute future projects?_ + + + + - There is the potential for cross-learning between this project and other controllers (like [#87](https://github.com/protocol/web3-dev-team/pull/87)) + - There is the potential to find mainnet bugs in the Dealbot through this project, since it implements a unique type of controller that retrieves data not stored by the Dealbot itself. + +#### Confidence +_How sure are we that this impact would be realized? Label from [this scale](https://medium.com/@nimay/inside-product-introduction-to-feature-priority-using-ice-impact-confidence-ease-and-gist-5180434e5b15)_. + + + +Confidence: High + +This controller utilizes only a subset of the dealbot functionality (only retrieval deals), so if we can get [#87](https://github.com/protocol/web3-dev-team/pull/87) to work, this project should be no more difficult to make work as well. + + +## Project definition +#### Brief plan of attack + + + +#### What does done look like? +_What specific deliverables should completed to consider this project done?_ + + - The go-ipfs node (to be set up by @ribasushi outside this project proposal) should contain the retrieved bits of all successful retrieval + - The metadata file (described with example above) should be generated. + +#### What does success look like? +_Success means impact. How will we know we did the right thing?_ + + + + - All deliverables listed above are delivered. + - The people responsible for judging Slingshot are satisfied that they got what they needed for judging the competition. + +#### Counterpoints & pre-mortem +_Why might this project be lower impact than expected? How could this project fail to complete, or fail to be successful?_ + + - Unknown requirements (e.g., all retrievals need to be attempted in a certain geography) that we discover cannot be accomodated before the judging deadline + +#### Alternatives +_How might this project’s intent be realized in other ways (other than this project proposal)? What other potential solutions can address the same need?_ + + - The retrieval work could be done entirely manually (e.g., by hiring a human contractor specifically for this purpose). + - Bash scripts could be written that don't depend on the Dealbots project. + +#### Dependencies/prerequisites + + + - The [Dealbots project](https://github.com/protocol/web3-dev-team/pull/84) + +#### Future opportunities + + + - Judging for future rounds of Slingshot + - Validation for large-scale Filecoin storage projects currently underway (e.g., Starling/Shoah) + +## Required resources + +#### Effort estimate + + +#### Roles / skills needed +