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

[Deprecation] GenesisConfig -> RuntimeGenesisConfig #175

Closed
5 of 7 tasks
kianenigma opened this issue May 3, 2023 · 5 comments · Fixed by #3378
Closed
5 of 7 tasks

[Deprecation] GenesisConfig -> RuntimeGenesisConfig #175

kianenigma opened this issue May 3, 2023 · 5 comments · Fixed by #3378
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework. T13-deprecation The current issue/pr is, or should be, part of a deprecation process.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented May 3, 2023

We renamed many of the composite enums such that the outer one is called RuntimeXXX eg paritytech/substrate#11981, but we seem to have missed this one.

Like other deprecations, we should keep the old name, but mark its usage is deprecated eg #182

Deprecation steps

Preview Give feedback
@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added T1-FRAME This PR/Issue is related to core FRAME, the framework. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. and removed T1-runtime labels Aug 25, 2023
@the-right-joyce the-right-joyce added T13-deprecation The current issue/pr is, or should be, part of a deprecation process. and removed I11-deprecation labels Sep 21, 2023
@kianenigma kianenigma added the C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. label Feb 5, 2024
@philoniare
Copy link
Contributor

@kianenigma can I take this one? Just to clarify, the task involves:

  • removing GenesisConfig as it has already been soft deprecated until Dec 2023
  • updating all pallets that use GenesisConfig to RuntimeGenesisConfig

Did I miss anything?

@kianenigma
Copy link
Contributor Author

Yes, you should fully remove

and fix any issues, which I don't think will be that many.

@RomarQ
Copy link
Contributor

RomarQ commented Feb 18, 2024

@kianenigma I created #3378 for removing the GenesisConfig deprecated type, the changes were minimal.

If I missed something, please let me know.

@philoniare
Copy link
Contributor

@RomarQ I believe you should be updating GenesisConfig to RuntimeGenesisConfig in pallets as well. There's quite a few pallets that still use GenesisConfig, so you'll need to update those. I've taken a quick look and identified the below:

system
aura
assets
babe
beefy
broker
glutton
grandpa
indices
lottery
mixnet
nfts
nis
salary
benchmarking
society
staking
sudo
treasury

@RomarQ
Copy link
Contributor

RomarQ commented Mar 3, 2024

@RomarQ I believe you should be updating GenesisConfig to RuntimeGenesisConfig in pallets as well. There's quite a few pallets that still use GenesisConfig, so you'll need to update those. I've taken a quick look and identified the below:

system
aura
assets
babe
beefy
broker
glutton
grandpa
indices
lottery
mixnet
nfts
nis
salary
benchmarking
society
staking
sudo
treasury

No, there is no point in renaming the struct in these pallets to RuntimeGenesisConfig. The change was specific to the deprecated type, which was removed in the PR mentioned above.

Also, just to give more context, the pallet::genesis_config macro enforces the name to be GenesisConfig.

if ident != "GenesisConfig" {
	let msg = "Invalid pallet::genesis_config, ident must `GenesisConfig`";
	return Err(syn::Error::new(ident.span(), msg))
}

github-merge-queue bot pushed a commit that referenced this issue Mar 5, 2024
# Description

Removed deprecated type `GenesisConfig` from the codebase.

Closes #175

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [x] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [x] I have made corresponding changes to the documentation (if
applicable)

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from In Progress to Done in Runtime / FRAME Mar 5, 2024
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this issue Mar 25, 2024
# Description

Removed deprecated type `GenesisConfig` from the codebase.

Closes paritytech#175

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [x] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [x] I have made corresponding changes to the documentation (if
applicable)

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
* Bump Substrate to rc4

* Add BaseCallFilter type

* Add DenyUnsafe to SystemApi extension

* Use new ServiceBuilder build functions

* Add BaseCallFilter to test runtimes

* Remove old comments

* Add `rev` and `git` fields back

Turns out that if you don't have these future release candidates will
be used if available. For instance, once `rc5` is released a fresh pull
would use that instead of `rc4` which is what we want.

* Use tag release instead of specific commit

Will make scripted updates easier in the future

* Add short script to update between `rc` versions

* Update scripts/update_rc.sh

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework. T13-deprecation The current issue/pr is, or should be, part of a deprecation process.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants