Local Proposal Payload Different From Sent

All local, not live:

I’ve been trying to remove then re add some generic nervous system functions but when I try adding them they already exist. Trying to figure out why the executed removal proposal isn’t working.

So here is an echo of my proposal:

( record { title = “Remove Callback Function”; url = “OpenFPL/src/OpenFPL_backend/main.mo at master · jamesbeadle/OpenFPL · GitHub”; summary = “Proposal to remove the endpoint for adding the callback function for creating the DAO controlled neuron.”; action = opt variant { RemoveGenericNervousSystemFunction = 1000:nat64 } } )

but in my local nns setup i can see the proposal doesn’t have an id in the payload:

Making me think this is what is causing the function id already exists error when I try to re add it…

Any help appreciated.

When a function is removed, a deletion marker is inserted at that id: ic/rs/sns/governance/src/governance.rs at 9fbfe24936109ce411bd22a2e2159edb0fd8780d · dfinity/ic · GitHub, which makes it so that an id cannot be reused. I think adding them with a different id should work.

Perhaps there are 2 things that can be improved:

  1. Documentation about the fact that function ids cannot be reused
  2. When validating the proposal to remove while the function was previously removed, the validation should not succeed, but should fail with some message like “cannot remove a function that was previously removed”
1 Like

Ah that makes sense, I will just use new function ids.

Thanks mate