-
Notifications
You must be signed in to change notification settings - Fork 1.6k
A fast-path for requesting AvailableData
from backing validators
#2453
Conversation
AvailableData
from backing validators
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 took the liberty of fixing two typos. Other then that, looks good to me. I am really worried about the chunk recovery to fail in practice, so I would suggest to move over to chunk recovery on any error, which makes it less likely to introduce bugs in that code, that would lead to chunk recovery not even be started.
Understood. But the only error that can occur in the fast path is that the interaction task gets disconnected from the underlying subsystem. I've changed the code to better reflect that, and I think that in those cases, there is no point in moving on to chunk recovery. |
Looks indeed more fool-proof now :-) |
bot merge |
Waiting for commit status. |
Checks failed; merge aborted. |
(restarted transaction version job, which had a spurious failure, and it passed this time) |
The user of
AvailabilityRecoveryMessage::RecoverAvailableData
can supply an optional backing group. The availability recovery subsystem will request from the backing validators, in random order, as an optimization. As at least a majority of the backing validators will have the data unless they are malicious, this is an optimization.I also fixed some bugs and added new tests
One concern I have is that we make the
AvailableData
requests sequentially, and the time-out we allow is pretty long. An adversary could stall us by refusing to answer requests and that might trigger no-shows. But it's disadvantageous for them to do that as it enlists more people to check their block. And once we recover it, we'd check the block as expected. So this isn't really a bad vector, it just lets an adversary either slightly delay finality or delay the pain of slashing.