-
Notifications
You must be signed in to change notification settings - Fork 666
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
statement-distribution: fix parachains stalling on async_backing enablement #3063
Conversation
…lement Topology is coming only at the beginning of each session, so we might lose if prospective parachains was not enabled at the begining of the session, so cache it for later use Fixes: #3058 Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
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.
Nice catch! Worth adding a test?
It is always worth adding a test :D, but I will do it Note! This is tested with my hacked setup described here: #3058, but obviously I can't commit that :D. |
Yes, we can't enable async backing on Polkadot without this fix, but I think we have plenty of time to implement the test.
Just an idea, I imagine a unit test where we drive the overseer messages to do something similar with runtime api requests as you did in your setup. Then we'd just want to see that messages are sent according to new topology to start with. |
Further discussion here, along with a more elegant proposed fix which pull the topology rather than having it pushed. |
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Will have a look, but I guess that is further down the line, so I will go ahead and merge this fix since it is better to have it present rather than not.
Turns out it was easy to change the current tests to cover both cases. |
Agreed! The fix is definitely necessary now but a new API for pulling topologies would prevent this footgun when building network protocol upgrades in the future. |
Topology is coming only at the beginning of each session, so we might lose it if prospective parachains was not enabled at the begining of the session, so cache it for later use.
Fixes: #3058