Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

[Nara] Restric curators deletion powers #4874

Closed mnaamani closed 1 year ago

mnaamani commented 1 year ago

Implements https://github.com/Joystream/joystream/issues/4589

Includes work from https://github.com/Joystream/joystream/pull/4875

The runtime migration can be tested against the live network by running:

RUN_MIGRATION_TESTS=true RUST_LOG=info cargo +nightly-2022-11-15 \
    test remote_tests::run_migrations --release --features try-runtime

The runtime upgrade can also be tested against any other chain with:

WS=ws://127.0.0.1:9944/ RUN_MIGRATION_TESTS=true RUST_LOG=info cargo +nightly-2022-11-15 \
    test remote_tests::run_migrations --release --features try-runtime

or

cargo +nightly-2022-11-15 build --release --features try-runtime
RUST_LOG=info,runtime=debug ./target/release/joystream-node try-runtime \
   --runtime ./target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.compressed.wasm \
   on-runtime-upgrade live --uri ws://127.0.0.1:9944/

We have a problem with the query-node. We have already solved how to allow processor to handle different version of an event type after runtime upgrade, however it cannot handle an event being removed entierly from a runtime. So for now the ChannelDeletedByModerator and VideoDeletedByModerator events are still part of the runtime despite no longer being emitted, only to be able to handle old runtime events. - I guess that is one more reason to move to subsquid.. (not like we needed any more reasons) - created an issue https://github.com/Joystream/joystream/issues/4877 -> resolved in https://github.com/Joystream/joystream/pull/4875 and https://github.com/Joystream/hydra/pull/531

With respect to mappings related to curator permissions there are none specific to ContentModerationAction. Query node is only keeping track of the "channel agent" permissions. So no changes to mappings is required.

┆Issue is synchronized with this Asana task by Unito

mnaamani commented 1 year ago

I am just wandering: shouldn't we replace the runtime migration tests in the CI with the try_runtime ones?

Yes we do here: https://github.com/Joystream/joystream/actions/runs/6245191588/job/16953377405?pr=4874#step:7:2 and https://github.com/Joystream/joystream/actions/runs/6245191588/job/16953377405?pr=4874#step:8:2

mnaamani commented 1 year ago

Will address your questions bedeho, but will merge for Ignazio's sake.