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

Support EIP-712 signing #2141

Closed
yondonfu opened this issue Dec 20, 2021 · 0 comments · Fixed by #2157
Closed

Support EIP-712 signing #2141

yondonfu opened this issue Dec 20, 2021 · 0 comments · Fixed by #2157
Assignees

Comments

@yondonfu
Copy link
Member

yondonfu commented Dec 20, 2021

The current Confluence L1Migrator contract supports authorization via a EIP-712 signature.

At the moment, the livepeer_cli does not support EIP-712 signing. However, there is logic in clef

There should be a "Sign typed message" option in livepeer_cli. When this option is selected:

  • The user can paste in the typed data to sign in JSON form. The typed data should follow the format described here for the data arg
  • livepeer_cli will send the data to a /signTypedMessage endpoint on the livepeer server similar to the /signMessage endpoint
  • The server will convert the data to an instance of apitypes.TypedData
    • See these tests for reference
  • There can be a SignTypedMessage method defined in the eth.AccountManager similar to the Sign method except it is responsible for producing EIP-712 signatures
  • The implementation of this method can be based off of this method
    • At first glance, does not look like we can import this method directly so next easiest thing may be to pull that logic into go-livepeer

Alternative

We could integrate with clef, geth's external signer. I like the idea of separating the signer codebase from the rest of the go-livepeer codebase. But, this is a bigger change to architecture that I think is better done separately. For this issue, I think we should find the shortest path to supporting EIP-712 signing with minimal change to UX.

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

Successfully merging a pull request may close this issue.

1 participant