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

Improve Issue transaction logic for cryptocurrency-advanced [ECR-1132] #633

Open
stanislav-tkach opened this issue Apr 17, 2018 · 3 comments
Labels
good first issue ❤️ Issues for the external contributors.

Comments

@stanislav-tkach
Copy link
Contributor

Currently Issue transaction can be sent by anyone. Its logic should be updated, so that way that this transaction must be signed by the special key stored in the config.

@stanislav-tkach stanislav-tkach added the good first issue ❤️ Issues for the external contributors. label Apr 17, 2018
@jgollhardt
Copy link

The docs for verifying transactions specify that "This method should not use external data, that is, it must be a pure function."

Wouldn't this require reading a public key from outside the context of the transaction?

I'm probably just missing something.

@stanislav-tkach
Copy link
Contributor Author

@jgollhardt You are right, technically verify doesn't have access to the database, but the key (or other data) can be stored inside of the global (lazy_static) variable that can be accessed inside the verify method. It isn't an elegant solution, but we use it in several (not public) services.

After #1002 we don't have the verify function anymore, so documentation is outdated (it will be updated soon). Now all checks should be done inside of the execute method.

@jgollhardt
Copy link

Ah, that makes sense. Thank you @DarkEld3r !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue ❤️ Issues for the external contributors.
Development

No branches or pull requests

2 participants