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: 177-xcall future proof messaging #213

Merged
merged 35 commits into from
Mar 15, 2024

Conversation

ibrizsabin
Copy link
Collaborator

Description:

Commit Message

type: commit message

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

AntonAndell and others added 4 commits December 1, 2023 09:41
* docs: Add new message strucute to xCall design doc

* feat: Add message types to xCall

* fix: Revert change of rollback db name

Break out db paths into static String variables

* fix: Revert to using seperate databases for pending requests and responses
* feat: Add message types to xCall

* feat: add multi message

* fix: fix test

* refactor: csresponse to scresult

* refactor: csmessage type

* docs: Add new message strucute to xCall design doc

* refactor: rename result

* fix: fix test

* chore: cleanup

* test: add test for envelope encoding

* test: add envelope encoding test

* chore: fix lint

* feat: Add message types to xCall

* fix: remove should persist

* fix: remove duplicate merge

* fix: encode length

* fix: remove msg type

* test: fix tests

* fix: Revert change of rollback db name

Break out db paths into static String variables

* Update docs/adr/xcall.md

Co-authored-by: AntonAndell <[email protected]>

---------

Co-authored-by: AntonAndell <[email protected]>
* fix: add reply msg  on response

* fix: add handle reply

* fix: use sendCall to reply back

* fix: fix send sn

* fix: remove msg from result

* fix: add dapp message

* fix: add reply validation

* fix: add reply validation

* dix: update is reply on get fee

* formatting suggestion

Co-authored-by: AntonAndell <[email protected]>

* formatting suggestion

Co-authored-by: AntonAndell <[email protected]>

* Update docs/adr/xcall.md

Co-authored-by: AntonAndell <[email protected]>

* Update docs/adr/xcall.md

Co-authored-by: AntonAndell <[email protected]>

* fix: resolve comments

* fix: doc convention

---------

Co-authored-by: AntonAndell <[email protected]>
@ibrizsabin ibrizsabin linked an issue Dec 13, 2023 that may be closed by this pull request
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 13, 2023
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: Patch coverage is 49.94206% with 432 lines in your changes are missing coverage. Please review.

Project coverage is 63.68%. Comparing base (96d156a) to head (3e87596).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #213      +/-   ##
============================================
- Coverage     72.06%   63.68%   -8.39%     
- Complexity       55       75      +20     
============================================
  Files            35       42       +7     
  Lines          2073     2652     +579     
  Branches         34       37       +3     
============================================
+ Hits           1494     1689     +195     
- Misses          563      946     +383     
- Partials         16       17       +1     
Flag Coverage Δ
java 84.55% <81.25%> (+3.05%) ⬆️
rust 62.02% <41.85%> (-6.47%) ⬇️
solidity 59.20% <39.70%> (-25.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ontracts/cosmwasm-vm/cw-xcall-lib/src/xcall_msg.rs 0.00% <ø> (ø)
contracts/cosmwasm-vm/cw-xcall/src/assertion.rs 74.57% <100.00%> (-20.34%) ⬇️
contracts/cosmwasm-vm/cw-xcall/src/error.rs 100.00% <ø> (ø)
contracts/cosmwasm-vm/cw-xcall/src/execute_call.rs 81.05% <100.00%> (+2.48%) ⬆️
contracts/cosmwasm-vm/cw-xcall/src/lib.rs 27.77% <ø> (ø)
...ntracts/cosmwasm-vm/cw-xcall/src/types/rollback.rs 73.68% <ø> (ø)
...cts/cosmwasm-vm/cw-xcall/src/types/storage_keys.rs 85.00% <100.00%> (+0.78%) ⬆️
...s/evm/contracts/adapters/CentralizedConnection.sol 100.00% <ø> (ø)
...tracts/evm/contracts/adapters/LayerZeroAdapter.sol 93.33% <ø> (ø)
...ntracts/evm/contracts/adapters/WormholeAdapter.sol 92.85% <ø> (ø)
... and 19 more

ibrizsabin and others added 21 commits December 14, 2023 09:56
* feat: Add message types to xCall

* feat: add multi message

* fix: fix test

* refactor: csresponse to scresult

* refactor: csmessage type

* docs: Add new message strucute to xCall design doc

* refactor: rename result

* fix: fix test

* chore: cleanup

* test: add test for envelope encoding

* test: add envelope encoding test

* chore: fix lint

* feat: Add message types to xCall

* fix: remove should persist

* fix: remove duplicate merge

* feat: add persisted msg struct

* fix: encode length

* test: add persisted message tests

* chore: pass build

* fix: fix encoding test

* fix: remove msg type

* test: fix tests

* fix: Revert change of rollback db name

Break out db paths into static String variables

* Update docs/adr/xcall.md

Co-authored-by: AntonAndell <[email protected]>

* chore: pass build

* chore: pass build

* fix: persisted encoding

* fix: err if retry allowed

* chore: pass build

---------

Co-authored-by: AntonAndell <[email protected]>
* fix: proxy request structure with data hash added

* fix: getFee method

* fix: message encoding decoding fixed

* fix: logs removed

---------

Signed-off-by: gcranju <[email protected]>
Co-authored-by: AntonAndell <[email protected]>
* fix: add reply flow

* chore: pass build

* fix: add reply validation

* fix: add reply validation

* fix: override protocols

* Update doc with feedback

* fix: reply call

* fix: resolve comments

* feat: add error for call request not found

* chore: pass build

* update docs

Co-authored-by: AntonAndell <[email protected]>

* fix: rename call_request to rollback

* chore: pass build

* test: fix persisted test

* chore: fix build

---------

Co-authored-by: AntonAndell <[email protected]>
* fix: add reply flow

* chore: pass build

* fix: add reply validation

* fix: add reply validation

* fix: override protocols

* Update doc with feedback

* fix: reply call

* fix: resolve comments

* fix: setup test

* fix: cleanup setup

* feat: add error for call request not found

* chore: pass build

* fix: configure channel

* fix: add execute msg

* test: add send call from dapp

* fix: add reply

* fix: test ack

* fix: fix test assert

* chore: pass build

* fix: remove comments

* fix: fix caller dapp address

* fix: rename test xcall

* update docs

Co-authored-by: AntonAndell <[email protected]>

* fix: rename call_request to rollback

* chore: pass build

* test: fix persisted test

* chore: fix build

* fix: fix xcall tests

* chore: pass build

* chore: pass build

---------

Co-authored-by: AntonAndell <[email protected]>
* feat: xcall upgradeable (#179)

* feat: xcall upgradeable

* fix: foundry toml fix

* deploy mock script

* fix: remapping

* fix: env name changed

* fix: script reformed

* fix: upgradeable using openzeppelin

* fix: upgradeable using openzeppelin

* fix: deploy scripts fix

* fix: deploy scripts fix

* forge install: openzeppelin-foundry-upgrades

* fix: Make simple dapp to use same logic as dapp multi (#195)

* fix: adapters deployment scripts added

* fix: adapters included in script

---------

Co-authored-by: AntonAndell <[email protected]>

* fix: network address validation fixed (#212)

* fix: not authorized issue by making handleMessage public (#202)

* fix: not authorized issue by making handleMessage public

* feat: handleBTPMessage tests added

* fix: add fixes for handle Error

* fix: code order optmization in handle message

Signed-off-by: gcranju <[email protected]>

* fix:revert message added in handleRequest

* fix: versions openzeppelin fix

* fix: foundry upgrades deleted

---------

Signed-off-by: gcranju <[email protected]>

* ci: add job to update CHANGELOG.md (#207)

* fix: added rpsc in foundry.toml

* fix: fix env.example

* fix: new message type added in solidity

* feat: add centralized connections in solidity and java (#196)

* feat: solidity xcall connection added

* feat: icon xcall connection added

* fix: checkfee added

* feat: relayer address in centralized connection

* feat: added build scripts

* feat: solidity tests for centralized connection added

* feat: centralized connection name changed for icon

* fix: review comments addressed for solidity part

* fix: variable admin used for relayer/admin

* fix: review comments addressed for javascore part

* fix: variables in build.gradle in centralized cnnection

* fix: java score constructor

* fix: removed void from constructor

* fix: type of receipts to boolean

* fix: solitity tests resolved

* fix: logic corrected for duplicate message

* fix: fee check added in connection

* fix: centralized connection test added in solidity

* fix: admin check removed from getReceipts

Co-authored-by: redlarva <[email protected]>

* fix: onlyAdmin function

* fix: architecture updated (#214)

* fix: architecture updated

* fix: use connectio sn

* style: formatting code

* added scripts for centralized connections

* feat: centralized-connection javascore tests added

* feat: clam fees tests added

---------

Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>

* fix: unnecessary event log removed

* fix: sendBTPMessage renamed to sendToConnection

* fix: unnecessary event log removed

* feat: add centralized connections in solidity and java (#196)

* feat: solidity xcall connection added

* feat: icon xcall connection added

* fix: checkfee added

* feat: relayer address in centralized connection

* feat: added build scripts

* feat: solidity tests for centralized connection added

* feat: centralized connection name changed for icon

* fix: review comments addressed for solidity part

* fix: variable admin used for relayer/admin

* fix: review comments addressed for javascore part

* fix: variables in build.gradle in centralized cnnection

* fix: java score constructor

* fix: removed void from constructor

* fix: type of receipts to boolean

* fix: solitity tests resolved

* fix: logic corrected for duplicate message

* fix: fee check added in connection

* fix: centralized connection test added in solidity

* fix: admin check removed from getReceipts

Co-authored-by: redlarva <[email protected]>

* fix: onlyAdmin function

* fix: architecture updated (#214)

* fix: architecture updated

* fix: use connectio sn

* style: formatting code

* added scripts for centralized connections

* feat: centralized-connection javascore tests added

* feat: clam fees tests added

---------

Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>

* fix: centralized-connection test fixed

* fix: proxy request structure with data hash added

* fix: getFee method

* fix: message encoding decoding fixed

* fix: logs removed

* feat: persistent messaging added in solidity

* fix: foundry upgradeable version

* fix: review changes on persistent messaging

---------

Signed-off-by: gcranju <[email protected]>
Co-authored-by: AntonAndell <[email protected]>
Co-authored-by: DeepakBomjan <[email protected]>
Co-authored-by: izyak <[email protected]>
Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>
* feat: xcall upgradeable (#179)

* feat: xcall upgradeable

* fix: foundry toml fix

* deploy mock script

* fix: remapping

* fix: env name changed

* fix: script reformed

* fix: upgradeable using openzeppelin

* fix: upgradeable using openzeppelin

* fix: deploy scripts fix

* fix: deploy scripts fix

* forge install: openzeppelin-foundry-upgrades

* fix: Make simple dapp to use same logic as dapp multi (#195)

* fix: adapters deployment scripts added

* fix: adapters included in script

---------

Co-authored-by: AntonAndell <[email protected]>

* fix: network address validation fixed (#212)

* fix: not authorized issue by making handleMessage public (#202)

* fix: not authorized issue by making handleMessage public

* feat: handleBTPMessage tests added

* fix: add fixes for handle Error

* fix: code order optmization in handle message

Signed-off-by: gcranju <[email protected]>

* fix:revert message added in handleRequest

* fix: versions openzeppelin fix

* fix: foundry upgrades deleted

---------

Signed-off-by: gcranju <[email protected]>

* ci: add job to update CHANGELOG.md (#207)

* fix: added rpsc in foundry.toml

* fix: fix env.example

* fix: new message type added in solidity

* feat: add centralized connections in solidity and java (#196)

* feat: solidity xcall connection added

* feat: icon xcall connection added

* fix: checkfee added

* feat: relayer address in centralized connection

* feat: added build scripts

* feat: solidity tests for centralized connection added

* feat: centralized connection name changed for icon

* fix: review comments addressed for solidity part

* fix: variable admin used for relayer/admin

* fix: review comments addressed for javascore part

* fix: variables in build.gradle in centralized cnnection

* fix: java score constructor

* fix: removed void from constructor

* fix: type of receipts to boolean

* fix: solitity tests resolved

* fix: logic corrected for duplicate message

* fix: fee check added in connection

* fix: centralized connection test added in solidity

* fix: admin check removed from getReceipts

Co-authored-by: redlarva <[email protected]>

* fix: onlyAdmin function

* fix: architecture updated (#214)

* fix: architecture updated

* fix: use connectio sn

* style: formatting code

* added scripts for centralized connections

* feat: centralized-connection javascore tests added

* feat: clam fees tests added

---------

Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>

* fix: unnecessary event log removed

* fix: sendBTPMessage renamed to sendToConnection

* fix: unnecessary event log removed

* feat: add centralized connections in solidity and java (#196)

* feat: solidity xcall connection added

* feat: icon xcall connection added

* fix: checkfee added

* feat: relayer address in centralized connection

* feat: added build scripts

* feat: solidity tests for centralized connection added

* feat: centralized connection name changed for icon

* fix: review comments addressed for solidity part

* fix: variable admin used for relayer/admin

* fix: review comments addressed for javascore part

* fix: variables in build.gradle in centralized cnnection

* fix: java score constructor

* fix: removed void from constructor

* fix: type of receipts to boolean

* fix: solitity tests resolved

* fix: logic corrected for duplicate message

* fix: fee check added in connection

* fix: centralized connection test added in solidity

* fix: admin check removed from getReceipts

Co-authored-by: redlarva <[email protected]>

* fix: onlyAdmin function

* fix: architecture updated (#214)

* fix: architecture updated

* fix: use connectio sn

* style: formatting code

* added scripts for centralized connections

* feat: centralized-connection javascore tests added

* feat: clam fees tests added

---------

Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>

* fix: centralized-connection test fixed

* fix: proxy request structure with data hash added

* fix: getFee method

* fix: message encoding decoding fixed

* fix: logs removed

* feat: response message solidity

* fix: review changes

* feat: tests added

* fix merge issues

---------

Signed-off-by: gcranju <[email protected]>
Co-authored-by: AntonAndell <[email protected]>
Co-authored-by: DeepakBomjan <[email protected]>
Co-authored-by: izyak <[email protected]>
Co-authored-by: red__larva <[email protected]>
Co-authored-by: redlarva <[email protected]>
* feat: mew-message-type added in cosmwasm

* fix: sendMessageAny method added
* feat: new Message type added in javascore

* feat: new Message type added in javascore dapp

* fix: unallowed method removed

* feat: sendMessageAny added in javascore

* fix: message type added in dapp

* feat: add response ability

* fix: set response value sent zero
* feat: new message type in solidity dapp

* feat: sendMessageAny added in solidity

* fix: else case added for invalid message type

* feat: add response ability

* fix: similarity in data
…ility-of-method-verifyprotocols

fix: optimized verifyProtocol
…ementation-of-getfee

fix: getFee- returned 0 in replyState
Makefile Outdated Show resolved Hide resolved
…tandard-unit-test-improvments

feat: improvements on xcall2.1 tests
@AntonAndell
Copy link
Collaborator

Should we lower the type numbers by 1 so that it works with old xCalls during migration period?

gcranju and others added 5 commits February 20, 2024 21:03
…xcall-solidity-1

fix: btp2 renamed to xcall
* feat: made changes for upgradeability for the evm contracts

* fix: removed concept of v2
* fix: patch message type

* chore: pass build

* fix: fix encoding test

* fix: test javascore

* fix: test javascore

* fix: fix evm test

* fix: fix evm test
@gcranju gcranju marked this pull request as ready for review March 15, 2024 08:55
Copy link
Collaborator Author

@ibrizsabin ibrizsabin left a comment

Choose a reason for hiding this comment

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

one comment

contracts/cosmwasm-vm/cw-integration/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@AntonAndell AntonAndell left a comment

Choose a reason for hiding this comment

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

Lgtm, ready to create a release candidate

@AntonAndell AntonAndell merged commit 617016e into main Mar 15, 2024
16 of 21 checks passed
@AntonAndell AntonAndell deleted the development/177-xcall-future-proof-messaging branch March 15, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xCall Future Proof Messaging
4 participants