-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(rooch-da): restructure backend architecture for OpenDA (#3140)
## Summary Refactored OpenDA backend by introducing an adapter-based architecture, consolidating repeated logic, and reorganizing code structure. Simplified configurations, removed deprecated files, and added backend prioritization for efficient batch submission.
- Loading branch information
Showing
14 changed files
with
756 additions
and
629 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,37 @@ | ||
# Backend | ||
|
||
Implementations of DA backend. | ||
## Overview | ||
|
||
``` | ||
+-------------------------+ | ||
| DAServerActor | | ||
| (Manages Backends) | | ||
+-------------------------+ | ||
| | ||
v | ||
+-------------------------+ | ||
| DABackend | <- Trait for all backends | ||
+-------------------------+ | ||
^ | ||
| | ||
v | ||
+---------------------------------------------------+ | ||
| OpenDABackendManager | <- Manages OpenDA-specific backends | ||
| - Common OpenDA logic (batches, configs, etc.) | | ||
| - Reduces redundancy among OpenDA backends | | ||
+---------------------------------------------------+ | ||
| | ||
v | ||
+-------------------------------------+ | ||
| OpenDAAdapter | <- Trait for OpenDA-specific backend operations | ||
| - submit_segment(), ... | | ||
| - Backend-specific operations | | ||
+-------------------------------------+ | ||
^ | ||
| | ||
v | ||
+-------------------+ +-------------------+ | ||
| CelestiaAdapter | | AvailAdapter | <- Actual backend-specific adapter implementations | ||
+-------------------+ +-------------------+ | ||
``` | ||
|
||
## Open-DA | ||
|
||
> - fs: local/remote file system | ||
>- avail: Avail project DA | ||
>- celestia: Celestia DA | ||
## New Backend | ||
|
||
For new added backend: | ||
|
||
If it could satisfy open-da config, it should be added to `open-da` folder as a module. If not, it should be added to | ||
`backend` folder directly. | ||
|
||
## Backend Implementations & Verification | ||
|
||
| Name | Description | Category | Implementation | Local | Testnet | Mainnet | | ||
|----------|--------------------------------------------|----------|------------------------------|-------|---------|---------| | ||
| fs | file I/O based on local/remote file system | open-da | [fs](open-da/fs) | ✅ | ✅ | ✅ | | ||
| avail | Avail project DA | open-da | [avail](open-da/avail) | 🔲 | 🔲 | 🔲 | | ||
| celestia | Celestia DA | open-da | [celestia](open-da/celestia) | 🔲 | 🔲 | 🔲 | | ||
| gcs | file I/O based on Google Cloud Storage | open-da | [gcs](open-da/fs) | ✅ | ✅ | ✅ | | ||
|
||
- [x] ✅ done | ||
- [ ] 🔲 unfinished | ||
- [ ] ❌ has issues |
Oops, something went wrong.