Skip to content

Commit

Permalink
Merge pull request #7 from GAEAlimited/patch-1
Browse files Browse the repository at this point in the history
GAEA $uperChain Patch
  • Loading branch information
GAEAlimited committed Jun 19, 2024
2 parents f21c468 + d9818a3 commit 6905fcb
Show file tree
Hide file tree
Showing 29 changed files with 972 additions and 139 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-2935.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Serve historical block hashes from state
description: Store and serve last 8192 block hashes as storage slots of a system contract to allow for stateless execution
author: Vitalik Buterin (@vbuterin), Tomasz Stanczak (@tkstanczak), Guillaume Ballet (@gballet), Gajinder Singh (@g11tech), Tanishq Jasoria (@tanishqjasoria), Ignacio Hagopian (@jsign), Jochem Brouwer (@jochem-brouwer)
discussions-to: https://ethereum-magicians.org/t/eip-2935-save-historical-block-hashes-in-state/4565
status: Draft
status: Review
type: Standards Track
category: Core
created: 2020-09-03
Expand Down Expand Up @@ -187,7 +187,7 @@ Since `BLOCKHASH` semantics doesn't change, this EIP has no impact on `BLOCKHASH

## Rationale

Very similar ideas were proposed before in [EIP-210](./eip-210.md) et al. This EIP is a simplification, removing two sources of needless complexity:
Very similar ideas were proposed before. This EIP is a simplification, removing two sources of needless complexity:

1. Having a tree-like structure with multiple layers as opposed to a single list
2. Writing the EIP in EVM code
Expand Down
2 changes: 1 addition & 1 deletion EIPS/eip-5806.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
eip: 5806
title: Delegate transaction
description: Adds a new transaction type that allows a EOAs to execute arbitrary code through delegation
description: Adds a new transaction type that allows EOAs to execute arbitrary code through delegation
author: Hadrien Croubois (@Amxx)
discussions-to: https://ethereum-magicians.org/t/eip-5806-delegate-transaction/11409
status: Draft
Expand Down
2 changes: 1 addition & 1 deletion EIPS/eip-6110.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Supply validator deposits on chain
description: Provides validator deposits as a list of deposit operations added to the Execution Layer block
author: Mikhail Kalinin (@mkalinin), Danny Ryan (@djrtwo), Peter Davies (@petertdavies)
discussions-to: https://ethereum-magicians.org/t/eip-6110-supply-validator-deposits-on-chain/12072
status: Draft
status: Review
type: Standards Track
category: Core
created: 2022-12-09
Expand Down
76 changes: 37 additions & 39 deletions EIPS/eip-6493.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class TransactionPayload(StableContainer[MAX_TRANSACTION_PAYLOAD_FIELDS]):
gas: Optional[uint64]
to: Optional[ExecutionAddress]
value: Optional[uint256]
input_: ByteList[MAX_CALLDATA_SIZE]
input_: Optional[ByteList[MAX_CALLDATA_SIZE]]

# EIP-2930
access_list: Optional[List[AccessTuple, MAX_ACCESS_LIST_SIZE]]
Expand Down Expand Up @@ -147,6 +147,10 @@ class BlobFeesPerGas(Profile[FeesPerGas]):
regular: FeePerGas
blob: FeePerGas

class EcdsaTransactionSignature(Profile[TransactionSignature]):
from_: Optional[ExecutionAddress]
ecdsa_signature: Optional[ByteVector[ECDSA_SIGNATURE_SIZE]]

class ReplayableTransactionPayload(Profile[TransactionPayload]):
type_: TransactionType
nonce: uint64
Expand All @@ -158,7 +162,7 @@ class ReplayableTransactionPayload(Profile[TransactionPayload]):

class ReplayableTransaction(Container):
payload: ReplayableTransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class LegacyTransactionPayload(Profile[TransactionPayload]):
type_: TransactionType
Expand All @@ -172,7 +176,7 @@ class LegacyTransactionPayload(Profile[TransactionPayload]):

class LegacyTransaction(Container):
payload: LegacyTransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class Eip2930TransactionPayload(Profile[TransactionPayload]):
type_: TransactionType
Expand All @@ -187,7 +191,7 @@ class Eip2930TransactionPayload(Profile[TransactionPayload]):

class Eip2930Transaction(Container):
payload: Eip2930TransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class Eip1559TransactionPayload(Profile[TransactionPayload]):
type_: TransactionType
Expand All @@ -203,7 +207,7 @@ class Eip1559TransactionPayload(Profile[TransactionPayload]):

class Eip1559Transaction(Container):
payload: Eip1559TransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class Eip4844TransactionPayload(Profile[TransactionPayload]):
type_: TransactionType
Expand All @@ -220,7 +224,7 @@ class Eip4844TransactionPayload(Profile[TransactionPayload]):

class Eip4844Transaction(Container):
payload: Eip4844TransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class BasicTransactionPayload(Profile[TransactionPayload]):
chain_id: ChainId
Expand All @@ -235,7 +239,7 @@ class BasicTransactionPayload(Profile[TransactionPayload]):

class BasicTransaction(Container):
payload: BasicTransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class BlobTransactionPayload(Profile[TransactionPayload]):
chain_id: ChainId
Expand All @@ -251,36 +255,33 @@ class BlobTransactionPayload(Profile[TransactionPayload]):

class BlobTransaction(Container):
payload: BlobTransactionPayload
signature: TransactionSignature
signature: EcdsaTransactionSignature

class AnyTransaction(OneOf[Transaction]):
@classmethod
def select_from_base(cls, value: Transaction) -> Type[Transaction]:
if value.payload.type_ is None:
if value.payload.blob_versioned_hashes is not None:
return BlobTransaction
return BasicTransaction
def select_transaction_profile(cls, value: Transaction) -> Type[Profile]:
if value.payload.type_ is None:
if value.payload.blob_versioned_hashes is not None:
return BlobTransaction
return BasicTransaction

if value.payload.type_ == TRANSACTION_TYPE_EIP4844:
return Eip4844Transaction
if value.payload.type_ == TRANSACTION_TYPE_EIP4844:
return Eip4844Transaction

if value.payload.type_ == TRANSACTION_TYPE_EIP1559:
return Eip1559Transaction
if value.payload.type_ == TRANSACTION_TYPE_EIP1559:
return Eip1559Transaction

if value.payload.type_ == TRANSACTION_TYPE_EIP2930:
return Eip2930Transaction
if value.payload.type_ == TRANSACTION_TYPE_EIP2930:
return Eip2930Transaction

if value.payload.chain_id is not None:
return LegacyTransaction
if value.payload.chain_id is not None:
return LegacyTransaction

return ReplayableTransaction
return ReplayableTransaction
```

Future specifications MAY:

- Append fields to `TransactionPayload` and `TransactionSignature`
- Convert existing fields to `Optional`
- Define new `Profile` types and update `select_from_base` logic
- Adjust `Profile` types and update `select_transaction_profile` logic

Such changes [do not affect](./eip-7495.md) how existing transactions serialize or merkleize.

Expand Down Expand Up @@ -344,7 +345,7 @@ def ecdsa_recover_from_address(signature: ByteVector[ECDSA_SIGNATURE_SIZE],
uncompressed = public_key.serialize(compressed=False)
return ExecutionAddress(keccak(uncompressed[1:])[12:])

def validate_transaction(tx: AnyTransaction):
def validate_transaction(tx):
ecdsa_validate_signature(tx.signature.ecdsa_signature)
assert tx.signature.from_ == ecdsa_recover_from_address(
tx.signature.ecdsa_signature,
Expand Down Expand Up @@ -401,10 +402,10 @@ class Log(Container):

class Receipt(StableContainer[MAX_RECEIPT_FIELDS]):
root: Optional[Hash32]
gas_used: uint64
gas_used: Optional[uint64]
contract_address: Optional[ExecutionAddress]
logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM]
logs: List[Log, MAX_LOGS_PER_RECEIPT]
logs_bloom: Optional[ByteVector[BYTES_PER_LOGS_BLOOM]]
logs: Optional[List[Log, MAX_LOGS_PER_RECEIPT]]

# EIP-658
status: Optional[boolean]
Expand All @@ -427,20 +428,17 @@ class BasicReceipt(Profile[Receipt]):
logs: List[Log, MAX_LOGS_PER_RECEIPT]
status: boolean

class AnyReceipt(OneOf[Receipt]):
@classmethod
def select_from_base(cls, value: Receipt) -> Type[Receipt]:
if value.status is not None:
return BasicReceipt
def select_receipt_profile(value: Receipt) -> Type[Profile]:
if value.status is not None:
return BasicReceipt

return HomesteadReceipt
return HomesteadReceipt
```

Future specifications MAY:

- Add fields to the end of `Receipt`
- Convert existing fields to `Optional`
- Define new `Profile` types and update `select_from_base` logic
- Adjust `Profile` types and update `select_receipt_profile` logic

Such changes [do not affect](./eip-7495.md) how existing receipts serialize or merkleize.

Expand Down Expand Up @@ -539,7 +537,7 @@ If other SSZ objects are being signed in the future, e.g., messages, it must be

### What about EIP-2718 transaction types?

All SSZ transactions (including future ones) share the single [EIP-2718](./eip-2718.md) transaction type `TRANSACTION_TYPE_SSZ`. Future features can introduce new optional fields as well as new allowed combination of optional fields, as determined by `select_from_base` in `AnyTransaction`.
All SSZ transactions (including future ones) share the single [EIP-2718](./eip-2718.md) transaction type `TRANSACTION_TYPE_SSZ`. Future features can introduce new optional fields as well as new allowed combination of optional fields, as determined by `select_transaction_profile`.

This also reduces combinatorial explosion; for example, the `access_list` property could be made optional for all SSZ transactions without having to double the number of defined transaction types.

Expand Down
2 changes: 1 addition & 1 deletion EIPS/eip-7002.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Execution layer triggerable withdrawals
description: Allow validators to trigger exits and partial withdrawals via their execution layer (0x01) withdrawal credentials
author: Danny Ryan (@djrtwo), Mikhail Kalinin (@mkalinin), Ansgar Dietrichs (@adietrichs), Hsiao-Wei Wang (@hwwhww), lightclient (@lightclient)
discussions-to: https://ethereum-magicians.org/t/eip-7002-execution-layer-triggerable-exits/14195
status: Draft
status: Review
type: Standards Track
category: Core
created: 2023-05-09
Expand Down
8 changes: 4 additions & 4 deletions EIPS/eip-7069.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Revamped CALL instructions
description: Introduce EXTCALL, EXTDELEGATECALL and EXTSTATICCALL with simplified semantics
author: Alex Beregszaszi (@axic), Paweł Bylica (@chfast), Danno Ferrin (@shemnon), Andrei Maiboroda (@gumb0), Charles Cooper (@charles-cooper)
discussions-to: https://ethereum-magicians.org/t/eip-revamped-call-instructions/14432
status: Draft
status: Review
type: Standards Track
category: Core
created: 2023-05-05
Expand Down Expand Up @@ -97,11 +97,11 @@ In case this EIP is included as part of the greater EOF upgrade, execution seman

Execution of `RETURNDATACOPY` which is not in EOF formatted code (i.e. is in legacy code) is not changed.

<!-- *TODO:* Clarify which side (caller/callee) is gas deducted from and where an error originates from. -->
**TODO:** Clarify which side (caller/callee) is gas deducted from and where an error originates from.

<!-- *TODO:* Mention gas refunds? -->
**TODO:** Mention gas refunds?

<!-- *TODO:* Consider option where non-calldata value transfer is not allowed, but there's a specific `TRANSFER`/`PAY` function for that. Would simplify the logic greatly. -->
**TODO:** Consider option where non-calldata value transfer is not allowed, but there's a specific `TRANSFER`/`PAY` function for that. Would simplify the logic greatly.

## Rationale

Expand Down
Loading

0 comments on commit 6905fcb

Please sign in to comment.