feat: upload long vote description to IPFS. Add new vote as example.#183
Conversation
|
Hey-hey, You've made a lot of here, awesome 👍 will have a look till Monday's EOD 👀 |
There was a problem hiding this comment.
Done the first pass of a review 👍
The idea is neat and essential for the vote process transparency. I am all for it!
Thank you for driving the change here.
Left a few considerations and suggestions. To sum up, two points arise from my side:
- maybe we can improve cross-validation of description and overall sanity checks (not only for format but for the content itself)
- maybe we can detect what is the preferred IPFS service provider based on env vars set and give up only if no one was provided
|
The merge conflict has been appeared with the latest |
# Conflicts: # tests/acceptance/test_node_operators_registry.py
Co-authored-by: Eugene Mamin <TheDZhon@gmail.com>
There was a problem hiding this comment.
Great job on this! This should really simplify understanding the vote for voters.
I do have some minor concerns about the necessity of the vote_desc_items at the moment. Will there be any duplication of text from the general description? I've started a discussion in the Gov team chat about this.
upd. I don’t have any more questions about vote_desc_items and duplication of the items, Jenya K. made it clear to me.
Also, I was wondering if it's possible to include links in the description, such as "Item 1. Onboard 2 NOs. Discussion." I'd love to see how this would look on the test network.
Description
Goal
We want to have long-text free-form description for the onchain votes. Don't want to fit it into transaction, so would rather use IPFS for storage.
Proposed result
Tweak the vote.lido.fi UI code (next.js typescript app) so that if the vote data has ipfs hash (among other text), UI shows separate field with the text loaded from that IPFS hash (links in this text should be regular links in the UI).
The description should be uploaded to the IPFS upon the vote creation in script from https://github.com/lidofinance/scripts. The utils should have the function uploading the text to ipfs & adding the link to it to vote description.
Demo
case examples (with ipfs description | without):
CLI messages in sllent mode:
CLI messages in ineraction mode:
Markdown examples:
clear markdown in grid view:
Code review notes
New env variable should be added
WEB3_STORAGE_TOKENapi key form web3.storageTesting notes
I created vote only as example.
Checklist: