Skip to content

New transaction formats #232

@vbuterin

Description

@vbuterin

Specification

When block.number >= FORK_BLKNUM, allow two new types of transaction:

[0, network_id, nonce, gasprice, startgas, to, value, data, v, r, s]
[1, network_id, startgas, to, data]

The first type of transaction replicates the functionality of existing regular transactions, with the sender equal to ecrecover(sha3(rlp.encode([0, network_id, nonce, gasprice, startgas, to, value, data])), v, r, s), and the second type replicates the functionality of EIP #208 (formerly EIP #86) transactions, where the sender is set to NULL_SENDER (a constant equal to 2^160 - 1).

When block.number >= DEPRECATION_BLKNUM (set DEPRECATION_BLKNUM = FORK_BLKNUM + 500000), disallow the older transaction types.

Specification, version 2

Have a hard "meta-standard" that ALL present and future transactions will have the following form:

[version_number, network_id, protocol_specific_params, data]

Under this standard, implement the above as:

[0, network_id, [nonce, gasprice, startgas, to, value, v, r, s], data]
[1, network_id, [startgas, to], data]

Specification, version 3

Add a valid_until field to type 0 transactions (and also type 1 transactions, or not? Should discuss) immediately before the "nonce" argument in type 0 transactions, and immediately before "startgas" in type 1 transactions.

Rationale

Creates a cleaner and more forward-compatible way of representing transactions, as well as removing technical debt created by EIP #208 and EIP #155 and replacing it with more explicit mechanisms that achieve the same function.

Also, upgrades replay protection with ETC and other alt-ethereum chains by making it compulsory and two-way.

Version 2 has the benefit that it makes a principled distinction between parameters that the protocol cares about and parameters that account code cares about, and makes an explicit 2-layer data structure when with EIP 86 the data structure will have to become 2-layer anyway with nonces, gasprices and the like being part of the transaction data field.

In future transaction versions, arguments could be added such as:

  • Subsets of address space that the transaction has read and write permission to (eg. four fields could be added for READSTART, READEND, WRITESTART, WRITEEND, which would accept 0-20 bytes as arguments, and would, with zero-byte-right-padding, represent the minimum and maximum addresses that the tx can read and write to). This would improve parallelizability.
  • Information about what shard the transaction is intended for.
  • If the gas schedule becomes multidimensional (eg. a 2D scheme with the second dimension being storage pricing is quite possible), startgas may need to be replaced with a vector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions