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

Add sdk version to contract meta automatically #1016

Merged
merged 13 commits into from
Jun 24, 2023
Merged

Add sdk version to contract meta automatically #1016

merged 13 commits into from
Jun 24, 2023

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jun 23, 2023

What

Add rust version and sdk version to contract meta automatically.

Rustc version is stored in meta under the key rsver.

SDK version is stored in meta under the key rssdkver.

Section `contractmetav0` (100 bytes):
Length: 100 (0x64) bytes
0000:   00 00 00 00  00 00 00 05  72 73 76 65  72 00 00 00   ........rsver...
0010:   00 00 00 06  31 2e 37 30  2e 30 00 00  00 00 00 00   ....1.70.0......
0020:   00 00 00 08  72 73 73 64  6b 76 65 72  00 00 00 34   ....rssdkver...4
0030:   30 2e 38 2e  34 23 32 62  33 30 65 34  37 33 36 36   0.8.4#2b30e47366
0040:   39 66 61 63  38 30 33 31  38 38 66 61  63 30 32 63   9fac803188fac02c
0050:   62 63 66 61  36 30 39 63  31 39 64 63  63 36 2d 64   bcfa609c19dcc6-d
0060:   69 72 74 79                                          irty

Why

The rustc version is a primitive for future supporting reproducible builds.

The SDK version is for debugging situations where incompatibilities arise across different versions, and for better understanding them.

Close #735

@leighmcculloch leighmcculloch marked this pull request as ready for review June 23, 2023 23:38
@leighmcculloch leighmcculloch enabled auto-merge (squash) June 23, 2023 23:45
@leighmcculloch leighmcculloch enabled auto-merge (squash) June 24, 2023 02:48
@leighmcculloch leighmcculloch merged commit 11441db into main Jun 24, 2023
@leighmcculloch leighmcculloch deleted the i735 branch June 24, 2023 03:13
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.

Embed Build and Version into contracts
2 participants