Skip to content

Update EIP-7997: Switch to Arachnid factory#11783

Draft
frangio wants to merge 2 commits into
ethereum:masterfrom
frangio:7997-arachnid
Draft

Update EIP-7997: Switch to Arachnid factory#11783
frangio wants to merge 2 commits into
ethereum:masterfrom
frangio:7997-arachnid

Conversation

@frangio

@frangio frangio commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Following consensus in ACDT #82.

@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Jun 9, 2026
@eth-bot

eth-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

✅ All reviewers have approved.

@frangio frangio marked this pull request as ready for review June 9, 2026 18:44
@frangio frangio requested a review from eth-bot as a code owner June 9, 2026 18:44

@jochem-brouwer jochem-brouwer left a comment

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.

Some minor comments

Comment thread EIPS/eip-7997.md
A chain may satisfy this requirement by any means that results in the account above: deploying the factory with an ordinary transaction (for example, its keyless creation transaction) where the chain's gas parameters permit it, including the account in the genesis state, or inserting it via an irregular state transition. Regardless of the method used, the resulting `FACTORY_ADDRESS` account MUST have the nonce and runtime code specified above.

### Input validation
This is a contract that invokes the `CREATE2` instruction ([EIP-1014](./eip-1014.md)) with a salt equal to the first 32 bytes of the call's input data, init code equal to the remaining data, and value equal to the call's value. If input data is smaller than 32 bytes, the contract will attempt to copy close to 2^256 bytes of calldata and should revert as a result. If contract creation fails (`CREATE2` outputs `0`), the call reverts with empty return data. When successful, the address is returned in exactly 20 bytes of data with no padding.

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.

(it will OOG because of the quadratic memory allocation cost)

Comment thread EIPS/eip-7997.md
if iszero(result) { revert(0, 0) }
mstore(0, result)
return(12, 20)
```

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.

I would maybe add somewhere the downsides of this factory (revert does not propagate and the return data is not aligned as the standard alignment (left-pad address to 32 bytes) can be mitigated by using this factory to deploy an updated version. If the initcode choosen does not depend on any external factor then it can always be deployed and the factory code is thus guaranteed to exist or to be able to be deployed via this factory

Comment thread EIPS/eip-7997.md

### Not a new transaction type
```
calldatacopy(0, 32, sub(calldatasize(), 32))

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.

Can we pin this YUL code to state it should target constantinople? The deployed code does not have PUSH0 so the compiler should also not pick this. I think this should be added for clarity (the deployed bytecode being stated before also is fine, but the compiler target should remove any confusion)

@jochem-brouwer

Copy link
Copy Markdown
Member

BTW, this factory also ensures that we can now deploy system contracts via the CREATE2 factory and not via the chain agnostic deployments (keyless)

@eth-bot eth-bot enabled auto-merge (squash) June 9, 2026 18:46

@eth-bot eth-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@frangio frangio marked this pull request as draft June 9, 2026 18:49
auto-merge was automatically disabled June 9, 2026 18:49

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants