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

Add initial signed-memo program #1135

Merged
merged 9 commits into from
Jan 28, 2021

Conversation

CriesofCarrots
Copy link
Contributor

The current memo program only performs UTF verification of the memo data. This facility is made more expressive in this program, which:

  • Logs the memo text to the transaction log
  • Requires all accounts provided to it be signers of the transaction and logs their address to the transaction log. For ease of debugging, this implementation logs a message containing the provided account address, regardless of whether the signature verification was successful

Fixes #1071

@CriesofCarrots CriesofCarrots requested a review from mvines January 27, 2021 01:54
@CriesofCarrots
Copy link
Contributor Author

As I was writing the docs page for spl.solana.com, it occurred to me it might be useful to log the UTF-8 parsing err on failure. Thoughts?

@mvines
Copy link
Contributor

mvines commented Jan 27, 2021

As I was writing the docs page for spl.solana.com, it occurred to me it might be useful to log the UTF-8 parsing err on failure. Thoughts?

Yeah, sure. Something generic like "Invalid UTF-8" sound good to help decipher an InvalidInstructionData error from transaction simulation

@mvines
Copy link
Contributor

mvines commented Jan 27, 2021

I'm leaning towards just calling this memo v2.0.0 and overwriting memo/. smemo is a superset and I'm not sure that making devs have to choose between using memo or smemo is beneficial, or having to explain to each new dev why there are two

@CriesofCarrots
Copy link
Contributor Author

I'm leaning towards just calling this memo v2.0.0 and overwriting memo/. smemo is a superset and I'm not sure that making devs have to choose between using memo or smemo is beneficial, or having to explain to each new dev why there are two

Okay, here's what that looks like @mvines

Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

Okay, here's what that looks like @mvines
👍🏼 👍🏼

@CriesofCarrots CriesofCarrots requested a review from mvines January 28, 2021 01:22
Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

looks super!

@CriesofCarrots CriesofCarrots merged commit 190e664 into solana-labs:master Jan 28, 2021
@CriesofCarrots CriesofCarrots deleted the s-memo branch July 23, 2021 04:42
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.

Add a signed memo program
2 participants