πKey Roles and Their Interactions
The ERC-4337 ecosystem introduces the UserOperation, a flexible alternative to typical Ethereum transactions.
UserOperation
It is like a blueprint that tells the system about a user's intended action. To avoid mix-ups, it's not just called a transaction, even though it shares similarities.
What does it have in common with regular transactions?
Just like a typical transaction, a UserOperation has details such as:
sender: Who's initiating it.to: The recipient or destination.calldata: The action or operation to be performed.maxFeePerGas: The maximum gas fee.maxPriorityFee: Priority fee for faster processing.signature: A cryptographic proof of authenticity.nonce: A unique number to prevent replay attacks.
How is it different?
Apart from the common fields, a UserOperation contains additional unique fields which are explained separately.
The way the signature works in a UserOperation is unique. Instead of being pre-determined by the system, it's up to each individual account's rules to decide how itβs used.
In essence, while a UserOperation resembles a transaction in many ways, it also offers more flexibility and customization for users.
Sender
This refers to the client that initiates or sends out a UserOperation.
EntryPoint
A unique contract designed to process batches of UserOperations.
Bundlers or clients pick and choose which EntryPoint they want to work with, creating a whitelist of accepted EntryPoints.
Bundler (acting as the middleman, ensuring everything gets processed correctly into the blockchain)
A type of node (or system participant) that specializes in managing UserOperations.
Responsibilities:
Take
UserOperationsand convert them into a valid action, known asEntryPoint.handleOps(), to be added to a blockchain block.There are several ways this can happen:
A
bundlermight take on the role of a block builder itself.If the bundler isn't acting as a block builder, it has to work in tandem with established block-building systems, like mev-boost or any other system that separates block proposal from block building (called PBS).
Alternatively, a bundler can utilize an experimental system, if available, known as
eth_sendRawTransactionConditional RPC API.
Aggregator (that assists in ensuring multiple signatures are legitimate)
A supportive contract that accounts rely on, especially to verify combined or aggregated signatures.
Just as with the EntryPoint, bundlers or clients create a whitelist for the aggregators they trust and want to work with.
Recap
In simpler terms, when using the UserOperation system, you have:
The Sender starting things off by initiating a
UserOperation.The EntryPoint which is the go-to spot for processing groups of these operations.
The Bundler acting as the middleman, ensuring everything gets processed correctly into the blockchain.
And the Aggregator that assists in ensuring multiple signatures are legitimate.
Last updated