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

unclear function selector in call to purity checker #94

Closed
ralexstokes opened this issue Apr 19, 2018 · 2 comments
Closed

unclear function selector in call to purity checker #94

ralexstokes opened this issue Apr 19, 2018 · 2 comments

Comments

@ralexstokes
Copy link
Member

assert extract32(raw_call(self.PURITY_CHECKER, concat('\xa1\x90>\xab', convert(validation_addr, 'bytes32')), gas=500000, outsize=32), 0) != convert(0, 'bytes32')

Looks like a typo...

The raw_call presumably calls the submit function here: https://github.com/ethereum/research/blob/master/impurity/check_for_impurity.se

And following our convention we see:

> web3.sha3("submit(address)")
"0xa1903eab65b303e5d2b0f7ffc455cbdb5d081456ef23967ae426c2cada7ffffd"

which implies the method selector should be '\xa1\x90\x3e\xab'.

If someone can confirm I'll submit a PR.

@djrtwo
Copy link
Contributor

djrtwo commented Apr 19, 2018

"\x3e" == ">"

I agree that it would be cleaner with the explicit hex if you still want to do that PR

@djrtwo djrtwo changed the title Incorrect function selector in call to purity checker unclear function selector in call to purity checker Apr 19, 2018
@djrtwo
Copy link
Contributor

djrtwo commented Apr 19, 2018

addressed in #97

@djrtwo djrtwo closed this as completed Apr 19, 2018
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

No branches or pull requests

2 participants