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

Limit Deployment to a few settlement contracts #2

Open
liamsi opened this issue Dec 5, 2021 · 0 comments
Open

Limit Deployment to a few settlement contracts #2

liamsi opened this issue Dec 5, 2021 · 0 comments

Comments

@liamsi
Copy link
Member

liamsi commented Dec 5, 2021

EVMOS by default allows anyone to deploy contracts, but we don't want this for the hub because it will impossible to create succinct or predictable fraud proofs.

The EVM has 3 entrypoints to contract creation:

  1. An EOA transaction that is sent to without a destination address, has its calldata interpreted as opcodes to run
  2. A contract that calls the CREATE opcode
  3. A contract that calls the CREATE2 opcode

Entrypoint 1 can be avoided at the tx validation stage, outside the EVM context - simply reject any transactions that don't have a destination address.

Entrypoints 2 and 3 can be avoided by not having any deployed contracts that unprivileged users can call which hit either of those opcodes with a user provided binary string. It is however safe to allow users to create contracts from a fixed factory set, where the codehash remains the same but initialized storage is different.

The deployed contracts for operation of the settlement hub should be included in the state at genesis, and any updates maintained as preloaded state in the client software. This will allow light clients to efficiently check fraud proofs without having to request contract code from peers.

@liamsi liamsi moved this to TODO in Celestia Node Dec 5, 2021
@mattdf mattdf moved this from TODO to In Progress in Celestia Node Dec 14, 2021
@mattdf mattdf self-assigned this Dec 14, 2021
@jbowen93 jbowen93 moved this from In Progress to TODO in Celestia Node Feb 4, 2022
@tzdybal tzdybal removed this from Celestia Node Nov 17, 2022
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

No branches or pull requests

2 participants