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

Feat/arbitrary messages #1

Merged
merged 7 commits into from
Oct 11, 2023
Merged

Feat/arbitrary messages #1

merged 7 commits into from
Oct 11, 2023

Conversation

JulianToledano
Copy link
Collaborator

No description provided.

Copy link

@raynaudoe raynaudoe left a comment

Choose a reason for hiding this comment

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

Looks good, left a few comments

cips/cip-offchain_message_signature.md Outdated Show resolved Hide resolved
## Specification

Off-chain signed messages should resemble Cosmos SDK messages but **must not** constitute a valid on-chain transaction.
`chain-id`, `account_number`, and `sequence` must all be assigned invalid values.

Choose a reason for hiding this comment

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

Nothing serious, just a thing to keep in mind, I don't know the details about how the ledger app works but the app shouldn't reject the tx if any of those fields contains "Invalid" values.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, this has been tested and its not a problem.

// Signer is the sdk.AccAddress of the message signer
string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Data represents the raw bytes of the content that is signed (text, json, etc)
bytes data = 3 [(gogoproto.jsontag) = "data"];

Choose a reason for hiding this comment

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

is there a size limit for data ? or maybe signing the digest of a file ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good question, I guess the only limit here would come from HSM devices. Maybe its a good open question to add here

@JulianToledano JulianToledano merged commit 192a3ed into main Oct 11, 2023
@JulianToledano JulianToledano deleted the feat/arbitrary-messages branch October 11, 2023 09:50
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.

3 participants