You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/12.faq.md
+6-23Lines changed: 6 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,44 +28,27 @@ DipDup is a Python framework for building indexing applications. It allows you t
28
28
29
29
### What hardware do I need to run DipDup?
30
30
31
-
DipDup can run on any amd64/arm64 machine that runs Python 3.12. Aim for good single-thread CPU performance and fast storage.
31
+
DipDup can run on any amd64/arm64 machine that runs Python. Aim for good single-threaded and disk I/O performance.
32
32
33
33
You need at least 512M of RAM, but actual requirements can grow significantly depending on the number and complexity of indexes, the size of internal queues and caches, and `CachedModel` usage.
34
34
35
35
## Indexing
36
36
37
-
### What's the difference between "level" and "block number"?
38
-
39
-
The term "level" is used in Tezos and some other blockchains as a synonym for "block height" or "block number". We use this term for historical reasons.
40
-
41
-
### What does "head" mean?
42
-
43
-
You may see the term "head" in logs, metrics and internal db tables. It refers to the latest known position in the blockchain, but with some nuances:
44
-
45
-
For **datasources** it means the last block available from the datalake/node/API indexer knows about. It may differ from the actual chain head for various reasons: network latency, node sync status, rate limits, etc.
46
-
47
-
For **indexes** it means the last block processed and stored in the database. It may lag behind the datasource head if indexing is still in progress or latest blocks have not triggered any handlers.
48
-
49
-
What to use for monitoring depend on your use case.
50
-
51
37
### How to index similar but not identical contracts as a single entity?
52
38
53
39
Multiple contracts can provide the same interface but have different storage structures. Examples are ERC20/ERC721/ERC1155 standard tokens on Ethereum and FA1.2/FA2 ones on Tezos. If you try to use the same typename for them, indexing will fail because of the storage mismatch. However, you can modify typeclasses manually. Edit the `types/<typename>/storage.py` file and comment out fields, leaving only the ones used in your index (common for all contracts with the same interface).
54
40
55
41
```python
56
42
classContractStorage(BaseModel):
57
-
model_config = ConfigDict(
58
-
extra='forbid',
59
-
)
43
+
classConfig:
44
+
extra = Extra.ignore
60
45
61
46
common_ledger: dict[str, str]
62
47
# unique_field_foo: str
63
48
# unique_field_bar: str
64
49
```
65
50
66
-
Don't forget the `model_config` field.
67
-
68
-
To restore the original typeclass, remove the modified file and run `dipdup init` again. You can also add the `--force` flag to overwrite all ABIs and typeclasses.
51
+
Don't forget the `Extra.ignore` Pydantic hint; otherwise, storage deserialization will fail. To restore the original typeclass, remove the modified file and run `dipdup init` again. You can also add the `--force` flag to overwrite all ABIs and typeclasses.
69
52
70
53
### How to use off-chain datasources?
71
54
@@ -194,11 +177,11 @@ It will update both the CLI tool and Python package.
194
177
195
178
**tl;dr**: Just use `uv` for everything.
196
179
197
-
For historical reasons, Python package management is a mess. There are multiple tools and approaches to manage Python dependencies. **pip** is a general-purpose package manager. It's simple and robust, but only covers basic functionality. For a full-fledged project, you need a tool to handle virtual environments, lock files, dependency resolution, publishing, etc. Some of the most popular tools are: uv, Poetry, PDM, pip-tools ([performance benchmark](https://lincolnloop.github.io/python-package-manager-shootout/)).
180
+
For historical reasons, Python package management is a mess. There are multiple tools and approaches to manage Python dependencies. **pip** is a general-purpose package manager. It's simple and robust, but only covers basic functionality. For a full-fledged project, you need to use a tool to handle virtual environments, lock files, dependency resolution, publishing, etc. Some of the most popular tools are: uv, Poetry, PDM, Hatch and others.
198
181
199
182
Starting with version 8.3, DipDup uses **uv** as the default package manager for both CLI installer and project management. This tool is extremely fast, reliable, and replaces the bulk of functionality provided by other tools.
200
183
201
-
Poetry and PDM integration in DipDup is deprecated and will be removed in future releases. To perform migration after updating to >8.3 run the following commands:
184
+
Poetry and PDM integration in DipDup is deprecated and will be removed in future releases. To perform a migration, run the following commands:
0 commit comments