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

Remove ordered channels #1258

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Remove ordered channels #1258

wants to merge 4 commits into from

Conversation

vgeddes
Copy link
Collaborator

@vgeddes vgeddes commented Jul 9, 2024

Makes the gateway support unordered messaging

  • Add Gateway.submitV2 for unordered inbound message delivery
  • Modify Gateway._submitOutbound for unordered outbound message acceptance
  • Add Paymaster contract which now handles message delivery incentivization.

@vgeddes vgeddes requested review from musnit and yrong July 9, 2024 18:42
Ticket,
Costs
} from "./Types.sol";
import {Channel, ChannelID, InboundMessage, OperatingMode, ParaID, Command, MultiAddress, Ticket, Costs} from "./Types.sol";
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems the format change here is unnecessary?

@yrong
Copy link
Contributor

yrong commented Jul 10, 2024

Seems this PR is mixed with a lot of format change and a bit challenge to review.
@vgeddes, could you check the forge version consistent with the nix embedded and make sure the format change here is nessessary?

➜ contracts git:(remove-channels) ✗ forge --version
forge 0.2.0 (cafc260 2024-05-02T00:22:11.188280000Z)

@yrong
Copy link
Contributor

yrong commented Jul 10, 2024

Seems we need still changes on relayer/substrate side to coordinate with the changes here. Let me know if I can help.

Comment on lines +166 to +167
bytes32[] calldata leafProof,
Verification.Proof calldata headerProof
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be more clear to rename leafProof to messageProof and headerProof to mmrProof?

@vgeddes
Copy link
Collaborator Author

vgeddes commented Jul 10, 2024

Seems this PR is mixed with a lot of format change and a bit challenge to review.

Oops, I am using a new editor and I and need to configure it properly. Will revert 👍

@@ -12,6 +13,10 @@ library CoreStorage {
mapping(ChannelID channelID => Channel) channels;
// Agents
mapping(bytes32 agentID => address) agents;
// V2
mapping(bytes32 messageHash => bool) messageHashes;
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines 368 to 373
function tokenTransfer(bytes calldata data) external onlySelf {
CoreStorage.Layout storage $ = CoreStorage.layout();

(address token, address recipient, uint128 amount) = abi.dec

}
Copy link
Contributor

Choose a reason for hiding this comment

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

Coding here unfinished and this won't compile.

Seems gonna to move the AgentExecuteCommand to top level? If so we may still need Agent.invoke with executor to delegate call the transfer.

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.

2 participants