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

bringing back indexer-processor #262

Closed
wants to merge 4 commits into from

Conversation

Primata
Copy link
Contributor

@Primata Primata commented Jul 26, 2024

Summary

  • RFCs: Link to RFC, Link to RFC, or $\emptyset$.
  • Categories: any of protocol-units, networks, scripts, util, cicd, or misc.

Readding modifications made by @l-monninger
#124

nix develop

just suzuka-full-node native build.setup.eth-local.celestia-local.test --keep-tui

Changelog

Testing

Outstanding issues

ln -sf Cargo.$1.toml Cargo.toml


ln -sf Cargo.$1.toml Cargo.toml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be deleted.


command : |
#/bin/bash
# todo: this fails with gRPC Unimplemented error on the RawData.GetTransactions call
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to test the indexer-processor prior to proceeding. But, I think that's going to be difficult.

@l-monninger l-monninger self-requested a review July 26, 2024 19:09
@@ -129,6 +129,11 @@ aptos-indexer = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "
aptos-indexer-grpc-fullnode = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "b2f58eaeda1d3929a7b381afca78408731b71d77" }
aptos-indexer-grpc-table-info = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "b2f58eaeda1d3929a7b381afca78408731b71d77" }
aptos-protos = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "b2f58eaeda1d3929a7b381afca78408731b71d77" }

# indexer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should update this to the latest rather than the commit on my branch.

@Primata
Copy link
Contributor Author

Primata commented Jul 29, 2024

Notes on how things currently stand:

  1. Despite changing the processor type, suzuka-indexer-processor runs default_processor every time. Have tried with a few different names. Is it possible that because indexer-processor is being pulled remotely, configuration is ignored?

Because Aptos informs us that aptos-indexer-processor SHOULD run a TSS and the Indexer API is essentially configed by what @l-monninger provided, I went down the rabbit hole of checking if the API is actually provided or not.
2. Tested a few different endpoints to check if suzuka-indexer-processor would be serving the graphql api, none worked:
http://localhost:30734/graphql
http://localhost:30731/graphql
localhost:30730/graphql
localhost:30734/graphql
localhost:30731/graphql
localhost:30730/graphql
http://0.0.0.0:30734/graphql
http://0.0.0.0:30731/graphql
http://0.0.0.0:30730/graphql
http://0.0.0.0:30734/graphql
http://0.0.0.0:30731/graphql
http://0.0.0.0:30730/graphql
http://localhost:30734
http://localhost:30731
localhost:30730
localhost:30734
localhost:30731
localhost:30730
http://0.0.0.0:30734
http://0.0.0.0:30731
http://0.0.0.0:30730
http://0.0.0.0:30734
http://0.0.0.0:30731
http://0.0.0.0:30730
https://cloud.hasura.io/public/graphiql?endpoint=https://api.devnet.aptoslabs.com/v1/graphql custom endpoints are also not returning anything

  1. curl http://localhost:30734 (and curl localhost:30734?auth_token=notrealnotneeded too) gives us curl: (1) Received HTTP/0.9 when not allowed -> curl: (56) Recv failure: Connection reset by peer.

  2. Going back to implementing the two next requirements: relational db and the API. Checking if the relational db is being served. I can see that we are not providing a Redis db. That should be the relational db, so I ended up here: https://github.com/aptos-labs/aptos-core/tree/f2a427f3f4c1b883c2a9588a1c39db515637de0d/ecosystem/indexer-grpc. Which matches, notes provided in notion. A bit unsure on how to proceed here, provided some notes.

  3. Started configing services pointed out in our Notion file.

@l-monninger
Copy link
Collaborator

@0xPrimata

Tested a few different endpoints to check if suzuka-indexer-processor would be serving the graphql api, none worked:

The endpoints you are testing serve the gRPC full node data stream. The role of the indexer processor is to take that data and put it in a postgres database. You can then use Hasura with the schemes from the upstream to serve that database behind a GraphQL endpoint.

On the otherhand, what's being served on :30734 is the gRPC full node data stream service. You can see how to consume it by consulting the tests: https://github.com/movementlabsxyz/movement/blob/primata/implement-indexer-processor/networks/suzuka/suzuka-client/src/tests/indexer_stream.rs

curl http://localhost:30734 (and curl localhost:30734?auth_token=notrealnotneeded too) gives us curl: (1) Received HTTP/0.9 when not allowed -> curl: (56) Recv failure: Connection reset by peer.

You cannot curl request a gRPC endpoint. For exploring, using grpcurl or grpcui (both included in the nix flake).

@l-monninger l-monninger closed this Aug 5, 2024
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