Skip to content

Commit

Permalink
Bump version 8.0.0 (#1087)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir Bobrikov <[email protected]>
Co-authored-by: Lev Gorodetskiy <[email protected]>
Co-authored-by: Wizard1209 <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent ba9e116 commit 4512019
Show file tree
Hide file tree
Showing 310 changed files with 2,275 additions and 3,073 deletions.
1,195 changes: 31 additions & 1,164 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ demos: ## Recreate demo projects from templates
python scripts/demos.py init ${DEMO}
make format lint

demos_refresh:
for demo in `ls src | grep demo | grep -v etherlink`; do cd src/$$demo && dipdup init -b -f && cd ../..; done
make format lint

before_release: ## Prepare for a new release after updating version in pyproject.toml
make format
make lint
make update
make demos
make test
make docs
make format lint update demos test docs

jsonschemas: ## Dump config JSON schemas
python scripts/docs.py dump-jsonschema
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
SHELL=/bin/bash
SHELL=/usr/bin/zsh
DEMO=demo_evm_events

run_in_memory:
time dipdup -c ../src/${DEMO} -c ./oneshot_${DEMO}.yaml run

run_in_postgres:
touch ../src/${DEMO}/deploy/test.env && \
echo "HASURA_SECRET=test" > ../src/${DEMO}/deploy/test.env && \
echo "POSTGRES_PASSWORD=test" >> ../src/${DEMO}/deploy/test.env && \
cd ../src/${DEMO}/deploy && docker-compose --env-file test.env up -d db
touch ../src/${DEMO}/deploy/.env && \
echo "HASURA_SECRET=test" > ../src/${DEMO}/deploy/.env && \
echo "POSTGRES_PASSWORD=test" >> ../src/${DEMO}/deploy/.env && \
cd ../src/${DEMO}/deploy && docker-compose --env-file .env up -d db

export POSTGRES_PORT=`docker port ${DEMO}-db-1 5432 | cut -d: -f2` && \
time dipdup -c ../src/${DEMO} -c ./oneshot_${DEMO}.yaml -c ./local_postgres.yaml run

down:
cd ../src/${DEMO}/deploy && docker-compose down && rm test.env
cd ../src/${DEMO}/deploy && docker-compose down && rm .env
docker volume rm -f ${DEMO}_db

cpu_up:
Expand Down
36 changes: 18 additions & 18 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@ See the Makefile for details.
- interval: 10,000,000 to 10,100,000 (100,000 levels, 93,745 non-empty)
- database: in-memory sqlite

| run | time | bps | vs. asyncio | vs. 7.5 |
| ---------------- | ---------------------------------------------------- | --- | ----------- | ------- |
| 7.5.9, asyncio | 1044,56s user 258,07s system 102% cpu 21:06,02 total | 79 | | |
| 7.5.10, uvloop | 924,94s user 182,33s system 102% cpu 18:04,67 total | 92 | 1.15 | |
| 8.0.0b4, asyncio | 832,32s user 163,20s system 101% cpu 16:19,93 total | 102 | | 1.29 |
| 8.0.0b5, uvloop | 730,58s user 88,67s system 98% cpu 13:48,46 total | 121 | 1.18 | 1.31 |
| run | time | bps | vs. asyncio | vs. 7.5 |
| ---------------- | ---------------------------------------------------- | --------- | ----------- | ------- |
| 7.5.9, asyncio | 1044,56s user 258,07s system 102% cpu 21:06,02 total | 79 | | |
| 7.5.10, uvloop | 924,94s user 182,33s system 102% cpu 18:04,67 total | 92 | 1.15 | |
| 8.0.0b4, asyncio | 832,32s user 163,20s system 101% cpu 16:19,93 total | 102 | | 1.29 |
| 8.0.0, uvloop | 721,13s user 84,17s system 98% cpu 13:33,88 total | 123 (116) | 1.18 | 1.31 |

#### Without CPU boost

The same tests run without frequency boost, which increases frequency from 2.9 GHz base up to 4.2 GHz. Gives some understanding of the impact of CPU performance.

Run `echo 0 | sudo tee /sys/devices/system/cpu/cpufreq/boost`.

| run | time | bps | vs. boost |
| ------------------------- | ---------------------------------------------------- | --- | --------- |
| 7.5.10, uvloop, no boost | 1329,36s user 231,93s system 101% cpu 25:31,69 total | 65 | 0.82 |
| 8.0.0b5, uvloop, no boost | 1048,85s user 115,34s system 99% cpu 19:35,61 total | 85 | 0.70 |
| run | time | bps | vs. boost |
| ------------------------ | ---------------------------------------------------- | --- | --------- |
| 7.5.10, uvloop, no boost | 1329,36s user 231,93s system 101% cpu 25:31,69 total | 65 | 0.82 |
| 8.0.0, uvloop, no boost | 1048,85s user 115,34s system 99% cpu 19:35,61 total | 85 | 0.70 |

In the subsequent runs, we will skip the 7.5 branch; speedup vs 8.0 is pretty stable.

#### With PostgreSQL

| run | time | bps | vs. in-memory |
| --------------- | --------------------------------------------- | --- | ------------- |
| 8.0.0b5, uvloop | real 36m30,878s user 17m23,406s sys 3m38,196s | 46 | 0.38 |
| run | time | bps | vs. in-memory |
| ------------- | --------------------------------------------------- | ------- | ------------- |
| 8.0.0, uvloop | 1083,66s user 214,23s system 57% cpu 37:33,04 total | 46 (42) | 0.36 |

### starknet.events

Expand All @@ -79,13 +79,13 @@ In the subsequent runs, we will skip the 7.5 branch; speedup vs 8.0 is pretty st
| run | time | bps | speedup |
| ---------------- | ------------------------------------------------- | --- | ------- |
| 8.0.0b4, asyncio | 246,94s user 61,67s system 100% cpu 5:07,54 total | 326 | 1 |
| 8.0.0b5, uvloop | 213,01s user 33,22s system 96% cpu 4:14,32 total | 394 | 1.20 |
| 8.0.0, uvloop | 213,01s user 33,22s system 96% cpu 4:14,32 total | 394 | 1.20 |

#### With PostgreSQL

| run | time | bps | vs. in-memory |
| --------------- | ------------------------------------------- | --- | ------------- |
| 8.0.0b5, uvloop | real 12m6,394s user 5m24,683s sys 1m14,761s | 138 | 0.35 |
| run | time | bps | vs. in-memory |
| ------------- | ------------------------------------------- | --- | ------------- |
| 8.0.0, uvloop | real 12m6,394s user 5m24,683s sys 1m14,761s | 138 | 0.35 |

### tezos.big_maps

Expand All @@ -98,4 +98,4 @@ Only our code. And only 7% of blocks are non-empty.
| run | time | bps | speedup |
| ---------------- | ------------------------------------------------ | ---------- | ------- |
| 8.0.0b4, asyncio | 136,63s user 17,91s system 98% cpu 2:37,40 total | 3185 (221) | 1 |
| 8.0.0b5, uvloop | 124,44s user 9,75s system 98% cpu 2:16,80 total | 3650 (254) | 1.15 |
| 8.0.0, uvloop | 124,44s user 9,75s system 98% cpu 2:16,80 total | 3650 (254) | 1.15 |
10 changes: 5 additions & 5 deletions docs/0.quickstart-evm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Let's create an indexer for the [USDt token contract](https://etherscan.io/addre

A modern Linux/macOS distribution with Python 3.12 installed is required to run DipDup.

The easiest way to install DipDup as a CLI application [pipx](https://pipx.pypa.io/stable/). We have a convenient wrapper script that installs DipDup for the current user. Run the following command in your terminal:
The recommended way to install DipDup CLI is [pipx](https://pipx.pypa.io/stable/). We also provide a convenient helper script that installs all necessary tools. Run the following command in your terminal:

{{ #include _curl-spell.md }}

See the [Installation](https://dipdup.io/docs/installation) page for all options.
See the [Installation](../docs/1.getting-started/1.installation.md) page for all options.

## Create a project

Expand All @@ -32,14 +32,14 @@ dipdup new
Choose `EVM` network and `demo_evm_events` template.

::banner{type="note"}
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](1.getting-started/3.config.md) section.
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](../docs/1.getting-started/3.config.md) section.
::

Follow the instructions; the project will be created in the new directory.

## Write a configuration file

In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](1.getting-started/3.config.md) section; now it has the following content:
In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](../docs/1.getting-started/3.config.md) section; now it has the following content:

```yaml [dipdup.yaml]
{{ #include ../src/demo_evm_events/dipdup.yaml }}
Expand Down Expand Up @@ -157,6 +157,6 @@ If you use SQLite, run this query to check the data:
sqlite3 demo_evm_events.sqlite 'SELECT * FROM holder LIMIT 10'
```

If you run a Compose stack, check open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.
If you run a Compose stack, open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.

Congratulations! You've just created your first DipDup indexer. Proceed to the Getting Started section to learn more about DipDup configuration and features.
10 changes: 5 additions & 5 deletions docs/0.quickstart-starknet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Let's create an indexer for the [USDt token contract](https://starkscan.co/contr

A modern Linux/macOS distribution with Python 3.12 installed is required to run DipDup.

The easiest way to install DipDup as a CLI application [pipx](https://pipx.pypa.io/stable/). We have a convenient wrapper script that installs DipDup for the current user. Run the following command in your terminal:
The recommended way to install DipDup CLI is [pipx](https://pipx.pypa.io/stable/). We also provide a convenient helper script that installs all necessary tools. Run the following command in your terminal:

{{ #include _curl-spell.md }}

See the [Installation](https://dipdup.io/docs/installation) page for all options.
See the [Installation](../docs/1.getting-started/1.installation.md) page for all options.

## Create a project

Expand All @@ -32,14 +32,14 @@ dipdup new
Choose `Starknet` network and `demo_starknet_events` template.

::banner{type="note"}
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](1.getting-started/3.config.md) section.
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](../docs/1.getting-started/3.config.md) section.
::

Follow the instructions; the project will be created in the new directory.

## Write a configuration file

In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](1.getting-started/3.config.md) section; now it has the following content:
In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](../docs/1.getting-started/3.config.md) section; now it has the following content:

```yaml [dipdup.yaml]
{{ #include ../src/demo_starknet_events/dipdup.yaml }}
Expand Down Expand Up @@ -157,6 +157,6 @@ If you use SQLite, run this query to check the data:
sqlite3 demo_starknet_events.sqlite 'SELECT * FROM holder LIMIT 10'
```

If you run a Compose stack, check open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.
If you run a Compose stack, open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.

Congratulations! You've just created your first DipDup indexer. Proceed to the Getting Started section to learn more about DipDup configuration and features.
10 changes: 5 additions & 5 deletions docs/0.quickstart-tezos.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Let's create an indexer for the [tzBTC FA1.2 token contract](https://tzkt.io/KT1

A modern Linux/macOS distribution with Python 3.12 installed is required to run DipDup.

The easiest way to install DipDup as a CLI application [pipx](https://pipx.pypa.io/stable/). We have a convenient wrapper script that installs DipDup for the current user. Run the following command in your terminal:
The recommended way to install DipDup CLI is [pipx](https://pipx.pypa.io/stable/). We also provide a convenient helper script that installs all necessary tools. Run the following command in your terminal:

{{ #include _curl-spell.md }}

See the [Installation](https://dipdup.io/docs/installation) page for all options.
See the [Installation](../docs/1.getting-started/1.installation.md) page for all options.

## Create a project

Expand All @@ -32,14 +32,14 @@ dipdup new
Choose `Tezos` network and `demo_tezos_token` template.

::banner{type="note"}
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](1.getting-started/3.config.md) section.
Want to skip a tutorial and start from scratch? Choose `[none]` and `demo_blank` instead and proceed to the [Config](./1.getting-started/3.config.md) section.
::

Follow the instructions; the project will be created in the new directory.

## Write a configuration file

In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](1.getting-started/3.config.md) section; now it has the following content:
In the project root, you'll find a file named `dipdup.yaml`. It's the main configuration file of your indexer. We will discuss it in detail in the [Config](../docs/1.getting-started/3.config.md) section; now it has the following content:

```yaml [dipdup.yaml]
{{ #include ../src/demo_tezos_token/dipdup.yaml }}
Expand Down Expand Up @@ -170,6 +170,6 @@ If you use SQLite, run this query to check the data:
sqlite3 demo_tezos_token.sqlite 'SELECT * FROM holder LIMIT 10'
```

If you run a Compose stack, check open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.
If you run a Compose stack, open `http://127.0.0.1:8080` in your browser to see the Hasura console (an exposed port may differ). You can use it to explore the database and build GraphQL queries.

Congratulations! You've just created your first DipDup indexer. Proceed to the Getting Started section to learn more about DipDup configuration and features.
2 changes: 1 addition & 1 deletion docs/1.getting-started/1.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ pip install -r requirements.txt -e .

## Docker

For Docker installation, please refer to the [Docker](../6.deployment/2.docker.md) page.
For Docker installation, please refer to the [Docker](../5.advanced/1.docker.md) page.
Loading

0 comments on commit 4512019

Please sign in to comment.