Governance Interface Breaking

It looks like the NNS interface was broken again:

[2. 2025-10-13T19:23:29.529579689Z]: [TRAP]: IDL error: byte tag not 0 or 1
Canister Backtrace:
@deserialize_go<?r(id:n64)>
@deserialize_go<r(ballots:v(n64r(vote:i32,voting_power:n64)),deadline_timestamp_seconds:6=?n64,decided_timestamp_seconds:n64,derived_proposal_information:?r(swap_background_information:?r(dapp_canister_summaries:11=v12=r(canister_id:13=?P,status:?r(controllers:17=vP,cycles:!6,freezing_threshold:!6,idle_cycles_burned_per_day:!6,memory_size:!6,module_hash:B,status:19=?i32)),fallback_controller_principal_ids:!17,governance_canister_summary:20=?!12,ledger_archive_canister_summaries:!11,ledger_canister_summary:!20,ledger_index_canister_summary:!20,root_canister_summary:!20,swap_canister_summary:!20)),executed_timestamp_seconds:n64,failed_timestamp_seconds:n64,failure_reason:?r(error_message:t,error_type:i32),id:24=?25=r(id:n64),latest_tally:?r(no:n64,timestamp_seconds:n64,total:n64,yes:n64),proposal:?29=r(action:?v(AddOrRemoveNodeProvider:r(change:?v(ToAdd:35=r(id:!13,reward_account:36=?r(hash:B)),ToRemove:!35)),ApproveGenesisKyc:r(principals:!17),CreateServiceNervousSystem:r(dapp_canisters:vr(id:!13),description:42=?t,fallback_controller_principal_ids:!17,governance_parameters:?r(neuron_maximum_age_bonus:45=?r(basis_points:!6),neuron_maximum_age_for_age_bonus:47=?r(seconds:!6),neuron_maximum_dissolve_delay:!47,neuron_maximum_dissolve_delay_bonus:!45,neuron_minimum_dissolve_delay_to_vote:!47,neuron_minimum_stake:49=?r(e8s:!6),proposal_initial_voting_period:!47,proposal_rejection_fee:!49,proposal_wait_for_quiet_deadline_increase:!47,voting_reward_parameters:?r(final_reward_rate:!45,initial_reward_rate:!45,reward_rate_transition_duration:!47)),initial_token_distribution:?r(developer_distribution:?r(developer_neurons:vr(controller:!13,dissolve_delay:!47,memo:!6,stake:!49,vesting_period:!47)),swap_distribution:59=?r(total:!49),treasury_distribution:!59),ledger_parameters:?r(token_logo:63=?r(base64_encoding:!42),token_name:!42,token_symbol:!42,transaction_fee:!49),logo:!63,name:!42,swap_parameters:?r(confirmation_text:!42,duration:!47,maximum_direct_participation_icp:!49,maximum_icp:!49,maximum_participant_icp:!49,minimum_direct_participation_icp:!49,minimum_icp:!49,minimum_participant_icp:!49,minimum_participants:!6,neuron_basket_construction_parameters:?r(count:!6,dissolve_delay_interval:!47),neurons_fund_investment_icp:!49,neurons_fund_participation:69=?b,restricted_countries:?r(iso_codes:vt),start_time:?r(seconds_after_utc_midnight:!6)),url:!42),ExecuteNnsFunction:r(nns_function:i32,payload:B),InstallCode:r(arg_hash:78=?B,canister_id:!13,install_mode:!19,skip_stopping_before_installing:!69,wasm_module_hash:!78),ManageNetworkEconomics:r(max_proposals_to_keep_per_topic:n32,maximum_node_provider_rewards_e8s:n64,minimum_icp_xdr_rate:n64,neuron_management_fee_per_proposal_e8s:n64,neuron_minimum_stake_e8s:n64,neuron_spawn_dissolve_delay_seconds:n64,neurons_fund_economics:?r(max_theoretical_neurons_fund_participation_amount_xdr:83=?r(human_readable:!42),maximum_icp_xdr_rate:!45,minimum_icp_xdr_rate:!45,neurons_fund_matched_funding_curve_coefficients:?r(contribution_threshold_xdr:!83,full_participation_milestone_xdr:!83,one_third_participation_milestone_xdr:!83)),reject_cost_e8s:n64,transaction_fee_e8s:n64),ManageNeuron:r(command:?v(ClaimOrRefresh:r(by:?v(Memo:n64,MemoAndController:r(controller:!13,memo:n64),NeuronIdOrSubaccount:r())),Configure:r(operation:?v(AddHotKey:r(new_hot_key:!13),ChangeAutoStakeMaturity:r(requested_setting_for_auto_stake_maturity:b),IncreaseDissolveDelay:r(additional_dissolve_delay_seconds:n32),JoinCommunityFund:r(),LeaveCommunityFund:r(),RemoveHotKey:r(hot_key_to_remove:!13),SetDissolveTimestamp:r(dissolve_timestamp_seconds:n64),SetVisibility:r(visibility:!19),StartDissolving:r(),StopDissolving:r())),Disburse:r(amount:?r(e8s:n64),to_account:!36),DisburseToNeuron:r(amount_e8s:n64,dissolve_delay_seconds:n64,kyc_verified:b,new_controller:!13,nonce:n64),Follow:r(followees:109=v!25,topic:i32),MakeProposal:!29,Merge:r(source_neuron_id:!24),MergeMaturity:r(percentage_to_merge:n32),RegisterVo

BOOOOO… Stop breaking the interface..it breaks canisters.

Now there is a bunch of maturity that was missed. Blah.

1 Like

Actually, I updated the IDL to the latest from the governance canister and I’m still getting this error:

[3. 2025-11-27T22:36:11.883210312Z]: [TRAP]: RTS error: utf8_validate: string is not UTF-8
Canister Backtrace:
rts_trap
motoko_rts::trap_with_prefix::he8100cb29d484fcc
motoko_rts::rts_trap_with::h0840ab098bb48752
utf8_validate
@deserialize_go<t>
@deserialize_go<0=r(action:?v(AddOrRemoveNodeProvider:r(change:?v(ToAdd:6=r(id:7=?P,reward_account:9=?r(hash:B)),ToRemove:!6)),ApproveGenesisKyc:r(principals:13=vP),CreateServiceNervousSystem:r(dapp_canisters:vr(id:!7),description:17=?t,fallback_controller_principal_ids:!13,governance_parameters:?r(neuron_maximum_age_bonus:21=?r(basis_points:23=?n64),neuron_maximum_age_for_age_bonus:25=?r(seconds:!23),neuron_maximum_dissolve_delay:!25,neuron_maximum_dissolve_delay_bonus:!21,neuron_minimum_dissolve_delay_to_vote:!25,neuron_minimum_stake:27=?r(e8s:!23),proposal_initial_voting_period:!25,proposal_rejection_fee:!27,proposal_wait_for_quiet_deadline_increase:!25,voting_reward_parameters:?r(final_reward_rate:!21,initial_reward_rate:!21,reward_rate_transition_duration:!25)),initial_token_distribution:?r(developer_distribution:?r(developer_neurons:vr(controller:!7,dissolve_delay:!25,memo:!23,stake:!27,vesting_period:!25)),swap_distribution:37=?r(total:!27),treasury_distribution:!37),ledger_parameters:?r(token_logo:41=?r(base64_encoding:!17),token_name:!17,token_symbol:!17,transaction_fee:!27),logo:!41,name:!17,swap_parameters:?r(confirmation_text:!17,duration:!25,maximum_direct_participation_icp:!27,maximum_icp:!27,maximum_participant_icp:!27,minimum_direct_participation_icp:!27,minimum_icp:!27,minimum_participant_icp:!27,minimum_participants:!23,neuron_basket_construction_parameters:?r(count:!23,dissolve_delay_interval:!25),neurons_fund_investment_icp:!27,neurons_fund_participation:47=?b,restricted_countries:?r(iso_codes:vt),start_time:?r(seconds_after_utc_midnight:!23)),url:!17),ExecuteNnsFunction:r(nns_function:i32,payload:B),InstallCode:r(arg_hash:57=?B,canister_id:!7,install_mode:58=?i32,skip_stopping_before_installing:!47,wasm_module_hash:!57),ManageNetworkEconomics:r(max_proposals_to_keep_per_topic:n32,maximum_node_provider_rewards_e8s:n64,minimum_icp_xdr_rate:n64,neuron_management_fee_per_proposal_e8s:n64,neuron_minimum_stake_e8s:n64,neuron_spawn_dissolve_delay_seconds:n64,neurons_fund_economics:?r(max_theoretical_neurons_fund_participation_amount_xdr:63=?r(human_readable:!17),maximum_icp_xdr_rate:!21,minimum_icp_xdr_rate:!21,neurons_fund_matched_funding_curve_coefficients:?r(contribution_threshold_xdr:!63,full_participation_milestone_xdr:!63,one_third_participation_milestone_xdr:!63)),reject_cost_e8s:n64,transaction_fee_e8s:n64),ManageNeuron:r(command:?v(ClaimOrRefresh:r(by:?v(Memo:n64,MemoAndController:r(controller:!7,memo:n64),NeuronIdOrSubaccount:r())),Configure:r(operation:?v(AddHotKey:r(new_hot_key:!7),ChangeAutoStakeMaturity:r(requested_setting_for_auto_stake_maturity:b),IncreaseDissolveDelay:r(additional_dissolve_delay_seconds:n32),JoinCommunityFund:r(),LeaveCommunityFund:r(),RemoveHotKey:r(hot_key_to_remove:!7),SetDissolveTimestamp:r(dissolve_timestamp_seconds:n64),SetVisibility:r(visibility:!58),StartDissolving:r(),StopDissolving:r())),Disburse:r(amount:?r(e8s:n64),to_account:!9),DisburseToNeuron:r(amount_e8s:n64,dissolve_delay_seconds:n64,kyc_verified:b,new_controller:!7,nonce:n64),Follow:r(followees:89=v90=r(id:n64),topic:i32),MakeProposal:!0,Merge:r(source_neuron_id:92=?!90),MergeMaturity:r(percentage_to_merge:n32),RegisterVote:r(proposal:!92,vote:i32),Spawn:r(new_controller:!7,nonce:!23,percentage_to_spawn:96=?n32),Split:r(amount_e8s:n64),StakeMaturity:r(percentage_to_stake:!96)),id:!92,neuron_id_or_subaccount:?v(NeuronId:!90,Subaccount:B)),Motion:r(motion_text:t),OpenSnsTokenSwap:r(community_fund_investment_e8s:!23,params:?r(max_direct_participation_icp_e8s:!23,max_icp_e8s:n64,max_participant_icp_e8s:n64,min_direct_participation_icp_e8s:!23,min_icp_e8s:n64,min_participant_icp_e8s:n64,min_participants:n32,neuron_basket_construction_parameters:?r(count:n64,dissolve_delay_interval_seconds:n64),sale_delay_seconds:!23,sns_token_e8s:n64,swap_due_timestamp_seconds:n64),

Did someone slide something funky that motoko doesn’t like into one of the text strings?

@claudio @ggreif

Repo is here: GitHub - icdevsorg/eventually_reject: A simple motoko actor that will eventually reject all non-exchange rate proposals before the voting window closes.

1 Like

I’ve upgraded to a more recent version of motoko and dfx and things seem to be back on track…I’ll follow up.

3 Likes

Glad you have gotten things working again. Sorry for the mess. Hope it wasn’t due to anything I worked on.

Stop breaking the interface..it breaks canisters.

I think we are very intentional about avoiding breaking changes. For example, we have tests that detects breaking changes. Also, the Governance team created a reminder bot that asks, “Is this a breaking change?” on all of our code reviews, and the bot requires a written confirmation from the author of the code.

We do on occasion make breaking changes. In such cases, we do our best to announce them well in advance on the forum, and to provide a gradual migration path.

3 Likes

Just curious, do you mean that after the upgrading that you mentioned, fetching the exact same proposals (I assume this is where it fails, based on the error message) succeeds while it fails previously, as opposed to fetching a different set of proposals (due to passage of time and the status of the proposals) now succeed?

That is a good question. I made all the changes pretty quickly, so I’m assuming that it was the same proposals that failed before and then worked after, but I can’t be 100 percent sure.

I expect there was some kind of internal motoko thing that was failing to parse something(maybe it was retrieving candid behind the scenes and something changed in the candid definition? Or maybe someone put a unicode character(lookingđź‘€ at you tendies - Actually something around October 12th) in a proposal text that motoko choked on in a previous version but fixed at some point.