aptos-core
aptos-core copied to clipboard
[Bug] Clarify Indexer install and setup
🐛 Bug
Users are reporting in Discord issues with our indexer fullnode install and setup instructions: https://aptos.dev/nodes/indexer-fullnode/
See the report (annotated screenshots and all) starting at: https://discord.com/channels/945856774056083548/1034215378299133974/1036872377012854794
Steps to reproduce
Follow the steps and run into issues since we recommend use of both apt
and brew
. Perhaps the solution is to standardize on the latter as it appears to work well on Linux and macOS.
** Error message or problem **
See the Discord thread for exact error messages.
Expected Behavior
Easy setup.
System information
Ubuntu
Additional context
Related, @geekflyer has the following PR out to enable Docker support: https://github.com/aptos-labs/aptos-core/pull/5389
@rajkaramchedu , let me know if I can help with this documentation. I know I helped with drafting the original install steps.
Starting this work in: https://github.com/aptos-labs/aptos-core/pull/5404
Seeking to also support Docker per @geekflyer in: https://github.com/aptos-labs/aptos-core/pull/5389
I am working through this and running into numerous issues, the smaller of which I will include as TODOs in the PR. Here is a larger one:
When I run, cargo run --bin aptos-node --features "indexer" -- --config fullnode.yaml
, I get:
error[E0277]: the trait bound `(diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::Jsonb, diesel::sql_types::Timestamp, diesel::sql_types::Text): load_dsl::private::CompatibleType<EventQuery, Pg>` is not satisfied
--> crates/indexer/src/models/transactions.rs:288:14
|
288 | .load::<EventQuery>(conn)?
| ^^^^ the trait `load_dsl::private::CompatibleType<EventQuery, Pg>` is not implemented for `(diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::Jsonb, diesel::sql_types::Timestamp, diesel::sql_types::Text)`
|
= help: the following other types implement trait `load_dsl::private::CompatibleType<U, DB>`:
(ST0, ST1)
(ST0, ST1, ST2)
(ST0, ST1, ST2, ST3)
(ST0, ST1, ST2, ST3, ST4)
(ST0, ST1, ST2, ST3, ST4, ST5)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)
and 24 others
= note: required because of the requirements on the impl of `LoadQuery<'_, _, EventQuery>` for `SelectStatement<FromClause<schema::events::table>, query_builder::select_clause::DefaultSelectClause<FromClause<schema::events::table>>, query_builder::distinct_clause::NoDistinctClause, query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::array_comparison::In<schema::events::columns::transaction_version, diesel::expression::array_comparison::Many<diesel::sql_types::BigInt, &i64>>>>>`
note: required by a bound in `diesel::RunQueryDsl::load`
--> /Users/claymurphy/.cargo/registry/src/github.com-1ecc6299db9ec823/diesel-2.0.0/src/query_dsl/mod.rs:1499:15
|
1499 | Self: LoadQuery<'query, Conn, U>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `diesel::RunQueryDsl::load`
error[E0277]: the trait bound `(diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::Jsonb, diesel::sql_types::Timestamp, diesel::sql_types::Text): load_dsl::private::CompatibleType<EventQuery, Pg>` is not satisfied
--> crates/indexer/src/models/transactions.rs:377:14
|
377 | .load::<EventQuery>(conn)?;
| ^^^^ the trait `load_dsl::private::CompatibleType<EventQuery, Pg>` is not implemented for `(diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::BigInt, diesel::sql_types::BigInt, diesel::sql_types::Text, diesel::sql_types::Jsonb, diesel::sql_types::Timestamp, diesel::sql_types::Text)`
|
= help: the following other types implement trait `load_dsl::private::CompatibleType<U, DB>`:
(ST0, ST1)
(ST0, ST1, ST2)
(ST0, ST1, ST2, ST3)
(ST0, ST1, ST2, ST3, ST4)
(ST0, ST1, ST2, ST3, ST4, ST5)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)
(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)
and 24 others
= note: required because of the requirements on the impl of `LoadQuery<'_, _, EventQuery>` for `SelectStatement<FromClause<schema::events::table>, query_builder::select_clause::DefaultSelectClause<FromClause<schema::events::table>>, query_builder::distinct_clause::NoDistinctClause, query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<schema::events::columns::transaction_version, diesel::expression::bound::Bound<diesel::sql_types::BigInt, &i64>>>>>`
note: required by a bound in `diesel::RunQueryDsl::load`
--> /Users/claymurphy/.cargo/registry/src/github.com-1ecc6299db9ec823/diesel-2.0.0/src/query_dsl/mod.rs:1499:15
|
1499 | Self: LoadQuery<'query, Conn, U>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `diesel::RunQueryDsl::load`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `aptos-indexer` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
➜ mainnet git:(fullnode-indexer) ✗
Per user input, "in:#📚・docs-feedback which version of postgres is preferred, 15? having exact versions or supported ones would be nice"
I'm noting we should consider employing tabs as in the tutorials for Mac and Linux commands
Also see tagging issues in: https://github.com/aptos-labs/aptos-core/pull/5389#issuecomment-1301918074
I am moving some TODOs from PR #5423 per @davidiw. In fullnode-source-code-or-docker.md
:
- Find out if this
mainnet
directory should reside in theaptos-core
checkout as when attempting to start the fullnode indexer with the directory distinct results in the error:
error: could not find `Cargo.toml` in `/Users/claymurphy/mainnet` or any parent directory
- Find out why we have them replace the contents of a file they just downloaded (
fullnode.yaml
) with the contents of this doc. Also build in the latest docker tag to the image.
And from indexer-fullnode.md
:
-
Test and provide a single
brew install
command for everything aftercargo
here. Also find out if we need Cargo if they go the Docker route. -
Determine if indexer startup should be done in the
aptos-core
checkout as indexer startup is looking for aCargo.toml
file:
error: could not find `Cargo.toml` in `/Users/claymurphy/mainnet` or any parent directory
I feel like a lot of these are simply path issues we can sort out with a walkthrough. We should provide some recommendations and use environment variables for simplicity, IMO.