Mainnet: liberated runtime (drop sudo pallet)#4478
Mainnet: liberated runtime (drop sudo pallet)#4478mnaamani merged 13 commits intoJoystream:mainnet-liberatedfrom
drop sudo pallet)#4478Conversation
…me-drop-sudo-pallet
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Lezek123
left a comment
There was a problem hiding this comment.
- Should we also remove
pallet-sudofrom the runtime dependencies? - I think we can also remove
sudo_upload_data_objectsfrom the storage pallet. - Argus and Colossus have
devcommands that rely onsudo, so the builds are now failing. We need to remember to remove them before the release. Some devops scripts andapi-scriptswill also need an update.
Only made a few minor changes to some devops and github workflows, but left |
Lezek123
left a comment
There was a problem hiding this comment.
Additional notes:
- There's still a mention of sudo in
devops/aws/README.md
Besides those minor issues everything looks good.
I ran a following tests to confirm storage/distribution nodes from mainnet branch remain compatible with the no-sudo runtime:
- Checked-out
mainnetbranch yarn build:packagesRUNTIME_PROFILE=TESTING yarn start- In a separate workspace I checked out this PR's branch and ran:
RUNTIME_PROFILE=TESTING ./scripts/cargo-build.sh - Executed a runtime upgrade (via sudo) to this PR's runtime using https://polkadot.js.org/apps
- Commented out all tests except
channelsAndVideosCliJob,initDistributionBucketandinitStorageBucketfromtests/integration-tests/scenarios/full.ts - Copied
tests/network-tests/output.jsonfile from the workspace where I hadmainnetbranch checked-out to the workspace where I had this PR checked-out - Executed
REUSE_KEYS=true ./tests/network-tests/run-test-scenario.sh fullon this PR's branch - Tests executed successfully, see output below:
$ node -r ts-node/register --unhandled-rejections=strict src/scenarios/full.ts
integration-tests:api-factory Connecting to chain, attempt 1.. +0ms
Runtime Version: 12.1002.0
integration-tests:scenario Full +0ms
integration-tests:job:manage channels and videos through CLI Running +0ms
integration-tests:flow:cliChannelsAndVideos Started +0ms
integration-tests:flow:cliChannelsAndVideos Creating a channel... +23s
integration-tests:query-node-api:query getChannelById({"id":"1"}) +0ms
integration-tests:query-node-api:try:toString()) Unexpected query result (expected false to equal true) +0ms
integration-tests:query-node-api:try:toString()) Retrying query in 9000ms... +0ms
integration-tests:query-node-api:query getChannelById({"id":"1"}) +9s
integration-tests:flow:cliChannelsAndVideos Updating channel... +29s
integration-tests:query-node-api:query getChannelById({"id":"1"}) +8s
integration-tests:query-node-api:try:toString()) Unexpected query result (expected 'Test channel' to equal 'Test channel [UPDATED!]') +0ms
integration-tests:query-node-api:try:toString()) Retrying query in 9000ms... +0ms
integration-tests:query-node-api:query getChannelById({"id":"1"}) +9s
integration-tests:flow:cliChannelsAndVideos Creating a video... +17s
integration-tests:query-node-api:query getVideoById({"videoId":"1"}) +7s
integration-tests:query-node-api:try:toString()) Unexpected query result (Video not found) +0ms
integration-tests:query-node-api:try:toString()) Retrying query in 9000ms... +0ms
integration-tests:query-node-api:query getVideoById({"videoId":"1"}) +9s
integration-tests:flow:cliChannelsAndVideos Updating video... +17s
integration-tests:query-node-api:query getVideoById({"videoId":"1"}) +8s
integration-tests:query-node-api:try:toString()) Unexpected query result (expected 'Test video' to equal 'Test video [UPDATED!]') +0ms
integration-tests:query-node-api:try:toString()) Retrying query in 9000ms... +0ms
integration-tests:query-node-api:query getVideoById({"videoId":"1"}) +9s
integration-tests:flow:cliChannelsAndVideos Done +17s
integration-tests:job:manage channels and videos through CLI [Succeeded] +2m
integration-tests:job:init storage and distribution buckets via CLI Running +0ms
integration-tests:flow:initDistributionBucketViaCLI Started +0ms
integration-tests:flow:initStorageBucketViaCLI Started +0ms
integration-tests:flow:initStorageBucketViaCLI Done +26s
integration-tests:flow:initDistributionBucketViaCLI Done +42s
integration-tests:job:init storage and distribution buckets via CLI [Succeeded] +42s
Job Results:
manage channels and videos through CLI: Succeeded
init storage and distribution buckets via CLI: Succeeded
Writing generated account to output.json
Done in 156.25s.
Done in 156.46s.
real 2m36,571s
user 2m55,918s
sys 0m6,312s
| /// Create a dynamic bag. Development mode. | ||
| /// <weight> | ||
| /// |
There was a problem hiding this comment.
Just noticed there's a leftover comment
| /// Create a dynamic bag. Development mode. | |
| /// <weight> | |
| /// |
There was a problem hiding this comment.
funny this comment is wrong for the function :) will fix.
| ]).requires(councilFailuresJob) | ||
|
|
||
| return | ||
| // Below flows depend on sudo which has been disabled. So skipping for now. |
There was a problem hiding this comment.
Seems like:
creatingMembers,creatingFoundingMembers,invitingMebersandproposals
flow also depends on sudo
There was a problem hiding this comment.
Yes I noticed it failed in CI checks. I think will leave the effort to fix integrations properly in a future PR as it will need quite a bit of refactoring.
There was a problem hiding this comment.
Might also make sense to remove the createMembership dispatch from membership pallet, since they require root origin and I doubt we will add a proposal type that create a membership.
| @@ -48,7 +48,6 @@ | |||
| environment: | |||
| JOYSTREAM_NODE_WS: 'ws://{{ inventory_hostname }}:9944/' | |||
| # TREASURY_ACCOUNT_URI: '{% if endowed_key is defined %}{{ endowed_key }}{% else %}{{ sudo_key }}{% endif %}' | |||
There was a problem hiding this comment.
| # TREASURY_ACCOUNT_URI: '{% if endowed_key is defined %}{{ endowed_key }}{% else %}{{ sudo_key }}{% endif %}' | |
| # TREASURY_ACCOUNT_URI: '{{ endowed_key }}' |
There was a problem hiding this comment.
Will drop all env variables here expect the ws endpoint.
The other variables where there because previously instead of starting only query-node the playbook also attempted to start a faucet, and initialized it with the faucet setup scenario from integration tests.
| api: ApiPromise, | ||
| account: KeyringPair, | ||
| tx: SubmittableExtrinsic<'promise'>, | ||
| sudoCall = false, |
There was a problem hiding this comment.
Should also be removed from the parameters list in the comment above (@param sudoCall)
|
Thank you for verifying the behavior of the apps after runtime upgrade. |
Lezek123
left a comment
There was a problem hiding this comment.
Looks good, I'll leave it up to you whether to also fix #4478 (comment) and remove the createMembership dispatch as part of this PR
Dropping
sudopallet and updated chain metadata and types.This of course breaks a few checks, any code that depends on making sudo calls.