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

MessageBus: immutable contracts #161

Closed
wants to merge 4 commits into from

Conversation

ChiTimesChi
Copy link
Collaborator

Description

This PR aims to provide an immutable MessageBus, which is supposed to serve as a backbone for the messaging infra on all the chains. All potential upgradeable logic is separated into separate contracts:

  • GasFeePricing is responsible for calculating the fees for sending any type of message.
  • AuthVerifier is responsible for verifying the submitted messages, which can be later upgraded to verifying messages using submitted proof.
  • MessageExecutor is responsible for executing messages of any types.

MessageBus is responsible for:

  • Sending messages:
    • Applying correct fee from GasFeePricing.
    • Emitting events, indicating that message was sent.
  • Receiving messages:
    • Checking that every message can be executed only once.
    • Checking that message sender is authenticated by AuthVerifier.
    • Passing message correctly to have it executed by MessageExecutor.

Checklist

  • New Contracts have been tested
  • Lint has been run
  • I have checked my code and corrected any misspellings

@coveralls
Copy link

coveralls commented May 26, 2022

Pull Request Test Coverage Report for Build 2391070410

  • 0 of 47 (0.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 26.314%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/messaging/ContextChainId.sol 0 2 0.0%
contracts/messaging/HarmonyMessageBus.sol 0 2 0.0%
contracts/messaging/MessageBus.sol 0 5 0.0%
contracts/messaging/MessageBusReceiver.sol 0 17 0.0%
contracts/messaging/MessageBusSender.sol 0 21 0.0%
Totals Coverage Status
Change from base Build 2386183733: -0.5%
Covered Lines: 664
Relevant Lines: 2334

💛 - Coveralls

@ChiTimesChi ChiTimesChi mentioned this pull request May 27, 2022
3 tasks
@ChiTimesChi
Copy link
Collaborator Author

Closed in favor of #162

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.

None yet

2 participants