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

Change instruction name #40

Merged
merged 4 commits into from
Sep 27, 2023
Merged

Change instruction name #40

merged 4 commits into from
Sep 27, 2023

Conversation

febo
Copy link
Contributor

@febo febo commented Sep 27, 2023

This PR fixes a typo on the set_decompressible_state instruction name. The "old" set_decompressable_state instruction is still present on the program for backwards compatibility, but the clients only have the new one.

@febo febo marked this pull request as ready for review September 27, 2023 13:44
@febo febo marked this pull request as draft September 27, 2023 18:04
@febo febo marked this pull request as ready for review September 27, 2023 18:23
Comment on lines +51 to +53
[82, 104, 152, 6, 149, 111, 100, 13] => InstructionName::SetDecompressibleState,
// `SetDecompressableState` instruction mapped to `SetDecompressibleState` instruction
[18, 135, 238, 168, 246, 195, 61, 115] => InstructionName::SetDecompressibleState,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking it through: Perhaps technically one could argue if you got the old discriminator you would be interested in the exact instruction name that was called. But I think this is fine because the instructions do the exact same thing. If for example the Read API is parsing the old or the new instruction, any args and account updates it would see would be exact same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, from a binary perspective, all bytes after the discriminator are exactly the same. And the code is exactly the same, only the function name has changed.

@febo febo merged commit cab7a38 into febo/rename Sep 27, 2023
@febo febo deleted the febo/decompressible-fix branch September 27, 2023 20:25
febo added a commit that referenced this pull request Sep 27, 2023
* Move processor implementation

* Fix truncated comment

* Update generated clients

* Fix test compilation

* Tweak processor methods visibility

* Remove duplicated functions

* Change instruction name (#40)

* Change instruction name

* Update instruction name enum

* Update generated code

* Add helpers

* Update generated clients

* Update test import

* Update generated clients

---------

Co-authored-by: febo <[email protected]>
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.

2 participants