-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add input file SHA256 hash consts to Go/Rust generated code #89
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graydon
approved these changes
Jun 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we should do this -- I'm writing the core-side stuff presently.
TODO:
|
@graydon I've updated it to include the name of the file as you requested: /// `XDR_FILES_SHA256` is a list of pairs of source files and their SHA256 hashes.
pub const XDR_FILES_SHA256: [(&str, &str); 6] = [
(
"xdr/curr/Stellar-SCP.x",
"8f32b04d008f8bc33b8843d075e69837231a673691ee41d8b821ca229a6e802a",
),
(
"xdr/curr/Stellar-ledger-entries.x",
"3aa135c309c2d67883f165961739b4940c90df59240d8aeef55deced8d7708b5",
),
(
"xdr/curr/Stellar-ledger.x",
"ef746ead6bb8ef9541599796804d672f2994e2599a6dc595ece099e166b49f10",
),
(
"xdr/curr/Stellar-overlay.x",
"8ecbc36d2a43103499a6416572c7cd7b4fd7638d1a2af515b81b463ce6909c51",
),
(
"xdr/curr/Stellar-transaction.x",
"45fdeb428e68d6b07e3e3157b6404567e0efb712c9d4c90a61a1035854c32b90",
),
(
"xdr/curr/Stellar-types.x",
"60b7588e573f5e5518766eb5e6b6ea42f0e53144663cbe557e485cceb6306c85",
),
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Add input file SHA256 hash consts to Go/Rust generated code, injecting the following into the Stellar rs-stellar-xdr lib:
Why
@graydon pointed out that in applications or systems like stellar-core that import multiple XDR generated libraries it is really easy to accidentally import libraries that were generated from different sources. This mistake has occurred once and could have reasonably significant consequences, so building in meta information that applications like stellar-core can validate seems worthwhile.
Close #88
Known Limitations
This change only adds them to the Go and Rust libs.