Skip to content

elgamal-registry-interface: Introduce light crate for token-2022#799

Merged
joncinque merged 4 commits intosolana-program:mainfrom
joncinque:reg-interface
Oct 30, 2025
Merged

elgamal-registry-interface: Introduce light crate for token-2022#799
joncinque merged 4 commits intosolana-program:mainfrom
joncinque:reg-interface

Conversation

@joncinque
Copy link
Copy Markdown
Contributor

Problem

Token-2022 depends on the ElGamal registry program, which makes it impossible to run LTO on the final program build.

Summary of changes

Similar to the other break-ups that have been done, move out the instruction / state / address derivation functions into an interface crate, and then depend on that in token-2022.

#### Problem

Token-2022 depends on the ElGamal registry program, which makes it
impossible to run LTO on the final program build.

#### Summary of changes

Similar to the other break-ups that have been done, move out the
instruction / state / address derivation functions into an interface
crate, and then depend on that in token-2022.
@joncinque joncinque marked this pull request as ready for review October 28, 2025 12:16
samkim-crypto
samkim-crypto previously approved these changes Oct 30, 2025
Copy link
Copy Markdown
Contributor

@samkim-crypto samkim-crypto left a comment

Choose a reason for hiding this comment

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

Seems pretty straightforward to me. Just a small clarifying question below.


[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a small question. I see that the program id is included in the Cargo.toml for the token-2022 interface crate. Do we not need it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't technically need it for anything just yet, but it can't hurt to add it -- done!

@joncinque joncinque merged commit 291ce96 into solana-program:main Oct 30, 2025
36 checks passed
@joncinque joncinque deleted the reg-interface branch October 30, 2025 13:45
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