Skip to content

Dispatch SBox accessor method-forms (PropertyCall 99:2..6)#905

Open
mwaddip wants to merge 1 commit into
ergoplatform:developfrom
mwaddip:fix/sbox-accessor-method-form-dispatch
Open

Dispatch SBox accessor method-forms (PropertyCall 99:2..6)#905
mwaddip wants to merge 1 commit into
ergoplatform:developfrom
mwaddip:fix/sbox-accessor-method-form-dispatch

Conversation

@mwaddip

@mwaddip mwaddip commented Jun 13, 2026

Copy link
Copy Markdown

The JVM catalogues the SBox accessors as PropertyCall methods in commonBoxMethods (from v5Methods, no gate), and MethodCall.eval evaluates any catalogued FixedCost method via invokeFixed reflection — so a hand-crafted PropertyCall(99,N) evaluates JVM-side. sigma-rust registered only value (1), getReg (7), tokens (8), so propositionBytes/bytes/bytesWithoutRef/id/creationInfo (ids 2..6) failed to resolve at parse (UnknownMethodId) — an us-vs-JVM divergence on method-form trees.

Registers the five commonBoxMethods descriptors (methods.scala SBoxMethods) and dispatches each through its op-form helper (ExtractScriptBytes/ExtractBytes/ExtractBytesWithNoRef/ExtractId/ExtractCreationInfo), as value already does, so each returns its op-form twin value.

The JVM catalogues the SBox accessors as PropertyCall methods in
commonBoxMethods (present from v5Methods, no version gate) and
MethodCall.eval evaluates any catalogued FixedCost method via
invokeFixed reflection, so a hand-crafted PropertyCall(99,N) tree
evaluates JVM-side with no bespoke eval-fn. sigma-rust registered only
value (99:1), getReg (7) and tokens (8), so the propositionBytes/bytes/
bytesWithoutRef/id/creationInfo method-forms (99:2..6) failed to resolve
at parse (UnknownMethodId) and surfaced as errored — an us-vs-JVM fork
on method-form trees (compilers emit the op-forms, which already work).

Register the five descriptors (methods.scala SBoxMethods: SFunc(SBox,
Coll[Byte]) for 2..5, (Int, Coll[Byte]) for creationInfo) and dispatch
each through the existing op-form value helper (ExtractScriptBytes /
ExtractBytes / ExtractBytesWithNoRef / ExtractId / ExtractCreationInfo),
exactly as value (99:1) already does, so each method-form returns the
same value as its op-form twin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant