-
Notifications
You must be signed in to change notification settings - Fork 33
Implement versioned ERC-4337 user op hashing and user-op Kafka queue #96
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
base: master
Are you sure you want to change the base?
Conversation
…mentUserOpsQueue
wlawt
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
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>, |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
| queue_connection.clone(), | ||
| config.user_operation_topic, | ||
| ), | ||
| bundle_queue_publisher: BundleQueuePublisher::new( | ||
| queue_connection.clone(), |
There was a problem hiding this comment.
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?
Summary
This MR adds a versioned user operation model with hashing, introduces shared entry point constants, and refactors Kafka usage behind queue interfaces.
Changes