Skip to content
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

Add RIP: Native AA JSON_RPC API #58

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

forshtat
Copy link
Contributor

A partial rewrite of the previous proposal found here: ethereum/ERCs#625

Changes:

  • Some extra descriptions.
  • Removed the mention of the native tracing API as ERC-7562 is likely to be implemented natively regardless of this RIP.
  • Added a link to the Paymaster capability ERC-7677
  • Made eth_callAA return the emitted logs array
  • Added example JSON requests and responses

A partial rewrite of the previous proposal found here:
ethereum/ERCs#625

Changes:
* Some extra descriptions.
* Removed the mention of the native tracing API as ERC-7562 is likely to
be implemented natively regardless of this RIP.
* Added a link to the Paymaster capability ERC-7677
* Made `eth_callAA` return the emitted logs array
* Added example JSON requests and responses
forshtat and others added 3 commits January 30, 2025 20:03
forshtat and others added 3 commits January 30, 2025 20:10
@forshtat
Copy link
Contributor Author

@nconsigny Hi! I think we are ready to merge this PR now. Could you please have a look at it? Thanks!

@forshtat forshtat changed the title Create Native AA JSON_RPC API Add RIP: Native AA JSON_RPC API Feb 10, 2025
Copy link

@bomanaps bomanaps left a comment

Choose a reason for hiding this comment

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

Ideally, you should start a new sentence on a new line instead of continuing an old sentence on a new line. Hope this makes sense.

Comment on lines +16 to +17
With the introduction of Account Abstraction as it is defined by [RIP-7560](./rip-7560.md)
a number of existing RPC APIs are not capable of providing the necessary functionality.
Copy link

Choose a reason for hiding this comment

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

Suggested change
With the introduction of Account Abstraction as it is defined by [RIP-7560](./rip-7560.md)
a number of existing RPC APIs are not capable of providing the necessary functionality.
With the introduction of Account Abstraction as it is defined by [RIP-7560](./rip-7560.md) a number of existing RPC APIs are not capable of providing the necessary functionality.

Comment on lines +18 to +19
The required behaviour changes are significant enough to require an introduction of completely new methods
to the Ethereum L2 clients implementing Account Abstraction.
Copy link

Choose a reason for hiding this comment

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

Suggested change
The required behaviour changes are significant enough to require an introduction of completely new methods
to the Ethereum L2 clients implementing Account Abstraction.
The required behaviour changes are significant enough to require an introduction of completely new methods to the Ethereum L2 clients implementing Account Abstraction.

Comment on lines +23 to +24
The process of creating a transaction has been getting increasingly more complex and interactive process
with the growing complexity of on-chain protocols.
Copy link

Choose a reason for hiding this comment

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

Suggested change
The process of creating a transaction has been getting increasingly more complex and interactive process
with the growing complexity of on-chain protocols.
The process of creating a transaction has been getting increasingly more complex and interactive process with the growing complexity of on-chain protocols.

Comment on lines +27 to +28
As the AA transactions are executed atomically but consist of multiple sequential frames,
it is not possible to reliably prepare parts of the AA transaction individually.
Copy link

Choose a reason for hiding this comment

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

Suggested change
As the AA transactions are executed atomically but consist of multiple sequential frames,
it is not possible to reliably prepare parts of the AA transaction individually.
As the AA transactions are executed atomically but consist of multiple sequential frames, it is not possible to reliably prepare parts of the AA transaction individually.

Comment on lines +30 to +31
For example, when creating an AA transaction that also performs a deployment of a `sender` smart account,
it is all but impossible to perform a gas estimation for the execution frame using the existing `eth_estimateGas` API.
Copy link

Choose a reason for hiding this comment

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

Suggested change
For example, when creating an AA transaction that also performs a deployment of a `sender` smart account,
it is all but impossible to perform a gas estimation for the execution frame using the existing `eth_estimateGas` API.
For example, when creating an AA transaction that also performs a deployment of a `sender` smart account, it is all but impossible to perform a gas estimation for the execution frame using the existing `eth_estimateGas` API.

Comment on lines +289 to +290
The top-level frame of the execution phase is a call to the `sender` smart account that may consist of multiple
inner batched calls.
Copy link

Choose a reason for hiding this comment

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

Suggested change
The top-level frame of the execution phase is a call to the `sender` smart account that may consist of multiple
inner batched calls.
The top-level frame of the execution phase is a call to the `sender` smart account that may consist of multiple inner batched calls.

Comment on lines +292 to +293
Furthermore, the code in the `sender` address is frequently just
a proxy contract that does not propagate the implementation's returned data.
Copy link

Choose a reason for hiding this comment

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

Suggested change
Furthermore, the code in the `sender` address is frequently just
a proxy contract that does not propagate the implementation's returned data.
Furthermore, the code in the `sender` address is frequently just a proxy contract that does not propagate the implementation's returned data.

Comment on lines +295 to +296
In order to allow smart contract wallets to reliably expose any data to the off-chain execution we have little choice
but to rely on the existing mechanism of emitting the event logs.
Copy link

Choose a reason for hiding this comment

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

Suggested change
In order to allow smart contract wallets to reliably expose any data to the off-chain execution we have little choice
but to rely on the existing mechanism of emitting the event logs.
In order to allow smart contract wallets to reliably expose any data to the off-chain execution we have little choice but to rely on the existing mechanism of emitting the event logs.

Comment on lines +306 to +307
As mentioned in the [eth_estimateGasAA](#eth_estimategasaa) section, the `sender` and `paymaster` smart contracts
are expected to explicitly implement a special code flow to support the gas estimation.
Copy link

Choose a reason for hiding this comment

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

Suggested change
As mentioned in the [eth_estimateGasAA](#eth_estimategasaa) section, the `sender` and `paymaster` smart contracts
are expected to explicitly implement a special code flow to support the gas estimation.
As mentioned in the [eth_estimateGasAA](#eth_estimategasaa) section, the `sender` and `paymaster` smart contracts are expected to explicitly implement a special code flow to support the gas estimation.

Comment on lines +309 to +310
This code is supposed to only be executable during the `eth_estimateGasAA` and MUST never result in a valid transaction.
In case this constraint is violated the contract will be vulnerable to various potential threats.
Copy link

Choose a reason for hiding this comment

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

Suggested change
This code is supposed to only be executable during the `eth_estimateGasAA` and MUST never result in a valid transaction.
In case this constraint is violated the contract will be vulnerable to various potential threats.
This code is supposed to only be executable during the `eth_estimateGasAA` and MUST never result in a valid transaction. In case this constraint is violated the contract will be vulnerable to various potential threats.

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