Skip to content

Add txn monitoring in op-rbuilder pool #500

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

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

ferranbt
Copy link
Collaborator

📝 Summary

This PR introduces a monitoring service that prints all the transactions that arrive to the transaction pool in op-rbuilder.

💡 Motivation and Context


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@ferranbt ferranbt requested review from dvush and ZanCorDX as code owners March 13, 2025 20:24
@@ -38,4 +38,8 @@ pub struct OpRbuilderArgs {
env = "FLASHBLOCK_BLOCK_TIME"
)]
pub flashblock_block_time: u64,

/// Signals whether to log pool transactions events
#[arg(long = "log-pool-transactions", default_value = "false")]
Copy link
Contributor

Choose a reason for hiding this comment

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

non blocking: we should rename the args to the builder namespace

fn transaction_event_log(event: FullTransactionEvent<OpPooledTransaction>) {
match event {
FullTransactionEvent::Pending(hash) => {
debug!("Transaction event: tx={:?}, kind=pending", hash)
Copy link
Contributor

Choose a reason for hiding this comment

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

this wouldn't work with json structured logging?

Suggested change
debug!("Transaction event: tx={:?}, kind=pending", hash)
debug!(
tx_hash=tx_hash.to_string(),
kind = "pending",
"Transaction event received"
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will change this once I am back at home

@ferranbt ferranbt merged commit 14931d4 into develop Mar 17, 2025
4 checks passed
@ferranbt ferranbt deleted the feature/op-add-txn-monitoring branch March 17, 2025 07:41
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.

2 participants