-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add version to template WASMs (#835)
Description --- * Updated the template definition in the ABI to include the Tari version it was compiled on * Validator nodes call this new function when loading a new template WASM for execution, and check the version against the engine's own version. For now, no errors are returned even if they don't match, only logging is performed. Motivation and Context --- We want to know the Tari version (i.e. the Cargo package version of the project) that a template was compiled with, as this determines the engine calls that it may request during execution. The goal is to be able to detect version incompatibilities when executing. For now this PR only adds the version to the template WASMs and logs version match/mismatch, no error is returned. In the future this setup will allow us to load the appropriate `template_lib` version (and/or other dependencies) for each template and avoid incompatibilities. How Has This Been Tested? --- Launching a local network and inspecting the VN logs when executing a transaction for the Tari version messages What process can a PR reviewer use to test or verify this change? --- Inspect the VN logs when executing a transaction for the Tari version messages Breaking Changes --- - [ ] None - [ ] Requires data directory to be deleted - [x] Breaking change: the Template ABI changes so all templates (included the built-in ones) must be recompiled
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
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