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

Parachain heads are synced without demand in parachain <> parachain bridge #1723

Closed
svyatonik opened this issue Dec 16, 2022 · 1 comment · Fixed by #1725
Closed

Parachain heads are synced without demand in parachain <> parachain bridge #1723

svyatonik opened this issue Dec 16, 2022 · 1 comment · Fixed by #1725
Assignees
Labels
A-bug Something isn't working P-Relay

Comments

@svyatonik
Copy link
Contributor

It seems that when we bridge two parachains and run a complex relayer, parachains heads are relayed even when this isn't required by the message relay. It needs to be investigated and fixed.

@svyatonik svyatonik added A-bug Something isn't working P-Relay labels Dec 16, 2022
@svyatonik svyatonik self-assigned this Dec 16, 2022
@svyatonik
Copy link
Contributor Author

The code responsible for handling this situation:

let mut para_head_id = AvailableHeader::Missing;
if let Some(on_chain_para_head_id) = self.on_chain_para_head_id(at_block, para_id).await? {
// Never return head that is larger than requested. This way we'll never sync
// headers past `max_header_id`.
para_head_id = match *self.max_head_id.lock().await {
AvailableHeader::Unavailable => AvailableHeader::Unavailable,
AvailableHeader::Missing => {
// `max_header_id` is not set. There is no limit.
AvailableHeader::Available(on_chain_para_head_id)
},
AvailableHeader::Available(max_head_id) => {
// We report at most `max_header_id`.
AvailableHeader::Available(std::cmp::min(on_chain_para_head_id, max_head_id))
},
}
}

So either it isn't working, or something is misconfigured

svyatonik pushed a commit that referenced this issue Jul 17, 2023
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](servo/rust-smallvec@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working P-Relay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant