ServiceNervousSystemManagement(136227): Publish SNS Governance WASM Built at Commit 7575e49
Publish SNS Governance WASM Built at Commit 7575e49
Proposer: maximilian.summe at dfinity.org
Source code: 7575e49a4afa83524c06ad72ce40f588eca93ae2
Features & Fixes
Added
Topic-based following
The new SetFollowing neuron command allows following voting decisions based on proposal topics.
This command can be used to set or change following for any number of topics at once. Users are encouraged to set following based on topics, although legacy following (based on individual proposal types) will still work until further notice. However, this command may clear some legacy following if it becomes redundant, specifically, in the following cases:
- Following on proposal types within the topics explicitly mentioned by
SetFollowing. - Legacy catch-all following, if a neuron has topic-based following for all non-critical
topics, or if the
SetFollowingcommand mentions each non-critical topic.
For example:
dfx canister --ic call SNS_GOVERNANCE manage_neuron '(record {
subaccount = FOLLOWER_NEURON_ID_BLOB;
command = opt variant {
SetFollowing = record {
topic_following = vec {
record {
topic = opt variant { ApplicationBusinessLogic };
followees = vec {
record {
alias = opt "Giuseppe Arcimboldo";
neuron_id = opt record { id = FOLLOWEE_NEURON_ID_BLOB };
};
};
};
record {
topic = opt variant { CriticalDappOperations };
followees = vec {};
}}}}})'
In this example, following on the ApplicationBusinessLogic topic is changed (from whatever has
been there before) to a single neuron, and following on CriticalDappOperations is being
removed.
Followee aliases are option; they are currently used only when listing neurons being followed (a.k.a. followees), which helps remember why a particular one has been added in the first place.
Backward compatibility.
Legacy following still works for proposal types and for neurons that do not have any topic-based
following for covering that proposal type. For example, after executing the following command,
the modified neuron would still follow on, e.g., DeregisterDappCanisters proposals, assuming
it had followed some neuron on this proposal type.
Topic-based following takes precedence over legacy following, e.g., regardless of which
legacy following has been set up for the neuron modified in the above example, that neuron will
now only follow Giuseppe Arcimboldo on proposals within the ApplicationBusinessLogic topic.
Legacy catch-all following is also still supported for neurons that follow on the respective
special proposal type 0, but only for neurons that do not already follow on the specific topic
in question (nor follow on the specific proposal type being voted on). In other words, catch-all
has the lowest precedence, and topic-based following now has the highest.
Filtering proposals by topic
SnsGov.list_proposals now supports filtering by proposal topic. For example, the following
command can be used to list proposals that are either under the Governance topic or do not specify
a topic:
dfx canister SNS_GOVERNANCE call list_proposals '(
record {
include_reward_status = vec {};
limit = 0 : nat32;
exclude_type = vec {};
include_status = vec {};
include_topic = opt vec {
record { topic = null };
record { topic = opt variant { Governance } };
};
},
)'
If include_topic is not mentioned or null, then proposals are listed regardless of their topic.
New Commits
$ git log --format="%C(auto) %h %s" c5dee3a11b79da7b5c433574f38605d75c9feaf5..7575e49a4afa83524c06ad72ce40f588eca93ae2 -- ./rs/sns/governance
d412bc7c7a test(sns): Faster set-following tests (#4772)
d24b82128b feat(sns): Proposals can be filtered by topic (#4752)
966cdfa97a feat(sns): Fine-grained unsetting of legacy proposal following while setting topic following (#4714)
ce63b3d75f feat(sns): Enable topic-based following (#4666)
b1ea6321f4 feat(sns): Extend `cast_vote_and_cascade_follow` to take topic-based following into account (#4583)
f69d7446a3 feat(sns): neuron `SetFollowing` command is validated in composition (#4563)
c643f4a073 feat(sns): Implement topic following index (#4576)
010db5b58f feat(sns): neuron `SetFollowing` command is validated in isolation (#4543)
274e6eb6e4 feat(sns_cli): Add topics info to json output (#4440)
15b655f3fb feat(sns): Add new neuron command `SetFollowing` (#4460)
4516d9fbbf docs(governance-backend): Updated CHANGELOG.md files for 2025-03-21 release. (#4462)
Wasm Verification
See the general instructions on how to verify proposals like this. A "quick start" guide is provided here.
See "Building the code" for prerequisites.
# 1. Get a copy of the code.
git clone [email protected]:dfinity/ic.git
cd ic
# Or, if you already have a copy of the ic repo,
git fetch
git checkout 7575e49a4afa83524c06ad72ce40f588eca93ae2
# 2. Build canisters.
./ci/container/build-ic.sh -c
# 3. Fingerprint the result.
sha256sum ./artifacts/canisters/sns-governance-canister.wasm.gz
This should match wasm field of this proposal.
Proposal to execute nervous system function:
Nervous system function:
NervousSystemFunction { id: 1000, name: "Vote on NNS proposal", description: Some( "Vote yes to a given NNS proposal. If there is no strict majority, vote for the majority outcome.", ), function_type: Some( GenericNervousSystemFunction( GenericNervousSystemFunction { target_canister_id: Some( tsbvt-pyaaa-aaaar-qafva-cai, ), target_method_name: Some( "approve_proposal", ), validator_canister_id: Some( tsbvt-pyaaa-aaaar-qafva-cai, ), validator_method_name: Some( "approve_proposal_validate", ), topic: Some( ApplicationBusinessLogic, ), }, ), ), }
Payload sha256:
adb2aad940d057113d6c4892d9169ac29f5b91c9a9e143091c33c3c02fc649c9
Payload:
136227