Skip to content

Conversation

@rayyan224
Copy link
Contributor

@rayyan224 rayyan224 commented Dec 5, 2025

Summary

This MR adds a versioned user operation model with hashing, introduces shared entry point constants, and refactors Kafka usage behind queue interfaces.
Changes

  • Added VersionedUserOperation and UserOperationRequest to support hashing based on entry point version.
  • Implemented hashing logic for ERC-4337 entry points (v0.6 and v0.7) under new entrypoint modules.
  • Added entry point address constants reused across chains.
  • Updated validation to return the computed user-operation hash.
  • Refactored Kafka so that queue logic is abstracted behind a MessageQueue interface.
  • Added UserOpQueuePublisher and updated BundleQueuePublisher to own topics and publishing logic.
  • Updated IngressService to compute user-operation hashes and publish them through the new user-op queue.

@rayyan224 rayyan224 marked this pull request as draft December 5, 2025 17:18
@rayyan224 rayyan224 changed the title draft: Feat/impelment user ops queue Implement versioned ERC-4337 user op hashing and user-op Kafka queue Dec 8, 2025
@rayyan224 rayyan224 requested review from chunter-cb, danyalprout and wlawt and removed request for wlawt December 8, 2025 14:49
Copy link
Contributor

@wlawt wlawt left a comment

Choose a reason for hiding this comment

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

lgtm on the ingress-rpc side!

i just realized, should we also update the README with the new account-abstraction-core crate too?

.expect("Producer creation failed");

let publisher = KafkaQueuePublisher::new(producer, "tips-ingress-rpc".to_string());
let publisher = KafkaMessageQueue::new(producer);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could we call BundleQueuePublisher here so we can call .publish over .publish_raw?

}

pub struct UserOpQueuePublisher<Q: MessageQueue> {
queue: std::sync::Arc<Q>,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: seems like std::sync::Arc is used frequently, maybe we can import it?

#[async_trait]
pub trait QueuePublisher: Send + Sync {
async fn publish(&self, bundle: &AcceptedBundle, bundle_hash: &B256) -> Result<()>;
pub trait MessageQueue: Send + Sync {
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

Comment on lines +105 to +109
queue_connection.clone(),
config.user_operation_topic,
),
bundle_queue_publisher: BundleQueuePublisher::new(
queue_connection.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: i wonder for styling/clarity, Gemini suggests to use Arc::clone(&queue_connection), WDYT?

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