Skip to content

Commit 286a39c

Browse files
authored
add warnings (#467)
* add warnings * add more warnings
1 parent 636f145 commit 286a39c

File tree

5 files changed

+41
-15
lines changed

5 files changed

+41
-15
lines changed

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
# Aptos Indexer Client Guide
2+
23
This guide will get you started with creating an Aptos indexer with custom parsing. We have several endpoints that provided a streaming RPC of transaction data.
34

45
## GRPC Data Stream Endpoints
5-
* devnet: https://grpc.devnet.aptoslabs.com:443
66

7-
* testnet: https://grpc.testnet.aptoslabs.com:443
7+
- devnet: https://grpc.devnet.aptoslabs.com:443
8+
9+
- testnet: https://grpc.testnet.aptoslabs.com:443
810

9-
* mainnet: https://grpc.mainnet.aptoslabs.com:443
11+
- mainnet: https://grpc.mainnet.aptoslabs.com:443
1012

1113
## Request
12-
- `config.yaml`
13-
- `chain_id`: ID of the chain used for validation purposes.
14-
- `grpc_data_stream_endpoint`: Replace with the grpc data stream endpoints for mainnet, devnet, testnet, or previewnet.
15-
- `grpc_data_stream_api_key`: Replace `YOUR_TOKEN` with your auth token.
16-
- `db_connection_uri`: The DB connection used to write the processed data
17-
- (optional) `starting-version`
18-
- If `starting-version` is set, the processor will begin indexing from transaction version = `starting_version`.
19-
- To auto restart the client in case of an error, you can cache the latest processed transaction version. In the example, the processor restarts from cached transaction version that is stored in a table, and if neither `starting_version` nor cached version are set, the processor defaults starting version to 0.
14+
15+
- `config.yaml`
16+
- `chain_id`: ID of the chain used for validation purposes.
17+
- `grpc_data_stream_endpoint`: Replace with the grpc data stream endpoints for mainnet, devnet, testnet, or previewnet.
18+
- `grpc_data_stream_api_key`: Replace `YOUR_TOKEN` with your auth token.
19+
- `db_connection_uri`: The DB connection used to write the processed data
20+
- (optional) `starting-version`
21+
- If `starting-version` is set, the processor will begin indexing from transaction version = `starting_version`.
22+
- To auto restart the client in case of an error, you can cache the latest processed transaction version. In the example, the processor restarts from cached transaction version that is stored in a table, and if neither `starting_version` nor cached version are set, the processor defaults starting version to 0.
2023

2124
## Response
25+
2226
- The response is a stream of `RawDatastreamResponse` objects.
2327
- To learn more about the protos and the code generated from those protos see [protos/](https://github.com/aptos-labs/aptos-core/tree/main/protos) in aptos-core.
2428

2529
## [Aptos Indexer GRPC Release Notes](https://github.com/aptos-labs/aptos-core/blob/main/ecosystem/indexer-grpc/release_notes.md)
2630

27-
2831
> [!WARNING]
29-
> The typescript implementation is known to get stuck when there are lots of data to process. The issue is with the GRPC client and we haven't had a chance to optimize. Please proceed with caution.
32+
> For production-grade indexers, we recommend the Rust processors.
33+
> The Python implementation is known to have a grpc deserialization recursion limit. The issue is with the GRPC library and we haven't had a chance to look into this. Please proceed with caution.
34+
> The typescript implementation is known to get stuck when there are lots of data to process. The issue is with the GRPC client and we haven't had a chance to optimize. Please proceed with caution.

python/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Python Quickstart
22

3+
> [!WARNING]
4+
> For production-grade indexers, we recommend the Rust processors.
5+
> The Python implementation is known to have a grpc deserialization recursion limit. The issue is with the GRPC library and we haven't had a chance to look into this. Please proceed with caution.
6+
37
### Prerequisite
48

59
- Python 3.7 or higher
@@ -24,7 +28,6 @@ $ cd aptos-indexer-processors/python
2428
poetry install
2529
```
2630

27-
2831
3. Prepare the `config.yaml` file.
2932
Make sure to update the `config.yaml` file with the correct indexer settings and database credentials.
3033

typescript/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Custom Processors: Typescript
22

33
> [!WARNING]
4+
> For production-grade indexers, we recommend the Rust processors.
45
> The typescript implementation is known to get stuck when there are lots of data to process. The issue is with the GRPC client and we haven't had a chance to optimize. Please proceed with caution.
56
6-
77
## Directory Guide
8+
89
- `examples`: Contains example processors that you can use as a starting point for your own custom processor.
910
- `sdk`: Contains the custom processor SDK. This package provides a variety of helpful code for writing your own custom processor, such as for connecting to the Transaction Stream Service, creating tables in the database, and keeping track of the last processed transaction.

typescript/examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Custom Processor Templates
22

3+
> [!WARNING]
4+
> For production-grade indexers, we recommend the Rust processors.
5+
> The typescript implementation is known to get stuck when there are lots of data to process. The issue is with the GRPC client and we haven't had a chance to optimize. Please proceed with caution.
6+
37
This directory contains templates you can copy to get started with writing a custom processor in TS.

typescript/examples/event_processor/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,49 @@
11
# Event Parser
2+
3+
> [!WARNING]
4+
> For production-grade indexers, we recommend the Rust processors.
5+
> The typescript implementation is known to get stuck when there are lots of data to process. The issue is with the GRPC client and we haven't had a chance to optimize. Please proceed with caution.
6+
27
This is a very simple example that just extracts events from user transactions and logs them.
38

49
## Prerequisites
10+
511
- `pnpm`: The code is tested with pnpm 8.6.2. Later versions should work too.
612
- `node`: The code is tested with Node 18. Later versions should work too.
713

814
## Usage
15+
916
Install all the dependencies:
17+
1018
```
1119
pnpm install
1220
```
1321

1422
Prepare the `config.yaml` file. Make sure to update the `config.yaml` file with the correct indexer setting and database credentials.
23+
1524
```
1625
$ cp config.yaml.example ~/config.yaml
1726
```
1827

1928
Run the example:
29+
2030
```
2131
pnpm start process --config ~/config.yaml
2232
```
2333

2434
## Explanation
35+
2536
This example provides a basic processor that extracts events from user transactions and logs them.
2637

2738
When creating a custom processor, the two main things you need to define are:
39+
2840
- Parser: How you parse the data from the transactions.
2941
- Models: How you store the data you extract from the transactions.
3042

3143
These are defined in `parser.ts` and `models.ts` respectively.
3244

3345
The SDK handles the rest:
46+
3447
- Connecting to the Transaction Stream Service.
3548
- Creating tables in the database.
3649
- Validating the chain ID.

0 commit comments

Comments
 (0)