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: change impl to process transaction receipts #99

Merged
merged 12 commits into from
Aug 28, 2023
Merged

Conversation

JDawg287
Copy link
Member

@JDawg287 JDawg287 commented Aug 4, 2023

Description

This PR changes how cross-subnet messages are sent from one subnet to another. Before this PR, we used transaction data and the transactionsRoot as the basis for the cross-subnet messaging protocol. It actually makes more sense to use the transaction receipt data and the receiptsRoot instead, as we can verify the status of the receipt on the target subnet to find out if the transaction was executed successfully on the source subnet, before executing it on the target subnet.

Fixes TP-654, TP-655

Additions and Changes

  • Added receiptRoot in the Certificate structure in IToposCore.sol
  • Changed the implementation of the sendToken function in the ERC20Messaging.sol contract
  • Changed the execute and the corresponding _execute functions in the ToposMessaging.sol and ERC20Messaging.sol contracts
  • Adapted the tests

Bug fixes

  • Removed an extra variable erc20MessagingContract in the ToposMessaging.test.ts

PR Checklist:

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@sebastiendan sebastiendan merged commit 95ce92f into main Aug 28, 2023
7 of 16 checks passed
@sebastiendan sebastiendan deleted the feature/TP-654 branch August 28, 2023 08:46
sebastiendan added a commit that referenced this pull request Aug 28, 2023
Signed-off-by: Jawad Tariq <[email protected]>
Co-authored-by: Sébastien Dan <[email protected]>
sebastiendan added a commit that referenced this pull request Aug 28, 2023
Signed-off-by: Jawad Tariq <[email protected]>
Co-authored-by: Sébastien Dan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants