Skip to content

Replace relayer with Identity.isValidSignature in Ethereum adapter #452

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

Closed
1 task done
elpiel opened this issue Nov 1, 2021 · 1 comment
Closed
1 task done
Milestone

Comments

@elpiel
Copy link
Member

elpiel commented Nov 1, 2021

In V5 with new Identity contract we should not call relayer anymore instead we should use the Identity contract's isValidSignature.

Pseudo code old:

const signer = ecrecover(hash(token)) // whoever signed the message
if (isIdenity) return getPrivilegesFromRelayer(identityAddr)[signer] ? identityAddr : null
else return signer

Pseudo code new:

const signer = ecrecover(hash(token)) // whoever signed the message
if (isIdentity) return new Identity(identityAddr).isValidSignature(sig) ? identityAddr : null
else return signer
@elpiel elpiel added this to the sentry-v0.2.0 milestone Nov 1, 2021
@Ivshti
Copy link
Member

Ivshti commented Nov 1, 2021

@elpiel Correct, we an just use a signature for the EIP 1271 spec and verify this with isValidSignature

@elpiel elpiel changed the title Remove relayer call in Ethereum adapter Replace relayer call with Identity.isValidSignature in Ethereum adapter Nov 1, 2021
@elpiel elpiel changed the title Replace relayer call with Identity.isValidSignature in Ethereum adapter Replace relayer with Identity.isValidSignature in Ethereum adapter Nov 1, 2021
@elpiel elpiel closed this as completed Dec 17, 2021
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