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 for new InvokeHostFunctionOperation #472

Closed
sreuland opened this issue Mar 22, 2023 · 7 comments · Fixed by #481
Closed

Support for new InvokeHostFunctionOperation #472

sreuland opened this issue Mar 22, 2023 · 7 comments · Fixed by #481
Assignees

Comments

@sreuland
Copy link
Contributor

sreuland commented Mar 22, 2023

What problem does your feature solve?

lack of support for InvokeHostFunctionOperation in api response marshaling.

What would you like to see?

support for marshaling the InvokeHostFunctionOp operation in any api responses (protocol definition).
a builder for constructing I
Includes using new strkey encoding for contract addresses, which may be present in the to/from fields of the InvokeHostFunctionOp:AssetBalanceChanges

related to SDK Epic - #490

What alternatives are there?

n/a

@sreuland
Copy link
Contributor Author

sreuland commented May 1, 2023

@tsachiherman , @mollykarcher , should the support level in the java SDK begin with inclusion of this recent update for multiple Function's as array in xdr model of InvokeHostFunctionOp, the Function model was singular prior:

stellar/stellar-xdr@b721f81

Is the multi-function model intended to be part of Preview 9?

@tsachiherman
Copy link

yes, the multi-function is going to be on preview 9, although we haven't scheduled any particular time to migrate our SDKs for that.

@tsachiherman
Copy link

If we could provide a minimal support for our SDK to support only a single function, that would likely to be acceptable - although I don't know if it would be possible. ( due to the way the SDK treat XDR ).

@sreuland
Copy link
Contributor Author

sreuland commented May 1, 2023

ok, the java sdk has a layer of class abstractions for OperationResponse's in general that end clients use and these encapsulate the json emitted from Horizon Rest API, which does closely follow the xdr models, but not necessarily verbatim.

Current soroban enabled horizon emits the single function model of InvokeHostFunctionOp, and will start the java sdk support against that InvokeHostFunctionOp model. Since multi-function is intended to be part of preview9 xdr schema, we will need to update the soroban enabled horizon as part of that to parse/emit the multi-function model of InvokeHostFunctionOp, and then can change java sdk to parse the newer json of InvokeHostFunctionOp correctly afterwards.

thanks for clarification.

@tsachiherman
Copy link

ok, the java sdk has a layer of class abstractions for OperationResponse's in general that end clients use and these encapsulate the json emitted from Horizon Rest API, which does closely follow the xdr models, but not necessarily verbatim.

Current soroban enabled horizon emits the single function model of InvokeHostFunctionOp, and will start the java sdk support against that InvokeHostFunctionOp model. Since multi-function is intended to be part of preview9 xdr schema, we will need to update the soroban enabled horizon as part of that to parse/emit the multi-function model of InvokeHostFunctionOp, and then can change java sdk to parse the newer json of InvokeHostFunctionOp correctly afterwards.

thanks for clarification.

All correct. On go, I've created
stellar/go#4854 to address that. I'm waiting for core to complete their release so I can test these changes.

@sreuland
Copy link
Contributor Author

sreuland commented May 3, 2023

ok, thanks, am contributing to stellar/go#4854, updating the 'Details' json output for InvokeHostFunctionOp to serialize multi-functions per Op now, which having that updated json model is a pre-req before start here.

@overcat
Copy link
Member

overcat commented Aug 23, 2023

Implemented in #481.

@sreuland sreuland assigned overcat and unassigned sreuland Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants