Difference between revisions of "How-To: Create an NNS motion proposal"
Diego.prats (talk | contribs) |
Diego.prats (talk | contribs) |
||
Line 110: | Line 110: | ||
==How to send a proposal== | ==How to send a proposal== | ||
+ | |||
+ | In this section, we will try to create a motion proposal similar to this one: https://dashboard.internetcomputer.org/proposal/31159 | ||
===Craft a proposal in markdown=== | ===Craft a proposal in markdown=== | ||
+ | |||
+ | The IC Dashboard and the NNS frontend dapp both render markdown of the <code>summary</code> field. It is recommended to use standard markdown for your motion proposal. | ||
+ | |||
+ | Example markdown for a NNS motion proposal: | ||
+ | |||
+ | <pre> | ||
+ | ## Objective | ||
+ | |||
+ | Service nervous systems (SNSs) are algorithmic DAOs that allow developers to create decentralized, token-based governance systems for their dapps. | ||
+ | |||
+ | After the community adopted the R&D motion proposal stating that the foundation should work on this topic, this present motion proposal suggests a concrete design for an open governance canister implementation that can then be used to realise the SNSs. | ||
+ | |||
+ | The proposed governance canister design is similar to the governance canister of the Network Nervous System (NNS) but simpler and more flexible, allowing each SNS community to choose the configurations according to their needs. This design is also presented and discussed in this forum: https://forum.dfinity.org/t/open-governance-canister-for-sns-design-proposal/10224 . | ||
+ | |||
+ | ## Background | ||
+ | |||
+ | ### Relation to the original SNS design & overall approach | ||
+ | DFINITY Foundation presented a first proposed [SNS design](https://www.youtube.com/watch?v=L4443aaAP5A) in October 2021. The community feedback was that the SNS design was rather complex and does not leave a lot of freedom to developers to configure a DAO to their needs. Some developers mentioned that they have a particular DAO or use case in mind and are only interested in an implementation of a ledger or governance canister, which they plan to integrate with existing canisters. | ||
+ | |||
+ | ## Community conversation & Timeline | ||
+ | The NNS team is ready to work on this feature! | ||
+ | To get the design approved by the community, we followed the following schedule: | ||
+ | |||
+ | * Jan 11-18th: Design discussion on the forum thread | ||
+ | * Jan 18th: Community conversation about the topic | ||
+ | * Jan 20th: Developer discussion on Discord | ||
+ | * today: motion proposal submission proposing the above design | ||
+ | |||
+ | ## What we are asking the community: | ||
+ | |||
+ | * Vote accept or reject on NNS Motion | ||
+ | * Participate in technical discussions as the motion moves forward | ||
+ | |||
+ | Developer Forum: https://forum.dfinity.org/t/open-governance-canister-for-sns-design-proposal/10224/10" | ||
+ | |||
+ | </pre> | ||
+ | |||
===Send proposal via dfx=== | ===Send proposal via dfx=== | ||
===Check dashboard to see proposal was successful=== | ===Check dashboard to see proposal was successful=== |
Revision as of 21:39, 2 February 2022
This article explains one way to submit NNS motion proposals by using a few command line tools and a self-custody neuron.
Background
To properly follow what is going on, there are a few high-level points worth highlighting:
Only Neurons can submit NNS proposals
Neurons with at least 1 ICP and 6 months of dissolve delay can submit NNS proposals. So the first step is to create such a neuron.
The NNS Governance Canister accepts motion proposals
The Governance Canister is just a canister like any other, so it has a Candid file, it accepts messages, etc... This article describes a way where you can have your local computer send a message to the governance canister (signed on behalf of a neuron) that contains a motion proposal.
One-time setup
Install Tools
1. Install dfx
- dfx is the canister SDK and it will be used to send messages from your machine to NNS
- smartcontracts.org
$ dfx [OPTIONS] <SUBCOMMAND>
2. Install keysmith
- keysmith will be used to generate a privat/public key pair for the IC
- https://github.com/dfinity/keysmith
- this article will assume that you execute quill on your local machine by running
$ keysmith [OPTIONS] <SUBCOMMAND>
3. Install quill
- quill is a minimalist "governance toolkit". It is wrapper for crafting & sending messages to the NNS and manage one's neuron.
- https://github.com/dfinity/quill
- this article will assume that you execute quill on your local machine by running
$ target/release/quill [OPTIONS] <SUBCOMMAND>
Create a neuron via command-line tools
1. Create a private.pem
(private/public keypair) and Ledger account id
Before one starts, they need a private/public keypair.
// Create seed phrase $ keysmith generate -o seed.txt //Create private.pem $ keysmith private-key -o private.pem //Derive Ledger account from private key $ keysmith account -i 0
When done, your account id
should look something like this: 612ec300g9ec990da900d6ec45919e7d5dbb9fa0dd8e69c54d374df93aa28d57
.
2. Link this private/public keypair to dfx
so you can use it as an "Identity"
In this case, the new identity is called "proposals"
$ dfx identity import proposals private.pem
- If you see “creating identity: proposals” in the terminal, this means it worked*
- further reading on dfx identities: dfx identity
3. Send ICP to the account ID
generated in step 1
You should send at least 1.001 in order to have enough ICP to create a neuron and pay for the Ledger transaction fees.
To send ICP to the account, all you need is to input the account id
in your wallet of choice.
4. Now that the account has the required ICP, spawn a neuron
Note: This section assumes you have 'quill installed properly.
// Craft a message to "stake a the neuron by choosing a 8-character $NAME and an $AMOUNT to stake" $ target/release/quill --pem-file private.pem neuron-stake --name $NAME --amount $AMOUNT > message.json //Send the message crafted above. $ target/release/quill send message.json
- You should see a message with a neuron ID spawned
- If successful, response will return
neuron ID: 9_218_890_096_040_352_708
. This means the neuron ID is9218890096040352708
.
5. Increase neuron dissolve to at least 6 months
- Time is measured in seconds in the NNS
- One year in seconds: 31557600 seconds
// Craft message to increase dissolve delay of neuron to 1 year $ target/release/quill --pem-file private.pem neuron-manage 9218890096040352708 --additional-dissolve-delay-seconds 31557600 > message.json //send message created above to the NNS $ target/release/quill send message.json
How to send a proposal
In this section, we will try to create a motion proposal similar to this one: https://dashboard.internetcomputer.org/proposal/31159
Craft a proposal in markdown
The IC Dashboard and the NNS frontend dapp both render markdown of the summary
field. It is recommended to use standard markdown for your motion proposal.
Example markdown for a NNS motion proposal:
## Objective Service nervous systems (SNSs) are algorithmic DAOs that allow developers to create decentralized, token-based governance systems for their dapps. After the community adopted the R&D motion proposal stating that the foundation should work on this topic, this present motion proposal suggests a concrete design for an open governance canister implementation that can then be used to realise the SNSs. The proposed governance canister design is similar to the governance canister of the Network Nervous System (NNS) but simpler and more flexible, allowing each SNS community to choose the configurations according to their needs. This design is also presented and discussed in this forum: https://forum.dfinity.org/t/open-governance-canister-for-sns-design-proposal/10224 . ## Background ### Relation to the original SNS design & overall approach DFINITY Foundation presented a first proposed [SNS design](https://www.youtube.com/watch?v=L4443aaAP5A) in October 2021. The community feedback was that the SNS design was rather complex and does not leave a lot of freedom to developers to configure a DAO to their needs. Some developers mentioned that they have a particular DAO or use case in mind and are only interested in an implementation of a ledger or governance canister, which they plan to integrate with existing canisters. ## Community conversation & Timeline The NNS team is ready to work on this feature! To get the design approved by the community, we followed the following schedule: * Jan 11-18th: Design discussion on the forum thread * Jan 18th: Community conversation about the topic * Jan 20th: Developer discussion on Discord * today: motion proposal submission proposing the above design ## What we are asking the community: * Vote accept or reject on NNS Motion * Participate in technical discussions as the motion moves forward Developer Forum: https://forum.dfinity.org/t/open-governance-canister-for-sns-design-proposal/10224/10"