Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

add signMessage precompile#127

Merged
dmarzzz merged 20 commits intomainfrom
precompile-sign-message
Dec 22, 2023
Merged

add signMessage precompile#127
dmarzzz merged 20 commits intomainfrom
precompile-sign-message

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
Contributor

@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 <ferran.borreguero@gmail.com>
* Add console log support

* Fix lint
@dmarzzz dmarzzz requested a review from ferranbt December 22, 2023 00:18
return records, nil
}

func (s *suaveRuntime) signMessage(digest []byte, signingKey string) ([]byte, error) {
Copy link
Contributor

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
@dmarzzz dmarzzz deleted the precompile-sign-message branch December 22, 2023 17:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants