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

Creator Contract abstraction #143

Closed
axic opened this issue Aug 30, 2016 · 4 comments
Closed

Creator Contract abstraction #143

axic opened this issue Aug 30, 2016 · 4 comments
Labels

Comments

@axic
Copy link
Member

axic commented Aug 30, 2016

This is a follow up to #86 with the intent of moving more logic to contract abstractions.

Motivation

Replace the special CREATE opcode and the special case of external transactions, which cause a contract to be deployed, with a contract.

Abstract

The creator contract (at address TBD) takes bytecode to be deployed as the input and returns 20 bytes output consisting of the 160-bit contract address.

The EVM opcode CREATE is mapped to be a CALL to the creator contract.

Implementation

Initially, this contract could only be implemented as a precompile, which has special access to the state. Later, with eWASM, it would be possible to have a privileged set of imported methods to system contracts and the creator contract could be implemented natively in eWASM.

For the current address algorithm it also needs to have access to the sender's nonce (sha3(rlp([sender, sender_nonce]))), but with the proposed new Metropolis algorithm (sha3(sender + bytecode)) that is not necessary.

Furthermore, the creator contract in eWASM could include the feature set of the Sentinel Contract to support deploying both EVM1 and eWASM, including validation and metering injection.

@wanderer
Copy link
Member

would it handle running the initialization code for new contracts also?

@axic
Copy link
Member Author

axic commented Sep 8, 2016

would it handle running the initialization code for new contracts also?

It has to because it returns the deployed contract address.

@github-actions
Copy link

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Jan 13, 2022
@github-actions
Copy link

This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants