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

Use codehash when deriving addresses #181

Merged
merged 13 commits into from
Feb 20, 2020
Merged

Use codehash when deriving addresses #181

merged 13 commits into from
Feb 20, 2020

Conversation

nhynes
Copy link
Contributor

@nhynes nhynes commented Feb 18, 2020

This PR

tl;dr: for c10l contracts, the address becomes a MAC of the code. The address is generated from the salt, and codehash. The salt is provided as part of the deploy header (salt_if_confidential) or explicitly by a CREATE2 call (and Wasm create, when it exists). This PR is useful for preventing subbing out the contract code at an address with a different contract.

ethcore/src/engines/mod.rs Outdated Show resolved Hide resolved
ethcore/src/machine.rs Outdated Show resolved Hide resolved
@nhynes nhynes merged commit 45f4144 into ekiden Feb 20, 2020
@nhynes nhynes deleted the use-codehash-address branch February 20, 2020 21:06
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

Successfully merging this pull request may close these issues.

2 participants