Conversation
Manual Deploy AvailableYou can trigger a manual deploy of this PR branch to testnet: Alternative: Comment
Comment updated automatically when the PR is synchronized. |
📝 WalkthroughWalkthroughThis pull request optimizes tracing instrumentation overhead by removing granular field logging from the local magicblock-aperture flow and concentrating instrumentation at the account-fetching stage in magicblock-chainlink. Changes include simplifying instrumentation attributes from targeted field logging to generic Assessment against linked issues
Out-of-scope changes
Suggested reviewers
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| #[allow(clippy::too_many_arguments)] | ||
| // NOTE: Pubkey stringification overhead is acceptable here since this is a cold path | ||
| // (network I/O dwarfs the stringification cost) | ||
| #[instrument(skip(sub_response, subs, program_subs, pubsub_connection, subscription_updates_sender, abort_sender, is_connected), fields(client_id = %client_id, program_id = %program_pubkey, commitment = ?commitment_config))] |
Summary
Optimizes instrumentation overhead in hot paths by avoiding pubkey/signature stringification when accounts are already in the local bank. The transaction signature is now carried through the call chain and only stringified in the cold path (when actually fetching from chain).
CLOSES: #867
Details
Hot Path Optimization
Removed eager signature/pubkey stringification from the hot path functions:
send_transaction: Changed to#[instrument(skip_all)], removed.record()callensure_transaction_accounts: Changed to#[instrument(skip_all)]read_account_with_ensure: Changed to#[instrument(skip_all)]Cold Path Signature Propagation
Extended
AccountFetchOrigin::SendTransactionto carry the transaction signature:SendTransaction(Signature)signature()accessor methodIn
fetch_and_clone_accounts(cold path), the signature is recorded on the span so it appears in all logs during chain fetch operations.Documentation
Added explanatory comments to cold path functions in
chain_laser_actor.rs,chain_pubsub_actor.rs, andsubscription_reconciler.rsnoting that pubkey stringification is acceptable there since network I/O dwarfs the cost.Summary by CodeRabbit
Chores
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.