Skip to content

Commit 4f6ef6e

Browse files
committed
Revert F.A.Q.
1 parent 9feaf48 commit 4f6ef6e

1 file changed

Lines changed: 6 additions & 23 deletions

File tree

docs/12.faq.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,27 @@ DipDup is a Python framework for building indexing applications. It allows you t
2828

2929
### What hardware do I need to run DipDup?
3030

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.
3232

3333
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.
3434

3535
## Indexing
3636

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-
5137
### How to index similar but not identical contracts as a single entity?
5238

5339
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).
5440

5541
```python
5642
class ContractStorage(BaseModel):
57-
model_config = ConfigDict(
58-
extra='forbid',
59-
)
43+
class Config:
44+
extra = Extra.ignore
6045

6146
common_ledger: dict[str, str]
6247
# unique_field_foo: str
6348
# unique_field_bar: str
6449
```
6550

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.
6952

7053
### How to use off-chain datasources?
7154

@@ -194,11 +177,11 @@ It will update both the CLI tool and Python package.
194177

195178
**tl;dr**: Just use `uv` for everything.
196179

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.
198181

199182
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.
200183

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:
202185

203186
```shell [Terminal]
204187
rm *.lock

0 commit comments

Comments
 (0)