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

Add ability to toggle EIP 155 replay protection #63

Closed
danfinlay opened this issue Apr 29, 2017 · 7 comments
Closed

Add ability to toggle EIP 155 replay protection #63

danfinlay opened this issue Apr 29, 2017 · 7 comments

Comments

@danfinlay
Copy link

I'm not sure if this is possible right now, but we have some users who are using old clients for private blockchains, that don't support EIP 155 replay protection, and cannot recognize the signatures from this module anymore.

It would be nice to have a way of defining whether or not to compute the signature in the new or old value.

danfinlay added a commit to MetaMask/metamask-extension that referenced this issue Apr 29, 2017
Does not yet work, because ethereumjs-tx does not yet support disabling replay protection.
ethereumjs/ethereumjs-tx#63

Addresses #1357
@fanatid
Copy link
Contributor

fanatid commented Apr 29, 2017

If I right understand the issue before signing you should set _chainId property to zero that give you signature in old format.

@danfinlay
Copy link
Author

I tried that but wasn't able to verify the signature was the old format. I may just need a better verification strategy...

@fanatid
Copy link
Contributor

fanatid commented Apr 29, 2017

Can you paste code for verify here?

@danfinlay
Copy link
Author

The last assert in this file:
https://github.com/MetaMask/metamask-plugin/blob/i1357-ToggleEip155Protections/test/unit/tx-manager-test.js

@fanatid
Copy link
Contributor

fanatid commented Apr 29, 2017

link to side project is not cool, if you want help please paste code which can be run as test

@danfinlay
Copy link
Author

I pasted what I was able to from my phone, I can do something better later. I thought you just wanted to see how I was trying to validate.

@kumavis
Copy link
Member

kumavis commented Jul 12, 2017

if chainId is 0, it will use the old signing style
https://github.com/ethereumjs/ethereumjs-tx/blob/master/index.js#L155

@kumavis kumavis closed this as completed Jul 12, 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

No branches or pull requests

3 participants