-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create Indexer for Sputnik DAO #157
Create Indexer for Sputnik DAO #157
Comments
Notes from our standup call: Ideally create one indexer for all DAOs, leverage sharding ... instead of deploying an indexer per DAO instance. |
Game Plan for Sputnik DAO IndexerIndexing StrategyWe will use a centralized indexer to handle all DAOs rather than deploying a separate instance for each DAO. The endpoints will support filtering and querying by DAO account. Since our Fly.io machines remain offline unless needed, we’ll implement a "just-in-time" indexing strategy. This means we’ll only index data when the frontend requests it for a specific DAO account. This approach will index all relevant data, but only when an updated table for a DAO account is requested. To fetch uncached DAO proposals, we’ll index each DAO subaccount separately using the Nearblocks API. This ensures we retrieve all transactions not already stored in our cache. Additionally, we could index the DAO factory to detect and dynamically start indexing new accounts created through the self-create flow. Data to Be IndexedMost of the proposal data is already indexed, including searching by description, which is functional. However, we need to index the following new data:
New API EndpointThe new endpoint will allow querying proposals with sorting and filtering options:
This endpoint will integrate seamlessly with the frontend, providing the necessary data for the Treasury Dashboard. |
Note that sorting by creation time and expiry time will be the same since the expiry time is defined by the creation time + policy duration time. |
UpdateI'm currently working on indexing At first I wanted to use the transaction arguments to indext the state. However these functions change the proposal's inside the contract with a ton of logic. So instead of recreating that we just get the proposal from contract on the transaction blockheight. I'm now (Friday Dec 20) working on deserializing the string U128. So we can use the RPC response to cache the proposal. @frol do you have any idea why it won't deserialize U128?
|
UpdateThe deserialisation error from above has been fixed. I've deployed the first version to fly.io here: https://testing-indexer.fly.dev/ Theses fields are indexed properly:
I'm currently working on indexing the following fields:
|
Description
We need to build an indexer similar to the one used for DevHub proposals, designed to index proposals from Sputnik DAOs. This will enable enhanced functionality for filtering and searching within the Treasury Dashboard.
Scope
Decide Indexing Strategy
Data to be Indexed
Required Endpoints
Sorting
Filtering
Searching
The text was updated successfully, but these errors were encountered: