-
Notifications
You must be signed in to change notification settings - Fork 3
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
XCall V2 changes #30
Comments
https://github.com/icon-project/IBC-Integration/blob/main/docs/ibc-setup-using-dive-cli.md |
@AntonAndell thanks for the information, ill setup a local environment for testing, run some tests with the provided example dapps and ill contact you with any question before starting writing a draft for the new docs. |
Hi @AntonAndell as I commented in previous calls here is the summary of things ive encountered during my tests of xcall v2 Differences between xcall v1 and xcall v2Events
Events descriptions
Main interfaceThe following section describes the differences in the main interfaces (contract methods) between xcall V1 and xcall V2. sendCallMessage
executeCallSame interface on both versions.
handleCallMessage
executeRollbackSame interface on both versions.
Topics to discuss for updating current documentation.Taking into consideration the differences described in the previous points and the comment by @AntonAndell, I believe there are several items that are needed to fully document xcall-v2, each item has a different priority which I would like to discuss here before making changes to the documentation. The following is a list of the items with my personal assessment of the priority in each of them:
|
|
PR #31 closes this issue |
The library to be used now for xcall development is:
xyz.venture23:xcall-lib:0.1.1' for java
cw-xcall-lib={package="cw-xcall-lib", git="https://github.com/icon-project/xcall-multi.git", branch="main", features = ["library"]} for cosmwam
Solidity lib: to be published?
Differences from IIP52 xCall
Multi protocol xCall is based on the initial spec defined
in IIP52.
Two new optional parameters are added in sendCallMessage:
_sources
anddestinations
.These parameters can be specified to choose the protocols to deliver the xCall message.
If, for example, a dapp wanted to use BTP, they specify the address of BMC as the source and the address of BMC on a
destination chain as destinations.
Rollback guarantees.
In IIP52, xCall rollback executions can only be tried once before removed, which can cause loss of data in case of
failure.
In xCall multi protocol, it can be retried until successful.
Two-way message success verification.
For all two-way messages, a response has to be relayed back since the fee has already been paid.
This means that in most cases, a response with the result success is being relayed back.
In xCall multi protocol, we store this success receipt so that it can be verified by dapps.
BTP address has been replaced completely by Network Address.
A BTP address is a Network Address as defined here with a
btp://
prefix.A Network Address in IIP52 refers to the Network ID in this document which might cause some confusion.
The source of truth for a Network ID is now in xCall and not BMC.
_nsn
is removed fromCallMessageSent
event.Error messages are no longer relayed across chains in a response.
_msg
has been removed from ResponseMessage event. This is due to the removal of relaying the error messages.A message can now only be success or failure (1 or 0).
In IIP52 a message can have many different error codes but was not used by dapps and the same behavior is not
necessarily supported by all chains.
MaxDataSize is defined on the whole payload rather than only user data
This change was necessary to limit the size of the
_sources
anddestinations
parameters.What this means for dapps using v1:
The use of BTP address needs to be changed to NetworkAddress.
Example remove btp prefix from
btp://${NETWORK_LABEL_DESTINATION}/${CONTRACT_DESTINATION}
;Network Address implmentation will work the same as BTP address and no extra changes should be needed.
If event listeners are used some parameters have changed.
Less priority:
Example dapps:
Solidity:
https://github.com/icon-project/xcall-multi/blob/main/contracts/evm/contracts/mocks/dapp/DAppProxySample.sol
https://github.com/icon-project/xcall-multi/blob/main/contracts/evm/contracts/mocks/multi-protocol-dapp/MultiProtocolSampleDapp.sol
Java:
https://github.com/icon-project/xcall-multi/blob/main/contracts/javascore/example-dapps/dapp-multi-protocol/src/main/java/xcall/sample/dapp/MultiProtocolSampleDapp.java
https://github.com/icon-project/xcall-multi/blob/main/contracts/javascore/example-dapps/dapp-simple/src/main/java/xcall/sample/dapp/SimpleDapp.java
Cosmwasm:
https://github.com/icon-project/xcall-multi/tree/main/contracts/cosmwasm-vm/cw-mock-dapp-multi
https://github.com/icon-project/xcall-multi/tree/main/contracts/cosmwasm-vm/cw-mock-dapp
@FidelVe Lets keep discussion and questions in this issue during the development
The text was updated successfully, but these errors were encountered: