Hello, I believe there has been an upgrade to the SNS governance which requires one to set topics for GenericNervousSystemFunctions. When trying to add a new GenericNervousSystemFunctions, I’m getting the following error
SNS governance error: 1 defects in Proposal:
NervousSystemFunction must have a topic
I am not sure if this is already intended as I found in this post that this is only supposed to be released on March 24. In any case, this is a nice function but it blocks us right now from adding a new method as we don’t know the required payload to the proposal.
Is there already some documentation about the payload needed to pass to the AddGenericNervousSystemFunction proposal regarding the topic?
The post you refer to says that submitting custom proposals without topics will be disabled with an upcoming SNS Governance upgrade ETA Match 24.
What you’re observing is that registering a new custom proposal already requires setting the topic for it. Please consider using the following command as a template for your use case:
If you run just dfx canister --ic call $SNS_GOVERNANCE_CANISTER_ID manage_neuron and hit enter, you should get a nice auto complete for the candid structure, including the list of existing topics. Note that the critical topics (Critical Dapp Operations and Treasury & asset management) cannot be used right now.
The ETA for these two topics to become available to specify is next Monday (March 10).
The ETA for proposal criticality to be defined based on critical topics is in +1 week (March 17).
The topics are the same for all SNSs, custom topics will not be supported in the foreseeable future. One advantage of this design is that users will have a familiar interface for setting neuron following across different SNSs.
The advantage of DFX is that it’s always up to date with the latest SNS API and features, and I recommend using DFX in interactive mode to submit SNS proposals more easily (no need to hand craft Candid payloads). I’m working on a documentation page for describing all of this, but it’s still a draft.
I see. Thanks for confirming that DFX worked for you in this case.
Generally, we might migrate away from Quill to DFX for documenting SNS features, to avoid such issues in the future.
It’s also worth mentioning that the community has meantime developed some great tools, too. For example, I recommend looking into https://dev.ic-toolkit.app/ which makes submitting SNS proposals a breeze for those who prefer clicking rather than typing.
I have all my templates setup with quill, is there a way to get this to work with topic
# Set current directory to the directory this script is in
SCRIPT=$(readlink -f "$0")
SCRIPT_DIR=$(dirname "$SCRIPT")
cd $SCRIPT_DIR
PROPOSAL="(
record {
title = \"Create Update Club Callback Function\";
url = \"https://github.com/jamesbeadle/football_god/blob/master/src/data_canister/main.mo\";
summary = \"Proposal to create the endpoint for adding the callback function to update a club within the data canister.\";
action = opt variant {
AddGenericNervousSystemFunction = record {
id = 62000 : nat64;
name = \"Update Club\";
description = opt \"Function to update a club.\";
function_type = opt variant {
GenericNervousSystemFunction = record {
topic = opt variant { ApplicationBusinessLogic };
validator_canister_id = opt principal \"52fzd-2aaaa-aaaal-qmzsa-cai\";
target_canister_id = opt principal \"52fzd-2aaaa-aaaal-qmzsa-cai\";
validator_method_name = opt \"validateUpdateClub\";
target_method_name = opt \"updateClub\";
}
};
}
};
}
)"
../../utils/submit_proposal.sh "$PROPOSAL"
How do I record these proposals and then run them locally?
Manually do them all in dfx? It doesn’t work as a long term solution, scripting of proposals via files is really important, I do hope you find the time.