dojo icon indicating copy to clipboard operation
dojo copied to clipboard

feat(messaging): prevent from resending messages to L1

Open ybensacq opened this issue 6 months ago • 1 comments

Description

  1. add gather_from_block to genesis file
  2. persist send_from_block & gather_from_block in database
  3. service use send_from_block & gather_from_block in messaging service

Related issue

Fixes #2033

Tests

  • [ ] Yes
  • [ ] No, because they aren't needed
  • [ ] No, because I need help

Added to documentation?

  • [ ] README.md
  • [ ] Dojo Book
  • [ ] No documentation needed

Checklist

  • [ ] I've formatted my code (scripts/prettier.sh, scripts/rust_fmt.sh, scripts/cairo_fmt.sh)
  • [ ] I've linted my code (scripts/clippy.sh, scripts/docs.sh)
  • [ ] I've commented my code
  • [ ] I've requested a review after addressing the comments

Summary by CodeRabbit

  • New Features

    • Introduced a new MessagingProvider trait to manage messaging operations across various providers.
    • Added gather_from_block field to Genesis and GenesisJson configurations, enabling specific block number tracking.
    • Enhanced DbProvider and ForkedProvider to manage messaging-related block numbers with new methods.
    • Updated CacheDb to include messaging information storage.
  • Bug Fixes

    • Improved error message formatting for better readability in ProviderError.
  • Documentation

    • Enhanced documentation strings for better clarity and readability in the Migrate command description.

ybensacq avatar Aug 28 '24 14:08 ybensacq