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

Bundle Inbox#checkpoint with message processing #346

Closed
nambrot opened this issue Apr 20, 2022 · 3 comments
Closed

Bundle Inbox#checkpoint with message processing #346

nambrot opened this issue Apr 20, 2022 · 3 comments

Comments

@nambrot
Copy link
Contributor

nambrot commented Apr 20, 2022

As per the recent decision to not subsidize system processing, applications will need to pay for inbox checkpointing on the destination chain. this ticket emcompasses the following work (feel free to change the names):

  • Add a function InboxValidatorManager#checkpointAndProcess which (after quorum check) basically just calls the existing InboxValidatorManager#checkpoint function and then Inbox.process to save the intrinsic gas cost
  • It support processing a batch of messages but not revert when the handling of a message fails

Additionally:

  • Add a onlyValidatorManager function to Inbox called directProcess which has the same signature as process except it also takes a root as an argument and then verifies the merkle proof against that (instead of a stored checkpoint)
  • Add a function InboxValidatorManager#directProcess which (after quorum check) calls directProcess on the batch of passed in messages

Actually, one should go one step further and not even store the checkpoint in storage at all, instead verify the signatures for a checkpoint and then process messages directly against it.

This ticket now exclusively reflects the scope to add these latency/gas saving combinations of checkpointing/message processing to the contracts and creates #472 for the agent specific changes

@asaj
Copy link
Contributor

asaj commented May 26, 2022

Noting that we've agreed to remove the caching of checkpoints on the Inbox entirely

@asaj
Copy link
Contributor

asaj commented May 26, 2022

Played around with some gas profiling in asaj/inbox-checkpoints

You can see the results here:
https://docs.google.com/spreadsheets/d/1mHiCQWd7Pu5o80dAXgQrtdlAV4VyMRqlJdOc5hQSX0s/edit#gid=2099625087

@tkporter
Copy link
Collaborator

tkporter commented Jun 8, 2022

Satisfied by #523

@tkporter tkporter closed this as completed Jun 8, 2022
Repository owner moved this from Sprint Backlog to Done in Hyperlane Tasks Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants