Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to polkadot v0.9.39 #4705

Merged
merged 93 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
cccc77e
v0.9.39 - set dependency
mnaamani Mar 2, 2023
f74dc18
v0.9.39 - pallet-randomness-collective-flip renamed (insecure)
mnaamani Mar 2, 2023
bb28c30
v0.9.39 - drop uncles code
mnaamani Mar 2, 2023
b770d81
v0.9.39 - adjust for renamed packages and update crates versions
mnaamani Mar 2, 2023
ab2d5c9
v0.9.39 - Origin rename to RuntimeOrigin
mnaamani Mar 2, 2023
eac1549
v0.9.39 - rename Event to RuntimeEvent
mnaamani Mar 3, 2023
547cbf8
v0.9.39 - workaround weights v2
mnaamani Mar 8, 2023
cc64367
v0.9.39 - more weights fixes
mnaamani Mar 9, 2023
e35ed91
v0.9.39 - fix pallet builds
mnaamani Mar 9, 2023
3a0ab6c
v0.9.39 - fix mock and tests use of Origin and Event types
mnaamani Mar 9, 2023
bb22687
v0.9.39 - Fix runtime build
mnaamani Mar 10, 2023
9b069a8
v0.9.39 - fix runtime tests build
mnaamani Mar 10, 2023
1033c1c
v0.9.39 - fix cli dependency on clap
mnaamani Mar 10, 2023
a2475af
v0.9.39 - tweak Cargo.toml build settings
mnaamani Mar 13, 2023
7ab781e
v0.9.39 - set MaxActiveValidators to not exceed genesis limit
mnaamani Mar 13, 2023
b78efb4
v0.9.39 - fix call-sizes build
mnaamani Mar 13, 2023
c400c98
v0.9.39 - fix node rpc,service
mnaamani Mar 13, 2023
b51dd88
v0.9.39 - no mmr
mnaamani Mar 13, 2023
40cb698
v0.9.39 - fix node build
mnaamani Mar 13, 2023
8872a09
v0.9.39 - Fix max block weight
mnaamani Mar 13, 2023
9697a84
v0.9.39 - fix runtime-benchmarks feature build
mnaamani Mar 13, 2023
caca06c
v0.9.39 - re-enable node-inspect command
mnaamani Mar 13, 2023
b5c2462
v0.9.39 - fix joystream-node unit tests
mnaamani Mar 13, 2023
7f4adef
v0.9.39 - update wastime to latest
mnaamani Mar 13, 2023
e811309
v0.9.39 - use rustc nightly-2022-11-15
mnaamani Mar 14, 2023
ff3989b
v0.9.39 - install protoc for libp2p build
mnaamani Mar 14, 2023
3ed4fae
v0.9.39 - update chain metadata and types
mnaamani Mar 14, 2023
d0a80bf
v0.9.39 - test correct spec version on upgrade
mnaamani Mar 14, 2023
2762641
v0.9.39 - use benchmarking v1 explicitly
mnaamani Mar 15, 2023
6e670eb
v0.9.39 - update benchmarking templates
mnaamani Mar 15, 2023
946f7d3
v0.9.39 - use generated weights (not final weights)
mnaamani Mar 15, 2023
28ec59d
v0.9.39 - ss58-registry no longer needs to be patched
mnaamani Mar 15, 2023
dfa917b
v0.9.39 - fix brenchmark tests
mnaamani Mar 15, 2023
e8c4f29
v0.9.39 - EitherOfDiverse in place of EnsureOneOf
mnaamani Mar 16, 2023
d86aab3
v0.9.39 - fix build of staking pallet during tests
mnaamani Mar 16, 2023
f279314
v0.9.39 - clippy fixes
mnaamani Mar 16, 2023
26e0994
cargo-checks covers runtime-benchmarks
mnaamani Mar 16, 2023
b39f7ed
v0.9.39 - more clippy fixes
mnaamani Mar 16, 2023
687e447
v0.9.39 - fix pallet dependencies on frame-benchmarking to run tests …
mnaamani Mar 16, 2023
d575b9e
v0.9.39 - use --locked with cargo build command
mnaamani Mar 20, 2023
5ed8e4d
devops - workaround missing aptitude
mnaamani Mar 20, 2023
7588b17
updated chain metadata
mnaamani Mar 20, 2023
87bc9ab
integration tests: tweaks bash scripts
mnaamani Mar 20, 2023
5ed79e2
v0.9.39 - cargo update packages
mnaamani Mar 20, 2023
7594361
docker-compose: joystream-node --no-hardware-benchmarks
mnaamani Mar 20, 2023
f83212f
v0.9.39 - runtime migrations
mnaamani Mar 23, 2023
3aa2861
v0.9.39 - clippy fixes
mnaamani Mar 23, 2023
6d18b00
v0.9.39 - clippy fixes
mnaamani Mar 23, 2023
602c2ec
v0.9.39 - clippy fixes
mnaamani Mar 23, 2023
677badf
v0.9.39 - minimum 2 steps required for benchmark command
mnaamani Mar 23, 2023
2b7caee
v0.9.39 - simplify feature selection and cargo tests scripts
mnaamani Mar 23, 2023
6004cf6
integration test runtime upgrade better cleanup
mnaamani Mar 27, 2023
2fbf578
v0.9.39 - add try-runtime
mnaamani Mar 30, 2023
85bf256
v0.9.39 - Fix const export on content pallet
mnaamani Apr 4, 2023
276eb02
v0.9.39 - add pallet staking runtime api
mnaamani Apr 4, 2023
9f67cc4
v0.9.39 - Adjust bagslist renaming migration and add migration test t…
mnaamani Apr 4, 2023
5462b1f
ci checks - test runtime upgrade with try-runtime
mnaamani Apr 4, 2023
3182d28
ci-checks: use correct rust nightly
mnaamani Apr 5, 2023
8300116
v0.9.39 - fix ref to BagsList in benchmarking
mnaamani Apr 5, 2023
5156465
v0.9.39 - fix member remark mapping to handle new runtime spec version
mnaamani Apr 12, 2023
3a79f1e
integration tests: docker run without pulling joystream/node
mnaamani Apr 13, 2023
7642067
integration tests- runtime upgrade: run new node with old pre-upgrade…
mnaamani Apr 13, 2023
4a21288
integration tests: start new node after runtime upgrade
mnaamani Apr 14, 2023
dbbf2bc
runtime upgrade test: workaround failing indexer
mnaamani Apr 15, 2023
9233342
runtime-upgrade-tests: start test chain with new node
mnaamani Apr 17, 2023
4c40cf2
Merge branch 'master' into update-to-polkadot-v0.9.39
mnaamani Apr 26, 2023
5f4b657
Merge branch 'joystream-node-docker-release' into update-to-polkadot-…
mnaamani Apr 26, 2023
d8d852c
create-release workflow: use compressed .wasm file
mnaamani Apr 26, 2023
c8bbdb2
add Staking and BagsList to list of skipped pallets in fork-off script
mnaamani Apr 26, 2023
17e15f5
ansible install tools missing protobuf-compiler libprotobuf-dev
mnaamani Apr 26, 2023
fda5c05
generated new weights on ref hardware
mnaamani May 1, 2023
e3b6dc6
runtime spec 2002
mnaamani May 1, 2023
3887173
workflow build docker dev images mutli-arch
mnaamani May 1, 2023
5a9daad
latest cargo-chef
mnaamani May 2, 2023
36f6031
docker build fetch crates.io with http or git cli
mnaamani May 2, 2023
8de82d4
docker build workflows: different cache names to avoid clash
mnaamani May 2, 2023
e1fd7e7
docker build, remove arm64 cross compile takes too long
mnaamani May 3, 2023
b3fb6d6
warn if host arch and docker image arch differ when using build-node-…
mnaamani May 3, 2023
d930492
Merge branch 'master' into update-to-polkadot-v0.9.39
mnaamani May 3, 2023
914c4d8
update runtime changelog
mnaamani May 3, 2023
354cf7d
run runtime upgrade: use old node before upgrade, and run post upgrad…
mnaamani May 3, 2023
5d5c9c1
fix post runtime upgrade check
mnaamani May 3, 2023
85fd568
update types to v2.2.0 - metadata update (joystream-utility-pallet)
mnaamani May 3, 2023
1efdd5e
Merge branch 'master' into update-to-polkadot-v0.9.39
mnaamani May 19, 2023
b3eebca
setup.sh drop getsubstrate.io - tries to install deprecated protobuf …
mnaamani May 23, 2023
7fc95a4
rustup install script - non-interactive shell fix
mnaamani May 23, 2023
779c774
setup.sh - rustup update after install
mnaamani May 23, 2023
f936481
Merge branch 'master' into update-to-polkadot-v0.9.39
mnaamani Jul 29, 2023
0825bd1
Merge branch 'nara' into update-to-polkadot-v0.9.39
mnaamani Jul 29, 2023
09fac54
update cargo-chef to work with latest nightly
mnaamani Jul 30, 2023
2f82527
fix cargo-chef install no --locked arg
mnaamani Jul 30, 2023
d53ddd4
use Weight:from_parts in place of from_ref_time which is deprecated
mnaamani Jul 30, 2023
51fb763
generate weights using Weight:from_parts in template
mnaamani Jul 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ jobs:

docker run -d --entrypoint tail --name temp-container-joystream-node $IMAGE-amd64 -f /dev/null

RESULT=$(docker exec temp-container-joystream-node b2sum -l 256 runtime.compact.wasm | awk '{print $1}')
RESULT=$(docker exec temp-container-joystream-node b2sum -l 256 runtime.compact.compressed.wasm | awk '{print $1}')
VERSION_AND_COMMIT=$(docker exec temp-container-joystream-node /joystream/node --version | awk '{print $2}' | cut -d- -f -2)
echo "::set-output name=blob_hash::${RESULT}"
echo "::set-output name=version_and_commit::${VERSION_AND_COMMIT}"

docker cp temp-container-joystream-node:/joystream/runtime.compact.wasm ./joystream_runtime_${{ github.event.inputs.tag }}.wasm
docker cp temp-container-joystream-node:/joystream/runtime.compact.compressed.wasm ./joystream_runtime_${{ github.event.inputs.tag }}.wasm
docker cp temp-container-joystream-node:/joystream/node ./joystream-node
tar -czvf joystream-node-$VERSION_AND_COMMIT-x86_64-linux-gnu.tar.gz joystream-node

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/joystream-node-docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,36 @@ jobs:
export IMAGE_EXISTS=$(docker manifest inspect ${{ env.REPOSITORY }}:${{ steps.compute_shasum.outputs.shasum }} > /dev/null ; echo $?)
echo "::set-output name=image_exists::${IMAGE_EXISTS}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
# uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1.7
uses: docker/setup-buildx-action@v2
id: builder1
if: ${{ steps.compute_image_exists.outputs.image_exists == 1 }}

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-dev
if: ${{ steps.compute_image_exists.outputs.image_exists == 1 }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: joystream-node.Dockerfile
# arm64 cross compiling takes longer than 6h, so we only build for amd64
# platforms: linux/amd64,linux/arm64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# platforms: linux/amd64,linux/arm64
# platforms: linux/amd64

Since you said "only amd64" above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line is already commented out, but left it for reference if we want to add it back.
It might be better to drop this whole workflow and improve joystream-node-docker.yml which deploys two worker machines on AWS (amd64 and arm64) to build natively for each platform arch have the ansible playbook build for all the runtime profiles.

platforms: linux/amd64
build-args: |
CARGO_FEATURES=${{ matrix.cargo_features }}
CODE_SHASUM=${{ steps.compute_shasum.outputs.shasum }}
push: true
tags: ${{ env.REPOSITORY }}:${{ steps.compute_shasum.outputs.shasum }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
builder: ${{ steps.builder1.outputs.name }}
if: ${{ steps.compute_image_exists.outputs.image_exists == 1 }}
22 changes: 17 additions & 5 deletions .github/workflows/joystream-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ jobs:

- name: Build
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-05-11
WASM_BUILD_TOOLCHAIN: nightly-2022-11-15
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this toolchain ver. recommended by substrate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the nightly version at time the version was released
https://github.com/paritytech/polkadot/releases/tag/v0.9.39-rc6

run: |
cargo +nightly-2022-05-11 clippy --release --features runtime-benchmarks &&
cargo +nightly-2022-05-11 test --release --features runtime-benchmarks &&
cargo +nightly-2022-05-11 build --release --features runtime-benchmarks
./scripts/cargo-checks-with-benchmarking.sh &&
./scripts/cargo-build-with-benchmarking.sh
if: env.GIT_DIFF

- name: Test Generate Weights
run: |
./scripts/generate-weights.sh 1 1 && git diff
./scripts/generate-weights.sh 2 1 && git diff
if: env.GIT_DIFF

# Build and test joystream-node with all runtime profiles
Expand Down Expand Up @@ -78,6 +77,19 @@ jobs:
yarn cargo-checks && yarn cargo-build
./target/release/call-sizes
if: env.GIT_DIFF
- name: OnRuntimeUpgrade (try-runtime)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This make the runtime-upgrade in the network tests obsolete, if I correctly understood the try runtime feature.
Should we drop the checks using the fork-off and move them to the pre/post hooks in the OnRuntimeUpgrade impl.?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point.
There might still be some use for the runtime upgrade integration tests to see how it affects the query-node, storage and distributor nodes during an upgrade?

run: |
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 wss://rpc.joystream.org:9944/
if: env.GIT_DIFF
- name: run_migrations test
run: |
RUN_MIGRATION_TESTS=true RUST_LOG=info cargo +nightly-2022-11-15 test --release --features try-runtime
if: env.GIT_DIFF
- name: Staging Runtime
env:
RUNTIME_PROFILE: "STAGING"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-network-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx
key: ${{ runner.os }}-buildx-tests
if: steps.check_files.outputs.files_exists == 'false'

- name: Build
Expand Down
Loading