feat(calldata)!: move method-call key from "method" to "" (empty string)#192
Draft
MuncleUscles wants to merge 1 commit into
Draft
feat(calldata)!: move method-call key from "method" to "" (empty string)#192MuncleUscles wants to merge 1 commit into
MuncleUscles wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The v0.6 genvm-manager renamed the method-call calldata map key from "method" to "" (empty string). The empty key sorts first in canonical calldata map encoding (keys ordered by unicode-codepoint array; the empty array precedes any non-empty key), so the method name becomes a prefix of the encoded binary calldata. makeCalldataObject now writes the method name under ret[""]. The decoder is unchanged: it builds a generic Map from raw key bytes and already reads whatever key is present. No back-compat toggle — there is no calldata versioning mechanism in this repo, so this is a hard cutover. The genvm-manager still auto-remaps "method" -> "" but logs an error each time; this migration stops that error. BREAKING CHANGE: method-call calldata now uses the "" key instead of "method". Encoded bytes for every write/read/view/schema call change. Peers must run the v0.6 genvm-manager (or a node/studio build that expects the "" key).
c6d8fb6 to
41e296f
Compare
This was referenced Jul 9, 2026
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.
Depends-On: genlayerlabs/genvm-manager#1
Depends-On: https://github.com/genlayerlabs/genlayer-node/pull/1502
Depends-On: https://github.com/genlayerlabs/genlayer-dev-env/pull/95
Depends-On: https://github.com/genlayerlabs/genlayer-e2e/pull/619
Depends-On: genlayerlabs/genlayer-studio#1697
Depends-On: genlayerlabs/genlayer-py#96
Depends-On: #192
Depends-On: genlayerlabs/genlayer-testing-suite#98
Migrate the calldata ABI to the genvm-manager v0.6 method-call wire format.
Wire-format change
The method-call calldata map key moves from
"method"to""(empty string). In canonicalcalldata map encoding, keys are ordered by their unicode-codepoint array and the empty array
precedes any non-empty key — so
""sorts first and the method name becomes a prefix ofthe encoded binary calldata (ahead of
args/kwargs).The v0.6 genvm-manager still auto-remaps
"method"->"", but it logs an error on everycall while doing so. This migration stops that error by emitting the new key natively.
What changed
src/abi/calldata/encoder.ts—makeCalldataObjectnow writes the method name underret[""]instead ofret["method"]. This flows through every SDK path that buildsmethod-call calldata: writes (
addTransaction), reads/view calls (sim_call), and theschema call. Deploy calldata uses
method === undefined(no method key) and is unaffected.src/abi/calldata/decoder.tsbuilds a genericMapfrom raw keybytes and already reads whatever key is present; it needs no change.
tests/calldata.test.ts(new) — asserts the decoded map has key""== the methodname, does not have
"method", and that""is the first entry (sorts before bothargsandkwargs). These assertions fail under the old"method"key (verified).No back-compat toggle
This repo has no calldata versioning mechanism, so this is a hard cutover per the migration
scope. Peers must run the v0.6 genvm-manager (or a node/studio build expecting the
""key).Verification
vitest run --typecheck: 88/88 tests pass, no type errorsnpm run build: greeneslinton touched files: cleanBREAKING CHANGE
Method-call calldata now uses the
""key instead of"method". Encoded bytes for everywrite/read/view/schema call change.