fix: use dot-delimited type strings for dynamic record and future#1210
Merged
marshacb merged 1 commit intofeat/dynamic-dispatchfrom Mar 2, 2026
Merged
Conversation
…ture to match snarkVM
iamalwaysuncomfortable
approved these changes
Mar 2, 2026
iamalwaysuncomfortable
pushed a commit
that referenced
this pull request
Mar 11, 2026
…ture to match snarkVM (#1210)
iamalwaysuncomfortable
pushed a commit
that referenced
this pull request
Mar 24, 2026
…ture to match snarkVM (#1210)
iamalwaysuncomfortable
pushed a commit
that referenced
this pull request
Mar 24, 2026
…ture to match snarkVM (#1210)
iamalwaysuncomfortable
pushed a commit
that referenced
this pull request
Mar 25, 2026
…ture to match snarkVM (#1210)
iamalwaysuncomfortable
pushed a commit
that referenced
this pull request
Mar 26, 2026
…ture to match snarkVM (#1210)
iamalwaysuncomfortable
added a commit
that referenced
this pull request
Mar 26, 2026
* Change SnarkVM dep to latest rev on the corresponding SnarkVM:feat/dynamic-dispatch branch * [Fix] add WASM support for dynamic dispatch variant types (#1199) * Add WASM support for dynamic dispatch variant types (DynamicRecord, DynamicFuture, RecordWithDynamicID, ExternalRecordWithDynamicID) * fmt * fix(wasm): normalize dynamic dispatch type strings to match snarkVM serialization and add missing doc comments * add JS/TS fixture tests for dynamic dispatch variant types (record_dynamic, record_with_dynamic_id, external_record_with_dynamic_id) * fix: use dot-delimited type strings for dynamic.record and dynamic.future to match snarkVM (#1210) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Update SnarkVM rev for dynamic dispatch * [Feature] Create stringToField utility (#1237) * Add stringToField utility function for converting program and function names to fields for dynamic dispatch * Add exports of the stringToField utility in the js SDK * [Feature] Re-export dynamic record from SnarkVM (#1236) * Add the dynamic record type * Add JS side tests for the DynamicRecord type * Check visibility on record conversion roundtrip --------- Signed-off-by: Mike Turner <mike@provable.com> * [Feature] Updates to make AMM tests work. (#1241) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Updates to make AMM tests works * Also handle upgrade * Address feedback * Cleanup * Cargo fmt lints * Revert .gitignore changes unrelated to this PR * Change core rev to the testnet 4.6.0 candidate * Bump version update to v0.9.18 * Remove unecessary dependencies in the workspace root --------- Co-authored-by: Mike Turner <mike@provable.com> * [Chore] Upgrade external signing for dynamic dispatch inputs. (#1266) * Upgrade external signing for extra dynamic dispatch input types * Update JS tests to account for external signing * Address copilot nits * Address copilot nits --------- Signed-off-by: Mike Turner <mike@provable.com> Co-authored-by: marshacb <cameron.marshall12@gmail.com> Co-authored-by: d0cd <23022326+d0cd@users.noreply.github.com>
iamalwaysuncomfortable
added a commit
that referenced
this pull request
Mar 31, 2026
* Change SnarkVM dep to latest rev on the corresponding SnarkVM:feat/dynamic-dispatch branch * [Fix] add WASM support for dynamic dispatch variant types (#1199) * Add WASM support for dynamic dispatch variant types (DynamicRecord, DynamicFuture, RecordWithDynamicID, ExternalRecordWithDynamicID) * fmt * fix(wasm): normalize dynamic dispatch type strings to match snarkVM serialization and add missing doc comments * add JS/TS fixture tests for dynamic dispatch variant types (record_dynamic, record_with_dynamic_id, external_record_with_dynamic_id) * fix: use dot-delimited type strings for dynamic.record and dynamic.future to match snarkVM (#1210) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Update SnarkVM rev for dynamic dispatch * [Feature] Create stringToField utility (#1237) * Add stringToField utility function for converting program and function names to fields for dynamic dispatch * Add exports of the stringToField utility in the js SDK * [Feature] Re-export dynamic record from SnarkVM (#1236) * Add the dynamic record type * Add JS side tests for the DynamicRecord type * Check visibility on record conversion roundtrip --------- Signed-off-by: Mike Turner <mike@provable.com> * [Feature] Updates to make AMM tests work. (#1241) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Updates to make AMM tests works * Also handle upgrade * Address feedback * Cleanup * Cargo fmt lints * Revert .gitignore changes unrelated to this PR * Change core rev to the testnet 4.6.0 candidate * Bump version update to v0.9.18 * Remove unecessary dependencies in the workspace root --------- Co-authored-by: Mike Turner <mike@provable.com> * [Chore] Upgrade external signing for dynamic dispatch inputs. (#1266) * Upgrade external signing for extra dynamic dispatch input types * Update JS tests to account for external signing * Address copilot nits * Address copilot nits --------- Signed-off-by: Mike Turner <mike@provable.com> Co-authored-by: marshacb <cameron.marshall12@gmail.com> Co-authored-by: d0cd <23022326+d0cd@users.noreply.github.com>
iamalwaysuncomfortable
added a commit
that referenced
this pull request
Mar 31, 2026
….6.0 (#1276) * [Chore] Merge dynamic dispatch into testnet (#1261) * Change SnarkVM dep to latest rev on the corresponding SnarkVM:feat/dynamic-dispatch branch * [Fix] add WASM support for dynamic dispatch variant types (#1199) * Add WASM support for dynamic dispatch variant types (DynamicRecord, DynamicFuture, RecordWithDynamicID, ExternalRecordWithDynamicID) * fmt * fix(wasm): normalize dynamic dispatch type strings to match snarkVM serialization and add missing doc comments * add JS/TS fixture tests for dynamic dispatch variant types (record_dynamic, record_with_dynamic_id, external_record_with_dynamic_id) * fix: use dot-delimited type strings for dynamic.record and dynamic.future to match snarkVM (#1210) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Update SnarkVM rev for dynamic dispatch * [Feature] Create stringToField utility (#1237) * Add stringToField utility function for converting program and function names to fields for dynamic dispatch * Add exports of the stringToField utility in the js SDK * [Feature] Re-export dynamic record from SnarkVM (#1236) * Add the dynamic record type * Add JS side tests for the DynamicRecord type * Check visibility on record conversion roundtrip --------- Signed-off-by: Mike Turner <mike@provable.com> * [Feature] Updates to make AMM tests work. (#1241) * Handle Consensus V14 in deployments (#1230) * Handle Consensus V14 in deployments * Remove redundant .map_err in latest_stateroot call * Update getOrInitConsensusVersionTestHeights tests and doc comments to handle all currently active test version heights * Deallocate deployment cost tuple * Updates to make AMM tests works * Also handle upgrade * Address feedback * Cleanup * Cargo fmt lints * Revert .gitignore changes unrelated to this PR * Change core rev to the testnet 4.6.0 candidate * Bump version update to v0.9.18 * Remove unecessary dependencies in the workspace root --------- Co-authored-by: Mike Turner <mike@provable.com> * [Chore] Upgrade external signing for dynamic dispatch inputs. (#1266) * Upgrade external signing for extra dynamic dispatch input types * Update JS tests to account for external signing * Address copilot nits * Address copilot nits --------- Signed-off-by: Mike Turner <mike@provable.com> Co-authored-by: marshacb <cameron.marshall12@gmail.com> Co-authored-by: d0cd <23022326+d0cd@users.noreply.github.com> * Bump version update to v0.10.0 * Remove duplicate input * Bump SnarkVM dependency to 4.6.0 * Bump SDK version to v0.10.1 --------- Signed-off-by: Mike Turner <mike@provable.com> Co-authored-by: marshacb <cameron.marshall12@gmail.com> Co-authored-by: d0cd <23022326+d0cd@users.noreply.github.com>
This file contains hidden or 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
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.
Motivation
The
ValueType::DynamicRecordandValueType::DynamicFuturevariants inget_inputs()serialize their type strings with underscores (dynamic_record,dynamic_future) instead of dots (dynamic.record,dynamic.future). This is inconsistent with snarkVM's Display implementation for these types (value_type/parse.rs:71-72).Note
Medium Risk
Changes the serialized
typestrings returned byProgram.getFunctionInputs()forDynamicRecord/DynamicFuture, which may break consumers relying on the previous underscore format.Overview
Fixes
Program.getFunctionInputs()to serializeValueType::DynamicRecordandValueType::DynamicFutureusing dot-delimitedtypestrings (dynamic.record,dynamic.future) instead of underscore-delimited variants.This brings the WASM program-introspection output in line with snarkVM’s type string conventions.
Written by Cursor Bugbot for commit f7e79a9. This will update automatically on new commits. Configure here.