IntersectMBO / IntersectMBO/govtool
💡 Evaluate and Integrate Ogmios as a Complementary Backend to DBSync in GovTool
- Dominant language
- HTML
- Stars
- 21
- Forks
- 29
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Description
### Area
Proposal Pillar
### Is there new design needed?
Yes
### What?
Explore and implement **Ogmios** as a **complementary data source** to **DBSync** within the GovTool architecture.
Ogmios offers a lightweight, real-time interface to interact with a Cardano node using **WebSocket** and **JSON-based protocols**, and could complement or enhance GovTool's performance and reliability in critical areas.
Ogmios documentation: [https://ogmios.dev/mini-protocols/](https://ogmios.dev/mini-protocols/)
### Why?
- **DBSync**, while powerful, is often **heavy**, **delayed**, and sometimes lacks **real-time responsiveness**.
- **Ogmios** provides **low-latency, direct access** to node data and supports essential protocols like:
- **Chain Synchronization** – for real-time blockchain tracking
- **Transaction Submission** – for submitting governance transactions
- **Ledger State Queries** – for live state queries (e.g., delegation status, registered DReps, stake distribution)
- Combining Ogmios with DBSync can enable GovTool to:
- Improve **accuracy and speed** of governance-related data
- Provide **fallback redundancy** in case DBSync is slow or fails
- Lay the groundwork for more **wallet-native** and **real-time workflows** in governance flows
### How?
1. **Evaluate Ogmios Capabilities**:
- Identify key GovTool features that could benefit from Ogmios integration (e.g., fetching live stake data, checking DRep registration status, transaction submission).
- Determine what data can be **sourced or confirmed via Ogmios** versus what still relies on DBSync.
2. **Integrate Ogmios Client**:
- Use [Ogmios client libraries](https://github.com/CardanoSolutions/ogmios-client) to set up WebSocket connections.
- Implement a **middleware layer** that can selectively route queries to Ogmios or DBSync depending on context.
3. **Fallback/Redundancy Logic**:
- For any critical real-time governance action (e.g., vote casting, DRep state checks), prefer Ogmios with fallback to DBSync.
- Monitor discrepancies between Ogmios and DBSync for auditing and failover.
4. **Performance and Load Testing**:
- Assess real-world responsiveness and reliability of Ogmios integration under realistic usage loads.
### (Optional) User Story with acceptance criteria
### As a developer maintaining GovTool:
> I want to use Ogmios to fetch real-time stake and governance data,
> so that the app is more responsive and less dependent on delayed DBSync data.
### As a DRep using GovTool:
> I want my delegation and voting status to reflect **immediately** after on-chain activity,
> so I have full confidence my governance actions were correctly registered.
### As a community member submitting proposals:
> I want my transaction to be validated and submitted quickly using a direct node connection,
> so I don’t rely on the lag of external syncs.
## Acceptance Criteria
- [ ] Ogmios is set up and accessible in the target environments (dev/preview/preprod/staging).
- [ ] GovTool integrates Ogmios to retrieve real-time data (e.g., delegation status, slot info, etc.).
- [ ] Fallback logic is in place when Ogmios is unreachable or fails.
- [ ] Initial integration scoped to **read-only endpoints**, with **transaction submission** evaluated in later stages.
- [ ] Performance and integrity of Ogmios-based queries are benchmarked against DBSync equivalents.
- [ ] Technical documentation is updated to reflect this new data source.
Contributor guide
Assessment
This issue has not been assessed yet.