Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Contract creation nonce for predictable addresses #969

Merged
merged 1 commit into from
Nov 23, 2018

Conversation

silasdavis
Copy link
Contributor

@silasdavis silasdavis commented Nov 21, 2018

This uses the TxHash along with an alternative sequence number within the VM to generate new contract addresses. The vm therefore no longer modifies input account sequence numbers which means the input account sequence number just always goes up by one as a result of: /~https://github.com/hyperledger/burrow/blob/develop/execution/execution.go#L414 and not every time a contract is created.

Provided the TxHash is unique with high probability then this still avoid collisions in generated addresses. It does mean that generated addresses are not predictable in the same way. We d not currently use this fact, but I am concerned that may be desirable (will look at other EVMs implementations).

@silasdavis silasdavis changed the title WIP: contract creation nonce Contract creation nonce for predictable sequence numbers Nov 23, 2018
@silasdavis silasdavis force-pushed the develop branch 5 times, most recently from 381ed8a to d0474d7 Compare November 23, 2018 16:19
This gives us more predictable addresses for proposal mechanism.

Signed-off-by: Silas Davis <silas@monax.io>
@seanyoung seanyoung merged commit 488b393 into hyperledger-archives:develop Nov 23, 2018
@silasdavis silasdavis changed the title Contract creation nonce for predictable sequence numbers Contract creation nonce for predictable addresses Nov 23, 2018
silasdavis pushed a commit to silasdavis/burrow that referenced this pull request Mar 9, 2019
Contract creation nonce for predictable sequence numbers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants