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(rooch-da): enhance adapter with submit stat tracking #3211

Merged
merged 7 commits into from
Jan 22, 2025

Conversation

popcnt1
Copy link
Collaborator

@popcnt1 popcnt1 commented Jan 20, 2025

Summary

  1. Add AdapterSubmitStat for tracking chunk/segment submission status.
    Integrated tracking logic into various DA backends and their adapters.
    Updated DAServerActor to report backend statuses with latest completed chunks

  2. feat(rooch-rpc-api): add avail_backends to DAInfoView

    Extend DAInfoView with an avail_backends field to include backend availability details. Updated From<DAServerStatus> impl to map the new field as part of the conversion

"da_info" return by rooch rpc request --method rooch_status will be:

"da_info": {
      "last_block_number": "1",
      "last_tx_order": "3",
      "last_block_update_time": "1737393638",
      "last_avail_block_number": "1",
      "last_avail_tx_order": "3",
      "last_avail_block_update_time": "1737393640",
      "avail_backends": [
        [
          "openda-fs",
          "1"
        ]
      ]
    },

avail_backends is added

Update `best_rollback` to use `print!` for consistent multiline log formatting. This ensures cleaner output and better readability of rollback details.
Add `AdapterSubmitStat` for tracking chunk/segment submission status.
Integrated tracking logic into various DA backends and their adapters.
Updated `DAServerActor` to report backend statuses with latest completed chunks.
Added comments to clarify its association with block numbers in the current ChunkV0 version.
Extend `DAInfoView` with an `avail_backends` field to include backend availability details. Updated `From<DAServerStatus>` impl to map the new field as part of the conversion.
Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 6:39am
test-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 6:39am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Jan 21, 2025 6:39am

Add a required `avail_backends` property to the `DAInfoView` schema. This property is an array of pairs (string and u128) and enforces a strict length of two items in each pair.
Clarified documentation for `avail_backends` to specify block number update behavior. Improved overall comment readability for better understanding.
@jolestar jolestar merged commit e2079bb into rooch-network:main Jan 22, 2025
10 checks passed
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