Skip to content

Account abstraction EIP#2938

Merged
MicahZoltu merged 11 commits into
masterfrom
vbuterin-patch-3
Sep 13, 2020
Merged

Account abstraction EIP#2938
MicahZoltu merged 11 commits into
masterfrom
vbuterin-patch-3

Conversation

@vbuterin

@vbuterin vbuterin commented Sep 4, 2020

Copy link
Copy Markdown
Contributor

Account abstraction (AA) allows a contract to be the top-level account that pays fees and starts transaction execution.

Account abstraction (AA) allows a contract to be the top-level account that pays fees and starts transaction execution.
Comment thread EIPS/eip-2938.md Outdated
vbuterin and others added 2 commits September 4, 2020 16:56
Co-authored-by: Micah Zoltu <micah@zoltu.net>

@MicahZoltu MicahZoltu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Only the Abstract inclusion suggestion and the Specification section naming suggestion are required for merging as a draft. The rest is just generalized feedback that you can ignore until Last Call.

Comment thread EIPS/eip-2938.md Outdated
Comment on lines +16 to +17

## Motivation

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
## Motivation
## Abstract
TBD
## Motivation

I believe the Abstract is a required section. For draft, it just needs to be present, not complete. I generally recommend it include ea human readable and very terse version of the specification (maybe a paragraph or two).

Comment thread EIPS/eip-2938.md

## Motivation

**See also: https://ethereum-magicians.org/t/implementing-account-abstraction-as-part-of-eth1-x/4020 and the links therein for historical work and motivation.**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
**See also: https://ethereum-magicians.org/t/implementing-account-abstraction-as-part-of-eth1-x/4020 and the links therein for historical work and motivation.**

This is already in the header, so putting it here is redundant. Recommend removing.

Comment thread EIPS/eip-2938.md Outdated
Comment thread EIPS/eip-2938.md

## Security Considerations

See https://ethresear.ch/t/dos-vectors-in-account-abstraction-aa-or-validation-generalization-a-case-study-in-geth/7937 for an analysis of DoS issues.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At some point before final security considerations should be inlined into this document, but that isn't necessary for draft status.

Comment thread EIPS/eip-2938.md
All AA contracts may also potentially not have replay protection, unless they build it in explicitly; this can be done with the `CHAINID (0x46)` opcode introduced in [EIP 1344](./eip-1344.md).

## Test Cases
See: https://github.com/quilt/tests/tree/account-abstraction

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ideally, test cases will be inlined into this document, or added as an asset to ../assets/eip-2938/whatever.wat, but that isn't necessary for draft status.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

.wat, are you suggesting the introduction of WebAssembly? 🙊

Comment thread EIPS/eip-2938.md

## Specification (Single-tenant AA)

After `FORK_BLOCK`, the following changes will be recognized by the protocol.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be "Starting with FORK_BLOCK" I guess?

Comment thread EIPS/eip-2938.md Outdated

### New Transaction Type

A new EIP-2718 transaction with type `AA_TX_TYPE` is introduced. Transactions of this type are referred to as "AA transactions". Their payload should be interpreted as `rlp([nonce, target, data])`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can the "EIP-2718" mention be supplemented by the EIP title (in brackets) here for readability?

Comment thread EIPS/eip-2938.md Outdated
@axic axic added the type: Core label Sep 6, 2020
vbuterin and others added 3 commits September 10, 2020 09:11
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing

@MicahZoltu MicahZoltu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missed one required change in my previous review.

Comment thread EIPS/eip-2938.md Outdated
Comment thread EIPS/eip-2938.md Outdated

#### `NONCE (0xAB)` Opcode

A new opcode `NONCE (0xAB)` is introduced, with gas cost `G_base`, which pushes the `tx.nonce` onto the stack.

@axic axic Sep 10, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggestion:

Suggested change
A new opcode `NONCE (0xAB)` is introduced, with gas cost `G_base`, which pushes the `tx.nonce` onto the stack.
A new opcode `NONCE (0xAB)` is introduced, with gas cost `G_base`, which pushes the `account.nonce` onto the stack.

If tx.nonce would be used, I would suggest to name this TXNONCE. Luckily however tx.nonce == account.nonce, so changing the description is enough.

Comment thread EIPS/eip-2938.md Outdated

A new opcode `NONCE (0xAB)` is introduced, with gas cost `G_base`, which pushes the `tx.nonce` onto the stack.

#### `PAYGAS (0xAA)` Opcode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While I see it is clever to use 0xAA and 0xAB as opcodes, I think if this is adopted these opcodes should fit into appropriate sections: which is likely 0x48 and 0x49.

As a draft the current proposed ones are fine, perhaps I should leave this comment on the discussion url.

Comment thread EIPS/eip-2938.md Outdated

#### `PAYGAS (0xAA)` Opcode

A new opcode `PAYGAS (0xAA)` is introduced, with gas cost `G_base`. It takes two arguments off the stack: (top) `version_number`, (second from top) `memory_start`. In the initial implementation, it will `assert version_number == 0` and read:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curious: why a version and what future versions are envisioned?

@vbuterin vbuterin Sep 13, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  • EIP 1559
  • Escalator
  • Block hash and block number dependencies

vbuterin and others added 2 commits September 13, 2020 09:19
Co-authored-by: Micah Zoltu <micah@zoltu.net>

@MicahZoltu MicahZoltu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I recommend reviewing the feedback that has been left, but that can be applied after merging as draft.

@MicahZoltu MicahZoltu merged commit 3750af8 into master Sep 13, 2020
@MicahZoltu MicahZoltu deleted the vbuterin-patch-3 branch September 13, 2020 06:23
@3esmit 3esmit mentioned this pull request Sep 30, 2020
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
Account abstraction (AA) allows a contract to be the top-level account that pays fees and starts transaction execution.
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
Account abstraction (AA) allows a contract to be the top-level account that pays fees and starts transaction execution.
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.

6 participants