|
| 1 | +# Lotus / Filecoin RPC and Library Audit |
| 2 | + |
| 3 | +Authors: @rvagg |
| 4 | + |
| 5 | +Initial PR: https://github.com/protocol/web3-dev-team/pull/80 |
| 6 | + |
| 7 | +## Purpose & impact |
| 8 | + |
| 9 | +#### Background & intent |
| 10 | + |
| 11 | +_Describe the desired state of the world after this project? Why does that matter?_ |
| 12 | + |
| 13 | +The Lotus RPC and its associated JavaScript libraries would be catalogued, their feature set and deficiencies would be well understood, and this information is available for the production of better documentation and other educational materials for users. |
| 14 | + |
| 15 | +Production of documentation and other educational materials is not specifically part of the scope of this project but it may be expanded to include this as a collaboration with the individuals who own / specialise in this area (i.e. this likely turns into a collaboration with the Dev Adoption & Onboarding team). |
| 16 | + |
| 17 | +There currently exists a small but sprawling and poorly documented, ecosystem of JavaScript libraries interact with the Lotus RPC API. There are also some known deficiencies with the API (e.g. the external wallet problem) that are not documented, just known by people who have bumped into the particular problem(s). |
| 18 | + |
| 19 | +This project aims to do a mini audit of the landscape of libraries and the abilities offered by the Lotus RPC API to developers interacting with Lotus from the outside—for any purpose, including simple wallet/send actions, general message crafting and submitting, deal-making, etc. |
| 20 | + |
| 21 | +Outputs of this project includes: |
| 22 | + |
| 23 | +* A catalog of existing libraries used to interact with the Lotus RPC API, including (currently known to be roughly within this category): |
| 24 | + * Those in [filecoin-shipyard](https://github.com/filecoin-shipyard) |
| 25 | + * Those currently published under the [@glif npm namespace](https://github.com/glifio/modules/tree/primary/packages/) |
| 26 | + * Those maintained for/by the [Truffle suite](https://github.com/trufflesuite/ganache-filecoin-alpha-cli) |
| 27 | +* An indication of quality or status and a recommendation for action; smaller-scope actions may be taken as part of this project. Such actions may include: |
| 28 | + * Further documentation in specific areas |
| 29 | + * Deprecation / archival |
| 30 | + * Improvements and feature additions |
| 31 | +* Key information required to create/improve higher-level documentation containing recommendations for users seeking to interact with the Lotus RPC (production of / contribution to is not a necessary part of this project, but generating the resources and/or knowledge to do so it part of this project). |
| 32 | +* A catalog of areas for high-value improvement, including the creation of new project proposals or the provision of more details to existing project proposals, for: |
| 33 | + * The Lotus RPC |
| 34 | + * Relevant JS libraries |
| 35 | + |
| 36 | +#### Assumptions & hypotheses |
| 37 | + |
| 38 | +_What must be true for this project to matter?_ |
| 39 | + |
| 40 | +That developers want to be able to interact with Lotus, and Filecoin more broadly, via JavaScript and that the path to doing this is currently via RPC APIs. |
| 41 | + |
| 42 | +#### User workflow example |
| 43 | + |
| 44 | +_How would a developer or user use this new capability?_ |
| 45 | + |
| 46 | +#### Impact |
| 47 | + |
| 48 | +_How would this directly contribute to web3 dev stack product-market fit?_ |
| 49 | + |
| 50 | +Maturity of Filecoin depends on a developer ecosystem building layer 1 (and beyond) technologies to serve users. As with IPFS, it is expected that a large portion (possibly a majority) will be leaning on JavaScript application stacks, and dapp developers will be leaning on the browser JavaScript environment. It is critical that we provide a solid foundation for building libraries to interact with Filecoin and the current technical focus for this is Lotus and its RPC. This will evolve over time but the current state suggests high-value will be derived from basic investment in the landscape of JavaScript libraries that interact with (and above) Lotus, and the Lotus RPC itself. |
| 51 | + |
| 52 | +#### Leverage |
| 53 | + |
| 54 | +_How much would nailing this project improve our knowledge and ability to execute future projects?_ |
| 55 | + |
| 56 | +This project will serve as a foundation for additional investment in the JS (and general API) layer above Filecoin to unlock additional web3 developer opportunities. Being able to know _what we have_ and what the status of it is critical to understanding where to invest. |
| 57 | + |
| 58 | +#### Confidence |
| 59 | + |
| 60 | +_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)_. |
| 61 | + |
| 62 | +## Project definition |
| 63 | + |
| 64 | +#### Brief plan of attack |
| 65 | + |
| 66 | +Executing this project would include: |
| 67 | + |
| 68 | + * Seeking input on the current status and future plans of individuals / teams involved in maintaining or authoring relevant libraries, including (but not limited to): |
| 69 | + * Jim Pick (ecosystem / grantee, ex-PL) |
| 70 | + * Alan Shaw (PL) |
| 71 | + * Glif.io / Infinite Scroll |
| 72 | + * Truffle / Ganache contributors (initially via Jim Pick) |
| 73 | + * Other PL staff who may have an interest in, or experience with these libraries and the RPC itself |
| 74 | + * Attemtping to use the libraries as they currently exist, and possibly the Lotus RPC directly and documenting the process to contribute to the project outputs listed above |
| 75 | + |
| 76 | +#### What does done look like? |
| 77 | + |
| 78 | +_What specific deliverables should completed to consider this project done?_ |
| 79 | + |
| 80 | +This project will produce a brief report covering: |
| 81 | + |
| 82 | +* A map of the currently available JavaScript libraries available for interacting with Filecoin (RPC API and other) |
| 83 | +* A pre-documentation catalog of the functionality available: |
| 84 | + * in those JavaScript libraries |
| 85 | + * via the Lotus RPC |
| 86 | + * _Note that producing actual documentation is a further extension of this project to be scoped accordingly._ |
| 87 | + |
| 88 | +The report will aim to provide a clear, shared understanding of the quality and state of these libraries and the scope of their utility for achieving basic tasks with Filecoin (wallet transactions, state inspection, deal making, etc.) (i.e. "shared" because it is critical that this is communicated and understood by relevant parties)). An ideal outcome of this would be further project proposals to undertake improvements. |
| 89 | + |
| 90 | +The report should provide sufficient clarity to be able to rate (and priority sort) proposals for further work on relevant libraries (or non-existing libraries) to interact with Filecoin, and the Lotus RPC itself with regards to its affordances for external users. |
| 91 | + |
| 92 | +#### What does success look like? |
| 93 | + |
| 94 | +_Success means impact. How will we know we did the right thing?_ |
| 95 | + |
| 96 | +A clearer path to the improvement of external Lotus interaction |
| 97 | + |
| 98 | +#### Counterpoints & pre-mortem |
| 99 | + |
| 100 | +_Why might this project be lower impact than expected? How could this project fail to complete, or fail to be successful?_ |
| 101 | + |
| 102 | +#### Alternatives |
| 103 | + |
| 104 | +_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?_ |
| 105 | + |
| 106 | +#### Dependencies/prerequisites |
| 107 | + |
| 108 | +#### Future opportunities |
| 109 | + |
| 110 | +## Required resources |
| 111 | + |
| 112 | +#### Effort estimate |
| 113 | + |
| 114 | +<!--T-shirt size rating of the size of the project. If the project might require external collaborators/teams, please note in the roles/skills section below). |
| 115 | +For a team of 3-5 people with the appropriate skills: |
| 116 | +- Small, 1-2 weeks |
| 117 | +- Medium, 3-5 weeks |
| 118 | +- Large, 6-10 weeks |
| 119 | +- XLarge, >10 weeks |
| 120 | +Describe any choices and uncertainty in this scope estimate. (E.g. Uncertainty in the scope until design work is complete, low uncertainty in execution thereafter.) |
| 121 | +--> |
| 122 | + |
| 123 | +Small for 3-5 FTEs (i.e. lower for smaller investment, as available to Sudo at the time of writing) |
| 124 | + |
| 125 | +#### Roles / skills needed |
| 126 | + |
| 127 | +<!--Describe the knowledge/skill-sets and team that are needed for this project (e.g. PM, docs, protocol or library expertise, design expertise, etc.). If this project could be externalized to the community or a team outside PL's direct employment, please note that here.--> |
| 128 | + |
| 129 | +* JavaScript |
| 130 | +* TypeScript |
| 131 | +* Lotus (some Go) |
| 132 | +* Basic Filecoin understanding |
0 commit comments