-
Notifications
You must be signed in to change notification settings - Fork 47
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
chore: Update to Substrate v2.0.0-rc4 #81
Conversation
before the update is merged we need to update the chain specs! 😱 |
we can now get the next tx nonce with respect to the tx pool
closes KILTprotocol/ticket/issues/549
closes KILTprotocol/ticket/issues/406
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shrug
I have two commentses !
Dockerfile
Outdated
COPY ./scripts/build.sh /scripts/build.sh | ||
RUN /bin/bash /scripts/build.sh | ||
|
||
# this container builds the mashnet-node binary from source files, the runtime library and the WASM file built previously | ||
FROM rustlang/rust@sha256:9ac425a47e25a7a5dac999362b89de2b91b21ce70c557a409c46280393f7b1f1 as builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently checking whether the latest rust:nightly can compile it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can! so I'd suggest we go back to rustlang/rust:nightly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we could also use the Parity rust image paritytech/ci-linux:production
which we already use in the Portablegabi Node. This used to be called paritytech/rust-builder
.
// Copyright 2017-2020 Parity Technologies (UK) Ltd. | ||
// This file is part of Substrate. | ||
|
||
// Substrate is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Substrate is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
figure out what to do with this license header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weichweich Remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weichweich Remove it?
I guess GPL doesn't allow that. Just keep it. We may be able to add our copyright to the one of parity?
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2019-2020 Botlabs GmbH
Or something like that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that. We should check with @GustavHemmelmayr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, comirights for two companies for same software is confusing unless we really programmed together - stuff that is done by us can be labled for BOTLabs GmbH (please spell with the first three letters as capital letters) and stuff that is done by Parity is labeld by them and we just refer to it, right?
GPL does allow a reference to the company, please always use the original wording in the license part of the software.
src/chain_spec.rs
Outdated
x25519::Public::from_raw(hex!("d660b4470a954ecc99496d4e4b012ee9acac3979e403967ef09de20da9bdeb28")), | ||
x25519::Public::from_raw(hex!("2ecb6a4ce4d9bc0faab70441f20603fcd443d6d866e97c9e238a2fb3e982ae2f")), | ||
], | ||
get_authority_keys_from_seed("0x58d3bb9e9dd245f3dec8d8fab7b97578c00a10cf3ca9d224caaa46456f91c46c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to be a public key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 8d75804
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at how polkadot is doing it: https://github.com/paritytech/polkadot/blob/848e1a892f99c16015b75117fdae00b393cde770/service/src/chain_spec.rs#L365
Can't we do it similarly?
runtime/src/lib.rs
Outdated
impl_name: create_runtime_str!("mashnet-node"), | ||
authoring_version: 4, | ||
spec_version: 4, | ||
impl_version: 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this start at 0/1 again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not.
Me asking on Substrate builder's channel.
Short question about the incrementing of the runtime version. What would be the recommended best practice when we switch from Substrate 1.x to 2.0?
- Increment all version numbers
- "Reset" to 1 if current versions > 1
Jam from Parity
It only really matters if you have external tooling pointing to your chains and you have some kind of continuity of the infrastructure between versions. I generally don't think it's a good idea to go backwards in version number unless you are changing the name or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, if he did understand the questions correctly. We only want to put impl_version
to 1, while increasing authoring_version
and spec_version
.
Like going from 0.2.8
to 0.3.0
.
But we actually do not have the restrictions, he is talking about, so I guess it doesn't matter. Would still be interesting to know, how it is supposed to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gav said something about this: paritytech/substrate#241
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also only really matters, when updating the runtime on-chain.
Don't use public keys as secret seeds when building account IDs
Update to Substrate 2.0.0
ToDos
How to test:
Checklist: