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

Add state to message lanes #2214

Merged
merged 9 commits into from
Jun 20, 2023
Merged

Add state to message lanes #2214

merged 9 commits into from
Jun 20, 2023

Conversation

svyatonik
Copy link
Contributor

@svyatonik svyatonik commented Jun 16, 2023

related to #2451 and #2213

This PR introduces important change to runtime - now if the lane does not exists in the storage (InboundLanes and OutboundLanes), we don't create it automatically. Instead we are (will for the 2nd option) provide two options:

  1. specify set of lanes at genesis block;
  2. manage lanes externally - like by the pallet from XCM bridge hub pallet (will be deployed at bridge hubs) #2213.

The only thing that is left here is compiling and running everything locally to be sure that I haven't forgot anything. But it isn't a stopped for review All is good

@svyatonik svyatonik added P-Runtime PR-audit-needed A PR has to be audited before going live. PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade. labels Jun 16, 2023
data
},
}
self.cached_data.clone()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I would rename the function to just data(), considering that we're not initializing it here anymore.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also I don't think it needs to receive &mut self anymore. &self should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, thank you!

@svyatonik svyatonik enabled auto-merge (squash) June 20, 2023 09:05
@svyatonik svyatonik merged commit 21e2953 into master Jun 20, 2023
@svyatonik svyatonik deleted the add-state-to-message-lanes branch June 20, 2023 09:10
svyatonik pushed a commit that referenced this pull request Jul 17, 2023
* Benchmarks script improvements

* EOF

---------

Co-authored-by: parity-processbot <>
bkontur pushed a commit that referenced this pull request May 7, 2024
* add LaneState enum and a field to lanes data

* use OptionQuery in InboundLanes and OutboundLanes

* ensure that lanes are opened when accessing them

* an option to specify opened lanes in genesis config + fixed tests

* added PR reference to TODO

* fix failing benchmarks

* spelling

* get_or_init_data -> data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-Runtime PR-audit-needed A PR has to be audited before going live. PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants