Skip to content

Commit 268857e

Browse files
authored
Download missing blobs when retrying outgoing messages (#4597)
## Motivation We were seeing `Failed to retry outgoing messages` errors on Testnet Conway due to blobs missing on the client side. ## Proposal If blobs are missing during execution of this part of the code, download them and retry. The change is purely client-side, so it is safe to be backported to the testnet branch. ## Test Plan Manual testing showed that the errors disappear. ## Release Plan - These changes should be backported to the latest `testnet` branch ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 45be1c8 commit 268857e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

linera-core/src/client/mod.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,10 +2171,28 @@ impl<Env: Environment> ChainClient<Env> {
21712171
let stream = FuturesUnordered::from_iter(other_sender_chains.into_iter().map(|chain_id| {
21722172
let local_node = self.client.local_node.clone();
21732173
async move {
2174-
if let Err(error) = local_node
2174+
if let Err(error) = match local_node
21752175
.retry_pending_cross_chain_requests(chain_id)
21762176
.await
21772177
{
2178+
Ok(()) => Ok(()),
2179+
Err(LocalNodeError::BlobsNotFound(blob_ids)) => {
2180+
if let Err(error) = self
2181+
.client
2182+
.receive_certificates_for_blobs(blob_ids.clone())
2183+
.await
2184+
{
2185+
error!(
2186+
"Error while attempting to download blobs during retrying outgoing \
2187+
messages: {blob_ids:?}: {error}"
2188+
);
2189+
}
2190+
local_node
2191+
.retry_pending_cross_chain_requests(chain_id)
2192+
.await
2193+
}
2194+
err => err,
2195+
} {
21782196
error!("Failed to retry outgoing messages from {chain_id}: {error}");
21792197
}
21802198
}

0 commit comments

Comments
 (0)