Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Use EIP 191 #82

Merged
merged 3 commits into from
Nov 23, 2017
Merged

Use EIP 191 #82

merged 3 commits into from
Nov 23, 2017

Conversation

oed
Copy link
Contributor

@oed oed commented Nov 16, 2017

fixes #71

NOTE: This should be merged after #81

Copy link

@maurelian maurelian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but this one is a good candidate for second review by @niran.
I did note that EIP 191 is not finalized, and the last two comments have a suggestion regarding cross-chain replay attack prevention.

Including the address of the txRelay in the hash inputs seems to minimize that risk.

Copy link

@niran niran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, looks good. While EIP 191 isn't finalized, the goal of preventing collisions between the plaintext of a valid Ethereum transaction and a metatransaction has been achieved.

// relay :: nonce :: destination :: data :: relayer
bytes32 h = sha3(this, nonce[claimedSender], destination, data);
// use EIP 191
// 0x19 :: version :: relay :: nonce :: destination :: data :: relayer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're changing this code, it's worth updating the comment to remove " :: relayer" at the end, which is no longer part of the plaintext.

@oed oed merged commit 0984c2a into release/2.0.0 Nov 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants