substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Metadata for proposal and referendum

Open muharem opened this issue 3 years ago • 7 comments

Metadata for proposal/referendum records within the referenda and the democracy pallets.

Goals:

  • improve end user experience (clients can load human readable information like a description of a proposal and display it to the end user);
  • metadata stored on chain, or its proof.

Implementation:

Proposals and referendums records has optional 1:1 metadata record, which stores the hash of the preimage. The preimage is supposed to be uploaded via any preimage provider (e.x preimage pallet). After the preimage is uploaded a submitter of the proposal/referendum is able to set the metadata (preimage hash).

In the democracy pallet the metadata can be set only for a proposal (public or external). If the proposal evolves to the referendum the metadata is inherited and can be reset or cleared only by root origin (due the absence of the submitter information, and a fit to the overall idea).

The preimage can store a JSON dump with title and description, IPFS hash representing the off-chain file, or any other format a runtime owner picked up.

TODO

  • [ ] Companions PRs

muharem avatar Oct 26 '22 19:10 muharem

/cmd queue -c bench-bot $ pallet dev pallet_democracy /cmd queue -c bench-bot $ pallet dev pallet_referenda

muharem avatar Oct 31 '22 11:10 muharem

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999235 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_democracy. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 5-2dee6a99-a014-4dfd-8827-30966a744f72 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 31 '22 11:10 command-bot[bot]

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999236 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_referenda. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 6-38d41ce4-534b-4c77-8d23-c2794f9ce26a to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 31 '22 11:10 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_democracy has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999235 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999235/artifacts/download.

command-bot[bot] avatar Oct 31 '22 12:10 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_referenda has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999236 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999236/artifacts/download.

command-bot[bot] avatar Oct 31 '22 12:10 command-bot[bot]

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/a-better-treasury-system/291/16

Polkadot-Forum avatar Nov 09 '22 02:11 Polkadot-Forum

I have removed preimage::request on set_metadata in the last commit (https://github.com/paritytech/substrate/pull/12568/commits/48ebf6d0fd49483691caaef93e4c57f9df7586a3). This wont let a submitter release its preimage deposit without removing a preimage. Same model used for proposal calls in the referenda and democracy pallets.

muharem avatar Jan 23 '23 18:01 muharem

/cmd queue -c bench-bot $ pallet dev pallet_referenda

muharem avatar Jan 27 '23 15:01 muharem

@muharem Could not find matching configuration bench-bot; available ones are bench, fmt, sample, try-runtime.

command-bot[bot] avatar Jan 27 '23 15:01 command-bot[bot]

/cmd queue -c bench $ pallet dev pallet_referenda /cmd queue -c bench $ pallet dev pallet_democracy

muharem avatar Jan 27 '23 15:01 muharem

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326839 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 58-ff1c8793-e9d7-49eb-bb70-f905295b2397 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Jan 27 '23 15:01 command-bot[bot]

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326840 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_democracy. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 59-db3007ac-6163-42d6-b09c-e9d6849ab1f9 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Jan 27 '23 15:01 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_democracy has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326840 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326840/artifacts/download.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326839 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2326839/artifacts/download.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

/cmd queue -c bench $ pallet dev pallet_referenda /cmd queue -c bench $ pallet dev pallet_democracy

muharem avatar Jan 27 '23 16:01 muharem

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327160 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 60-c7251fb5-7411-4229-a117-b59f4069678c to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327161 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_democracy. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 61-e0f2f6d5-1c43-4c9b-a793-895654574b53 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_democracy has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327161 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327161/artifacts/download.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327160 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327160/artifacts/download.

command-bot[bot] avatar Jan 27 '23 16:01 command-bot[bot]

/cmd queue -c bench $ pallet dev pallet_referenda

muharem avatar Jan 27 '23 17:01 muharem

@muharem https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327347 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 62-c2c49837-091d-4683-b79e-e839683954f7 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Jan 27 '23 17:01 command-bot[bot]

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_referenda has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327347 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2327347/artifacts/download.

command-bot[bot] avatar Jan 27 '23 17:01 command-bot[bot]

bot rebase

muharem avatar Feb 08 '23 07:02 muharem

Rebased

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-39/2277/1

Polkadot-Forum avatar Mar 09 '23 19:03 Polkadot-Forum