Skip to content

Use codehash when deriving addresses#181

Merged
nhynes merged 13 commits into
ekidenfrom
use-codehash-address
Feb 20, 2020
Merged

Use codehash when deriving addresses#181
nhynes merged 13 commits into
ekidenfrom
use-codehash-address

Conversation

@nhynes
Copy link
Copy Markdown
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.

@nhynes nhynes requested a review from peterjgilbert February 18, 2020 19:49
@nhynes nhynes force-pushed the use-codehash-address branch from d0b5571 to 975fee2 Compare February 18, 2020 21:02
Comment thread ethcore/src/engines/mod.rs Outdated
Comment thread ethcore/src/machine.rs Outdated
@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