Skip to content

Commit

Permalink
[replay] Fix issue when replaying transactions taht query existence o…
Browse files Browse the repository at this point in the history
…f dynamic fields before creating it (MystenLabs#19041)

## Description 

This fixes a bug in the replay tool where if the transaction checked for
the existence of the dynamic field before creating it, we would fail to
be able to replay the transaction locally since the replay tool was not
properly handling the underlying error.

## Test plan 

Tested manually on a failing transaction.
  • Loading branch information
tzakian authored and tx-tomcat committed Aug 27, 2024
1 parent b531822 commit b81f319
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/sui-replay/src/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@ impl LocalExec {
error!("Object {id} {version} {digest} was deleted on RPC server.");
Ok(None)
}
// This is a child object which was not found in the store (e.g., due to exists
// check before creating the dynamic field).
Err(ReplayEngineError::ObjectVersionNotFound { id, version }) => {
info!("Object {id} {version} not found on RPC server -- this may have been pruned or never existed.");
Ok(None)
}
Err(err) => Err(ReplayEngineError::SuiRpcError {
err: err.to_string(),
}),
Expand Down

0 comments on commit b81f319

Please sign in to comment.