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

Collator Protocol Revamp: emit new ApprovedPeer event on candidate inclusion #7732

Open
alindima opened this issue Feb 26, 2025 · 3 comments
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Comments

@alindima
Copy link
Contributor

Add a new event emitted by the relay chain runtime whenever a candidate is included, which contains the approved peer sent by the parachain over UMP. This will be used by collator protocol for bumping reputations.

It makes sense to emit this on inclusion rather than backing, in order to make sure that backing an invalid candidate and then not making it available would result in a slash. Otherwise, backers could use this to bump the system-wide reputations of select collators without doing the work of creating valid blocks.

An alternative would be to explicitly query the candidates_pending_availability at the previous relay parent, but this would be more wasteful and would use an extra runtime API which potentially returns a lot of extra data.

@alindima alindima added the T8-polkadot This PR/Issue is related to/affects the Polkadot network. label Feb 26, 2025
@alindima
Copy link
Contributor Author

alindima commented Feb 26, 2025

maybe it's a good idea to find a different name for the event, because it's the same as the ump signal name

@sandreim
Copy link
Contributor

I still don't see a good reason to make this an event. We can just have a runtime API that returns all the PeerIds from these included candidates.

@alindima
Copy link
Contributor Author

I just think it's simpler. You process much less data and you don't need to go back to a block where the candidates were still pending availability.
Anyway, I think either approach is fine really, and it's not a high priority issue.

We can just rely on the candidates_pending_availability runtime API for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants