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

add signMessage precompile #127

Merged
merged 20 commits into from
Dec 22, 2023
Merged

add signMessage precompile #127

merged 20 commits into from
Dec 22, 2023

Conversation

dmarzzz
Copy link
Member

@dmarzzz dmarzzz commented Dec 12, 2023

📝 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


  • I have seen and agree to CONTRIBUTING.md

@dmarzzz dmarzzz requested a review from ferranbt December 12, 2023 11:19
@dmarzzz dmarzzz marked this pull request as ready for review December 12, 2023 11:36
ferranbt
ferranbt previously approved these changes Dec 13, 2023
Copy link
Collaborator

@ferranbt ferranbt left a 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?

@dmarzzz dmarzzz mentioned this pull request Dec 13, 2023
2 tasks
@dmarzzz
Copy link
Member Author

dmarzzz commented Dec 13, 2023

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

yash-atreya and others added 14 commits December 21, 2023 09:35
* 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
@dmarzzz dmarzzz requested a review from ferranbt December 22, 2023 00:18
@@ -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) {
Copy link
Collaborator

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?

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmarzzz dmarzzz merged commit 6383b8e into main Dec 22, 2023
3 checks passed
@dmarzzz dmarzzz deleted the precompile-sign-message branch December 22, 2023 17:12
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 this pull request may close these issues.

6 participants