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

Support MethodCall encoding of Numeric methods #667

Open
2 tasks done
aslesarenko opened this issue Jun 19, 2020 · 0 comments
Open
2 tasks done

Support MethodCall encoding of Numeric methods #667

aslesarenko opened this issue Jun 19, 2020 · 0 comments
Assignees
Labels
3h Approximately 3 hours or work A-consensus Area: Code used in consensus (i.e. transaction validation) C-enhancement Category: A PR with an enhancement or a proposed one in an issue. hard-fork Implementation requires hard-fork P1-high Priority: High
Milestone

Comments

@aslesarenko
Copy link
Member

aslesarenko commented Jun 19, 2020

This list defines which types can contain methods https://github.com/ScorexFoundation/sigmastate-interpreter/blob/e776b81605a65db3ec06f60b0105d7a9264c34f5/sigmastate/src/main/scala/sigmastate/types.scala#L133

The mapping is used in SMethod.fromIds which in turn is used in MethodCallSerializer to parse MethodCall nodes.

  • It should contain all numeric types (including also SNumericType) to support method calls like 10.toByte which encoded as MethodCall with typeId = 4, methodId = 1.
  • fix SNumericType.typeId which is now shadowed by SGlobal.typeId

UPD: the SNumericType is demoted as a receiver object of method calls.

@aslesarenko aslesarenko added C-enhancement Category: A PR with an enhancement or a proposed one in an issue. A-consensus Area: Code used in consensus (i.e. transaction validation) P1-high Priority: High hard-fork Implementation requires hard-fork labels Jun 19, 2020
@aslesarenko aslesarenko added this to the v4.0 milestone Jun 19, 2020
@aslesarenko aslesarenko self-assigned this Jun 19, 2020
@aslesarenko aslesarenko added the 3h Approximately 3 hours or work label Sep 11, 2020
@aslesarenko aslesarenko modified the milestones: v5.0, v6.0 Apr 4, 2021
@aslesarenko aslesarenko linked a pull request May 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3h Approximately 3 hours or work A-consensus Area: Code used in consensus (i.e. transaction validation) C-enhancement Category: A PR with an enhancement or a proposed one in an issue. hard-fork Implementation requires hard-fork P1-high Priority: High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant