Skip to content

Conversation

@activecoder10
Copy link
Contributor

Extended the execute method for the Nodes, in order to be able to extract the DiffMode and the TransactionTrace.
This pr is part of this: #7

}
}

pub fn print_diff_mode(label: &str, diff: &DiffMode) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those should emit trace logs instead of println! to the console.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in the new revision

if leader_diff == follower_diff {
log::info!("State diffs match between leader and follower.");
} else {
log::warn!("State diffs mismatch between leader and follower.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log::warn!("State diffs mismatch between leader and follower.");
log::debug!("State diffs mismatch between leader and follower.");

This is expected and not indicating a problem per se.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

follower_state.execute_input(input, self.follower_node)?;

if leader_diff == follower_diff {
log::info!("State diffs match between leader and follower.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log::info!("State diffs match between leader and follower.");
log::debug!("State diffs match between leader and follower.");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in the new revision

//node.trace_transaction(receipt)
todo!()

log::debug!("Transaction receipt: {:?}", receipt);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log::debug!("Transaction receipt: {:?}", receipt);
log::trace!("Transaction receipt: {:?}", receipt);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in the new revision


let trace = node.trace_transaction(receipt.clone())?;

log::debug!("Trace result: {:?}", trace);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log::debug!("Trace result: {:?}", trace);
log::trace!("Trace result: {:?}", trace);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in the new revision

@activecoder10 activecoder10 added this pull request to the merge queue Jun 10, 2025
Merged via the queue into main with commit 547563e Jun 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants