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

chore: move messages table to sequencer #46

Open
bonustrack opened this issue May 1, 2023 · 5 comments
Open

chore: move messages table to sequencer #46

bonustrack opened this issue May 1, 2023 · 5 comments
Assignees

Comments

@bonustrack
Copy link
Member

We should move the messages table from hub to sequencer. To not break any integration we should keep the ability to query messages from the GraphQL API on the hub by doing proxy request to the sequencer. On the hub the table messages should be removed after migration.

@ChaituVR
Copy link
Member

ChaituVR commented May 2, 2023

Weird, we actually store messages on the sequencer itself, not sure what you are referring to 🤔 Can share me the link to the code of what you are referring to?

@bonustrack
Copy link
Member Author

@ChaituVR On the sequencer db we have only the first 4m messages, we should move the remaining one from the hub db and only store the next ones to sequencer

@ChaituVR
Copy link
Member

ChaituVR commented May 2, 2023

Oh, there are two DBs. but the hub code doesn't suggest this 😄 we were using the same DB for both hub and seq no? then this is just data migration, no need to handle anything on the hub or seq

To not break any integration we should keep the ability to query messages from the GraphQL API on the hub by doing proxy requests to the sequencer.

I am confused with this, right now if we query here https://hub.snapshot.org/graphql with

{
 messages(first:1000, skip: 0, orderBy:"timestamp",orderDirection:asc){
   address
   id
   space
   ipfs
   mci
   type
   timestamp
 }
}

it returns only messages from 4M, noting before that, so if we migrate the data, it should work fine, right? what do you mean by proxy requests?

@bonustrack
Copy link
Member Author

bonustrack commented May 2, 2023

The hub should return messages, but the hub wont have any messages in the db after migration, this is why we will need to call the sequencer to get them.

@bonustrack
Copy link
Member Author

Anyhow, no worry cuz I'll work on this @ChaituVR

@bonustrack bonustrack self-assigned this May 2, 2023
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

No branches or pull requests

2 participants