-
Notifications
You must be signed in to change notification settings - Fork 52
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
add signMessage precompile #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a conflict with #123?
yeah it's the same whoops, I left a comment over there. I dont think we need to specify the curve in the precompile name |
* err on suave precompile is type ErrExecutionReverted * restrict go version to 1.21.1
* Add PeekerReverted error to Suave abi * Commit real one
* Add precompile to make remote http calls * Fix error * Handle error and integrate other external calls * Last fixes * Fix * Show more diffs * Fix test
* bid -> dataRecord * working renames * change FetchBid to FetchRecord * update vm contracts * update devenv mevshare script * the last references of bid * the LAST improper bid reference * Add format to Solidity --------- Co-authored-by: Ferran Borreguero <[email protected]>
* Add console log support * Fix lint
@@ -115,6 +116,20 @@ func (b *suaveRuntime) fetchDataRecords(targetBlock uint64, namespace string) ([ | |||
return records, nil | |||
} | |||
|
|||
func (s *suaveRuntime) signMessage(digest []byte, signingKey string) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is signingKey
not bytes as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the signingKey
in our other precompiles are also strings. Im not entirely sure why we set this precedent but I believe it was @Ruteri who did
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Summary
adds precompile to sign arbitrary digests using ECDSA signing key.
Note: I added this precompile to
contracts_suave.go
since it is not ethereum specific.📚 References
SUAVE-spec PR