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

feat: implement CallCallablePoint to VM #97

Closed
wants to merge 12 commits into from

Conversation

loloicci
Copy link
Member

@loloicci loloicci commented Mar 20, 2023

Description

This PR uses Finschia/cosmwasm#272 so updated after it is merged.

This PR implements CallCallablePoint to VM.
This calls a callable point (dynamic linked callee function).

This is a part of Finschia/cosmwasm#273.
Finschia/cosmwasm#273 is solved after this PR is merged and API for rust using CallCallablePoint is implemented.

Types of changes

  • Bug fix (changes which fixes an issue)
  • New feature (changes which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ETC (build, ci, docs, perf, refactor, style, test)

Checklist

@loloicci loloicci added the dynamic_link relate the dynamic link call feature label Mar 20, 2023
@loloicci loloicci self-assigned this Mar 20, 2023
@loloicci loloicci marked this pull request as draft March 20, 2023 01:17
libwasmvm/src/calls.rs Outdated Show resolved Hide resolved
@loloicci loloicci force-pushed the rust-go-pointer branch 4 times, most recently from 9eb6459 to f9a5546 Compare March 29, 2023 13:44
@loloicci loloicci marked this pull request as ready for review March 30, 2023 12:23
api/lib.go Outdated
// name: Serialized string
// args: Serialized [][]byte
// callstack: Serialized []string
// returned used_gas: without instantiation cost
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does used_gas refer to the name of the variable? If so, isn't it gasUsed?

dudong2
dudong2 previously approved these changes Apr 4, 2023
Copy link

@kokeshiM0chi kokeshiM0chi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like to add a test case when the argument isReadonly = true?
postscript: This has been addressed here. Thanks.

- fix to cost gas even if call callable point fails because of permission.
- add a test for it
- build libwasmvm
@loloicci loloicci requested a review from da1suk8 April 12, 2023 02:05
@loloicci
Copy link
Member Author

Cannot merge into dynamic_link because of #102.
All changes in this PR are included in #103.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic_link relate the dynamic link call feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants