# Polkadot and Kusama v1.1.3 (staking patch)
## Reproducible build
Building Polkadot and Kusama runtimes from v1.1.3 branch (`polkadot-fellows/runtimes/release-v1.1.3`)
> Note: the results should match the builds of the github v1.1.3 release https://github.com/polkadot-fellows/runtimes/releases/tag/v1.1.3
1. **Checkout 1.1.3 release branch**
```
$ git checkout origin/release-1.1.3
$ git log -n1
commit 220049e09de3bf715986b67273c4cac5ad40211c (HEAD -> release-v1.1.3, origin/release-v1.1.3)
```
2. **`srtool` runtime build**
### Polkadot
🚨 couldn't reproduce the build from [github release v1.1.3](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.1.3) (perhaps due to using macos)
```
❯ srtool build --engine docker -p polkadot-runtime -r relay/polkadot
Found 1.75.0, we will be using docker.io/paritytech/srtool:1.75.0 for the build
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
🧰 Substrate Runtime Toolbox - srtool v0.14.0 🧰
- by Chevdor -
info: using existing install for '1.75.0-x86_64-unknown-linux-gnu'
info: override toolchain for '/build' set to '1.75.0-x86_64-unknown-linux-gnu'
1.75.0-x86_64-unknown-linux-gnu unchanged - rustc 1.75.0 (82e1608df 2023-12-21)
Summary generated with srtool v0.14.0 using the docker image paritytech/srtool:1.75.0:
Package : polkadot-runtime v1.0.0
GIT commit : 220049e09de3bf715986b67273c4cac5ad40211c
GIT tag : v1.1.2
GIT branch : release-v1.1.3
Rustc : rustc 1.75.0 (82e1608df 2023-12-21)
Time : 2024-03-16T00:02:48Z
== Compact
Version : polkadot-1001003 (parity-polkadot-0.tx25.au0)
Metadata : V14
Size : 7.11 MB (7451763 bytes)
setCode : 0xaa886ef51bcff0423a9f195ee8001781bffccf4a76f9d8fd5790c37dcbe833a1
authorizeUpgrade : 0x4171a48d2b65e7cde052c5d74f492518b1a8970e3781a6bbff6f50b8220b0765
IPFS : QmafP2RXneUe6dCoEePMcXYS9h3mb1ZX8MGBwKdJjhMU4h
BLAKE2_256 : 0x35b535f3e0b36afc323fc136894207771b632c303b3c0a2da37a2b1af551209a
Wasm : relay/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm
== Compressed
Version : polkadot-1001003 (parity-polkadot-0.tx25.au0)
Metadata : V14
Size : 1.48 MB (1547161 bytes)
Compression : 79.24%
setCode : 0x25a6eb29b562797290dfdb2fe5308e12baefda993a51d8e7ef8bc33fac89a223
authorizeUpgrade : 0x495611d6f87b1c2ce5a5f193737d44dab33b542cc13c86557958324d4a3a60a1
IPFS : QmWzpdhPBBWo4us6nK3hLpMnyBYJSVNibjmpEYiubvdS5m
BLAKE2_256 : 0x4d42ea65bdbc3457e20c6bbcfb465d3eebf214091e466a99e895a58bd2992397
Wasm : relay/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.compressed.wasm
```
### Kusama
```
$ srtool build --engine docker -p staging-kusama-runtime -r relay/kusama
```
## Submission
Using `$RUNTIME_runtime-v1001003.compact.compressed.wasm`
- ~~from the compilation with srtools in `relay/$RUNTIME/target/srtool/release/wbuild/$RUNTIME-runtime/$RUNTIME_runtime.compact.compressed.wasm`~~ (can't reproduce the build locally with srtools)
- from github release https://github.com/polkadot-fellows/runtimes/releases/tag/v1.1.3
Steps to reproduce:
1. Add wasm (as file) to the `system.setCode` [polkadotjs extrinsic](https://polkadot.js.org/apps/#/extrinsics) call
2. Copy resulting `encoded call data` into a file (`./encoded_call_data_$RUNTIME.data`)
3. Use `opengov-cli` to generate the referedum submission calls
#### Current state:
**Polkadot**
- [x] Fellowship Preimage (OpenCollective): https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/explorer/query/0x321502485cf2963d6bb705dbc11bf2a711439d826929b34c94a64db74e753399
- [x] Public referendum: https://polkadot.subscan.io/extrinsic/19941268-6
- [x] Public pre-image: https://polkadot.subscan.io/extrinsic/19949423-3
- [ ] Fellowship referendum to whitelist the call:
**Kusama**
- [x] Fellowship Preimage: https://kusama.subscan.io/extrinsic/22335509-8
- [x] Public referendum: https://kusama.subscan.io/extrinsic/22335515-9
- [x] Public pre-image: https://kusama.subscan.io/extrinsic/22343675-7
- [x] Fellowship referendum to whitelist the call: https://kusama.subscan.io/extrinsic/22343699-2
#### Polkadot
```
$ opengov-cli submit-referendum --proposal ./polkadot_calldata.data --track "whitelistedcaller" --network polkadot --after 10
```
```
[OK] Submit the preimage for the Fellowship referendum:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/extrinsics/decode/0x2b00d41f0003010003082f0000060342090a75216f88170002b60574c271a58158c080ec98b35367ca202f0569b9287b02678ba621a7f49e
[ ] Open a Fellowship referendum to whitelist the call:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/extrinsics/decode/0x3d003e02023b6ff2468ae166bd8569aa434b91ab8883927ab69aa7a531d85b823dc698630e35000000010a000000
[ ] Preimage for the public referendum too large (1420822 bytes). Not included in batch.
A file was created that you can upload in `preimage.note_preimage` in Apps UI.
Submission should have the hash: 0xb497681a6719674cde2f277c733c684ebbe837ce39e8a3c18f2b6c791283109d
[OK] Open a public referendum to dispatch the call:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/extrinsics/decode/0x1500160d025b2c8aff201576f6846964db99ba7e263f4ee6360f3ab3a03c110f53ca921ea510ae1500010a000000
```
#### Kusama
```
$ opengov-cli submit-referendum --proposal ./kusama_calldata.data --track "whitelistedcaller" --network kusama --after 10
```
```
[OK] Submit the preimage for the Fellowship referendum:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x2000882c00a9a32986d34faff317d30f6876ac66cc078fc8fa1cc8b5da0efafa63029bab52
[ ] Open a Fellowship referendum to whitelist the call:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x17002b0f0229d09ed0b63d4559e581d6a98780f318388f858419fd1c53a3d89036dd0e20b122000000010a000000
[ ] Preimage for the public referendum too large (1537529 bytes). Not included in batch.
A file was created that you can upload in `preimage.note_preimage` in Apps UI.
Submission should have the hash: 0x9b2cb549c3ae783c1adf04109f2851619dfaece3290f2a9feb2c2bc6712c0821
[OK] Open a public referendum to dispatch the call:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x15002b0d02851ad0b87716dd7ea6426a65620386854f7474cb7e93c2ec42c29b83978ffecaf3751700010a000000
Batch to submit on Kusama Relay Chain:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x18040c2000882c00a9a32986d34faff317d30f6876ac66cc078fc8fa1cc8b5da0efafa63029bab5217002b0f0229d09ed0b63d4559e581d6a98780f318388f858419fd1c53a3d89036dd0e20b122000000010a00000015002b0d02851ad0b87716dd7ea6426a65620386854f7474cb7e93c2ec42c29b83978ffecaf3751700010a000000
```
---
### Referenda
- https://kusama.polkassembly.io/referenda/359
- https://polkadot.polkassembly.io/referenda/581