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

chore: Update to Substrate v2.0.0-rc4 #81

Merged
merged 88 commits into from
Jun 26, 2020
Merged

chore: Update to Substrate v2.0.0-rc4 #81

merged 88 commits into from
Jun 26, 2020

Conversation

weichweich
Copy link
Contributor

@weichweich weichweich commented Mar 26, 2020

Update to Substrate 2.0.0

  • fixes KILTProtocol/ticket#533
  • closes KILTprotocol/ticket/issues/549
  • closes KILTprotocol/ticket/issues/406

ToDos

  • update the chain specs
  • "Restore" v1.0 payment fees
  • Remove weight?
  • The block time after the update is 6s, it should be 10s.
    • it should be configured in the genesis block?!
  • What was the index for? Do we need an index?

How to test:

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@weichweich
Copy link
Contributor Author

before the update is merged we need to update the chain specs! 😱

runtime/src/ctype/tests.rs Outdated Show resolved Hide resolved
wischli and others added 3 commits June 9, 2020 12:01
we can now get the next tx nonce with respect to the tx pool

closes KILTprotocol/ticket/issues/549
@weichweich weichweich changed the title Update to Substrate v2.0.0 chore: Update to Substrate v2.0.0-rc3 Jun 22, 2020
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rflechtner rflechtner left a 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
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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.

Comment on lines +1 to +15
// 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/>.
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@weichweich Remove it?

Copy link
Contributor Author

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...

Copy link
Contributor

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.

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.

x25519::Public::from_raw(hex!("d660b4470a954ecc99496d4e4b012ee9acac3979e403967ef09de20da9bdeb28")),
x25519::Public::from_raw(hex!("2ecb6a4ce4d9bc0faab70441f20603fcd443d6d866e97c9e238a2fb3e982ae2f")),
],
get_authority_keys_from_seed("0x58d3bb9e9dd245f3dec8d8fab7b97578c00a10cf3ca9d224caaa46456f91c46c"),
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 8d75804

Copy link
Contributor

Choose a reason for hiding this comment

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

runtime/src/lib.rs Outdated Show resolved Hide resolved
impl_name: create_runtime_str!("mashnet-node"),
authoring_version: 4,
spec_version: 4,
impl_version: 5,
Copy link
Contributor

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?

Copy link
Contributor

@wischli wischli Jun 25, 2020

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?

  1. Increment all version numbers
  2. "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.

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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.

@wischli wischli changed the title chore: Update to Substrate v2.0.0-rc3 chore: Update to Substrate v2.0.0-rc4 Jun 26, 2020
@tjwelde
Copy link
Contributor

tjwelde commented Jun 26, 2020

LGTM

@weichweich weichweich merged commit 60fa800 into develop Jun 26, 2020
@weichweich weichweich deleted the wip-v2.0.0 branch June 26, 2020 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants