-
Notifications
You must be signed in to change notification settings - Fork 924
Deprecate para_id
Field from Chain Specification
#7546
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
base: master
Are you sure you want to change the base?
Conversation
User @Stephenlawrence00, please sign the CLA here. |
Hi @Stephenlawrence00 , just wondering if you're still interested in getting this ready for review. I glanced over the changes and thought you might find useful this info: #75 (comment). If you don't have time to still look into it, let us know. We're keen in assisting/owning the delivery of this in the next period. Let us know if you have questions! |
Thanks @iulianbarbu Still interested in getting this done. |
@Stephenlawrence00 if you have something to parallelise or I can pick up, let me know |
Hey @Stephenlawrence00 , how is going? I was wondering if you got a chance to continue the work. Feel free to reach out in case implementation details are not clear. For context, we want to have this functionality merged by mid of May so that it ends up in June release. FYI, the reviews and addressing them can take a few weeks, so IMO ideally we should kickstart the work this week/next week the latest. Does that sound doable on your end? |
Sounds good @iulianbarbu |
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 think this should be mostly it. Now I am wondering what's a good way to sunset parachain-info. @bkchr what are your thoughts?
LE: upsy, there is an issue for that: #2116. Based on it, I think we can start removing parachain info from our runtimes. What we need to double check though is if adding the para id in the runtimes' parameters is enough for downstream usage which might rely on the Get<ParaId>
trait impl for Pallet<T> where T: Config
.
LELE: once the above is done, we can start doing the actualy para_id
field removal from chain specs, according to #7384
Getting rid of The runtime API should return the para id that is present in
There we read the para_id from the chain_spec, which should not be the case anymore. |
Hey @Stephenlawrence00 ! Looks like we still need return the 'para_id' of the Separately, in addition to @skunert pointer to how to not use anymore the
let para_id = client.runtime_api().id(); . To be able to call GetParachainInfo::id() though you'd need to extend the NodeRuntimeApi here:
Once we have this, I think we should be good with deprecating this:
|
Nope, makes sense to me. However, we should come up with a better name for the runtime api function than |
@Stephenlawrence00 Just checking in if you planning to continue with this. If not, we will internally find someone to work on this soon (end of week). |
Will have the changes in @skunert |
Would I need to add a test case in system chain runtimes? for instance #[test]
fn parachain_id_is_retrieved_from_runtime_api() {
ExtBuilder::<Runtime>::default()
.build()
.execute_with(|| {
// Get para_id from ParachainInfo pallet storage
let expected_para_id = parachain_info::Pallet::<Runtime>::parachain_id();
// Get para_id via runtime API
let actual_para_id = Runtime::parachain_id();
assert_eq!(
actual_para_id, expected_para_id,
"Runtime API para_id must match ParachainInfo storage"
);
});
} Don't think this tests much really cc: @skunert @iulianbarbu |
I agree, such test does not seem very useful |
What tests would you consider, regarding this pull request? @skunert |
Hey, thanks for driving this forward!
There is the As for testing, we have some tests that test the
There it would be super easy to read the chain-spec, modify the In addition, we can have better test-coverage by removing the
As a result, all chain-specs exported from |
Hey @Stephenlawrence00 , how is going? Was wondering how the testing goes. Once we'll get past that we'll have leeway to focus on the last bits, related to |
para_id
field from chain-specification #7384 and related Issues:GetParachainId
#75Get rid offparachain-info
#2116