Skip to content

Commit

Permalink
Merge branch 'next' into feat/prometheus-subsquid-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Bobrikov committed Nov 9, 2023
2 parents f312f0a + 8539c28 commit 7f31bbd
Show file tree
Hide file tree
Showing 36 changed files with 132 additions and 116 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- evm.subsquid.events: Added metrics for subsquid cloud deploy

## [7.1.1] - 2023-11-07

### Fixed

- cli: Fixed crash on early Python 3.11 releases.
- project: Update default Docker tag for TimescaleDB HA.

## [7.1.0] - 2023-10-27

### Added
Expand Down Expand Up @@ -1230,7 +1237,8 @@ This release contains no changes except for the version number.
[semantic versioning]: https://semver.org/spec/v2.0.0.html

<!-- Versions -->
[Unreleased]: https://github.com/dipdup-io/dipdup/compare/7.1.0...HEAD
[Unreleased]: https://github.com/dipdup-io/dipdup/compare/7.1.1...HEAD
[7.1.1]: https://github.com/dipdup-io/dipdup/compare/7.1.0...7.1.1
[7.1.0]: https://github.com/dipdup-io/dipdup/compare/7.0.2...7.1.0
[7.0.2]: https://github.com/dipdup-io/dipdup/compare/7.0.1...7.0.2
[7.0.1]: https://github.com/dipdup-io/dipdup/compare/7.0.0...7.0.1
Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/3.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Config consists of multiple top-level mappings. In the table below they are grou
| **Integrations** | [hasura](../9.config/6.hasura.md) | Hasura GraphQL Engine configuration |
| | [sentry](../9.config/13.sentry.md) | Sentry configuration |
| | [prometheus](../9.config/12.prometheus.md) | Prometheus configuration |
| **Miscellanous** | [advanced](../9.config/1.advanced.md) | Tunables that affect framework behavior |
| **Miscellaneous**| [advanced](../9.config/1.advanced.md) | Tunables that affect framework behavior |
| | [custom](../9.config/3.custom.md) | Mapping of user-defined values; neither typed nor validated |
| | [logging](../9.config/10.logging.md) | Configure logging verbosity |

Expand Down
2 changes: 2 additions & 0 deletions docs/15.thanks.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ We are grateful to all the people who help us with the project.
- [gdsoumya](https://github.com/gdsoumya)
- [Göran Sandström](https://github.com/veqtor)
- [herohthd](https://github.com/herohthd)
- [Javier Graciá Carpio](https://github.com/jagracar)
- [Karan Dua](https://github.com/Karantezsure)
- [Nick Kalomoiris](https://github.com/nikos-kalomoiris)
- [magicCity](https://github.com/tezosmiami)
- [pravind](https://github.com/pravind)
- [Roman Novikov](https://github.com/mystdeim)
- [Scott Simpson](https://github.com/scottincrypto)
- [shuoer86](https://github.com/shuoer86)
- [Simon Bihel](https://github.com/sbihel)
- [tomsib2001](https://github.com/tomsib2001)

Expand Down
6 changes: 3 additions & 3 deletions docs/6.deployment/4.prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The following metrics are exposed under `dipdup` namespace:
|-|-|
| `dipdup_indexes_total` | Number of indexes in operation by status |
| `dipdup_index_level_sync_duration_seconds` | Duration of indexing a single level |
| `dipdup_index_level_realtime_duration_seconds` | Duration of last index syncronization |
| `dipdup_index_total_sync_duration_seconds` | Duration of the last index syncronization |
| `dipdup_index_total_realtime_duration_seconds` | Duration of the last index realtime syncronization |
| `dipdup_index_level_realtime_duration_seconds` | Duration of last index synchronization |
| `dipdup_index_total_sync_duration_seconds` | Duration of the last index synchronization |
| `dipdup_index_total_realtime_duration_seconds` | Duration of the last index realtime synchronization |
| `dipdup_index_levels_to_sync_total` | Number of levels to reach synced state |
| `dipdup_index_levels_to_realtime_total` | Number of levels to reach realtime state |
| `dipdup_index_handlers_matched_total` | Index total hits |
Expand Down
2 changes: 1 addition & 1 deletion docs/7.references/4.config-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ datasources:
kind: tezos.tzkt
url: ${TZKT_URL:-https://api.tzkt.io}
http:
retry_count: # retry infinetely
retry_count: # retry infinitely
retry_sleep:
retry_multiplier:
ratelimit_rate:
Expand Down
2 changes: 1 addition & 1 deletion docs/9.release-notes/4.history.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ TzKT `buffer_size` option remains available, but it's not required to handle cha
Now when DipDup catches unhandled exceptions, a crash dump will be saved to the temporary directory.

```
dipdup.exceptions.CallbackError: An error occured during callback execution
dipdup.exceptions.CallbackError: An error occurred during callback execution
________________________________________________________________________________

`demo_token.hooks.on_restart` callback execution failed:
Expand Down
132 changes: 67 additions & 65 deletions pdm.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "dipdup"
description = "Modular framework for creating selective indexers and featureful backends for dapps"
version = "7.1.0"
version = "7.1.1"
license = { text = "MIT" }
authors = [
{ name = "Lev Gorodetskii", email = "[email protected]" },
Expand Down
12 changes: 6 additions & 6 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jinja2==3.1.2
jsonschema==4.17.3
jsonschema-spec==0.1.6
lazy-object-proxy==1.9.0
lru-dict==1.2.0
lru-dict==1.3.0
MarkupSafe==2.1.3
msgpack==1.0.5
multidict==6.0.4
Expand All @@ -68,7 +68,7 @@ platformdirs==3.10.0
pluggy==1.2.0
pprofile==2.1.0
prance==23.6.21.0
prometheus-client==0.17.1
prometheus-client==0.18.0
protobuf==4.24.1
pyarrow==12.0.1
pycryptodome==3.19.0
Expand All @@ -92,10 +92,10 @@ regex==2023.8.8
requests==2.31.0
rfc3339-validator==0.1.4
rlp==3.0.0
ruamel-yaml==0.18.2
ruamel-yaml==0.18.5
ruamel-yaml-clib==0.2.7
ruff==0.1.3
sentry-sdk==1.32.0
ruff==0.1.4
sentry-sdk==1.34.0
setuptools==68.2.2
six==1.16.0
sniffio==1.3.0
Expand All @@ -121,7 +121,7 @@ typing-extensions==4.7.1
tzlocal==5.0.1
urllib3==2.0.6
watchdog==3.0.0
web3==6.11.1
web3==6.11.2
websocket-client==1.6.1
websockets==10.4
yarl==1.9.2
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jinja2==3.1.2
jsonschema==4.17.3
jsonschema-spec==0.1.6
lazy-object-proxy==1.9.0
lru-dict==1.2.0
lru-dict==1.3.0
MarkupSafe==2.1.3
msgpack==1.0.5
multidict==6.0.4
Expand All @@ -57,7 +57,7 @@ pathable==0.4.3
pathspec==0.11.2
platformdirs==3.10.0
prance==23.6.21.0
prometheus-client==0.17.1
prometheus-client==0.18.0
protobuf==4.24.1
pyarrow==12.0.1
pycryptodome==3.19.0
Expand All @@ -75,9 +75,9 @@ regex==2023.8.8
requests==2.31.0
rfc3339-validator==0.1.4
rlp==3.0.0
ruamel-yaml==0.18.2
ruamel-yaml==0.18.5
ruamel-yaml-clib==0.2.7
sentry-sdk==1.32.0
sentry-sdk==1.34.0
setuptools==68.2.2
six==1.16.0
sniffio==1.3.0
Expand All @@ -90,6 +90,6 @@ tortoise-orm==0.19.3
typing-extensions==4.7.1
tzlocal==5.0.1
urllib3==2.0.6
web3==6.11.1
web3==6.11.2
websockets==10.4
yarl==1.9.2
2 changes: 1 addition & 1 deletion src/demo_auction/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_auction"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_big_maps/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_big_maps"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_blank/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_blank"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_dao/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_dao"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_dex/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_dex"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_domains/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_domains"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_events/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_events"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_evm_events/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_evm_events"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_factories/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_factories"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_head/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_head"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_nft_marketplace/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_nft_marketplace"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_raw/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_raw"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_token/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_token"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_token_balances/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_token_balances"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_token_transfers/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_token_transfers"
version = "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo_uniswap/configs/replay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ replay:
license: MIT
name: John Doe
email: [email protected]
postgres_image: timescale/timescaledb-ha:pg15-latest
postgres_image: timescale/timescaledb-ha:pg15
postgres_data_path: /home/postgres/pgdata/data
hasura_image: hasura/graphql-engine:latest
line_length: 120
2 changes: 1 addition & 1 deletion src/demo_uniswap/deploy/compose.swarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
tag: "\{\{.Name\}\}.\{\{.ImageID\}\}"

db:
image: timescale/timescaledb-ha:pg15-latest
image: timescale/timescaledb-ha:pg15
volumes:
- db:/home/postgres/pgdata/data
env_file: .env
Expand Down
2 changes: 1 addition & 1 deletion src/demo_uniswap/deploy/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- hasura

db:
image: timescale/timescaledb-ha:pg15-latest
image: timescale/timescaledb-ha:pg15
ports:
- 5432
volumes:
Expand Down
6 changes: 3 additions & 3 deletions src/demo_uniswap/models/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any
from typing import cast

from lru import LRU # type: ignore[import-not-found]
from lru import LRU

import demo_uniswap.models as models
from dipdup.config.evm import EvmContractConfig
Expand All @@ -14,7 +14,7 @@
class ModelsRepo:
def __init__(self) -> None:
self._eth_usd: Decimal | None = None
self._pending_positions: dict[str, Any] = LRU(4096)
self._pending_positions: LRU[str, Any] = LRU(4096)

async def get_eth_usd_rate(self) -> Decimal:
if self._eth_usd is None:
Expand All @@ -32,7 +32,7 @@ def save_pending_position(self, idx: str, position: dict[str, Any]) -> None:
self._pending_positions[idx] = position

def get_pending_position(self, idx: str) -> dict[str, Any] | None:
return self._pending_positions.get(idx, None) # type: ignore[no-any-return]
return self._pending_positions.get(idx, None)


async def get_ctx_factory(ctx: HandlerContext) -> models.Factory:
Expand Down
2 changes: 1 addition & 1 deletion src/demo_uniswap/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by DipDup 7.1.0+editable
# Generated by DipDup 7.1.1+editable
[project]
name = "demo_uniswap"
version = "0.0.1"
Expand Down
6 changes: 5 additions & 1 deletion src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ async def cli(ctx: click.Context, config: list[str], env_file: list[str]) -> Non
return

# NOTE: https://github.com/python/cpython/issues/95778
sys.set_int_max_str_digits(0)
# NOTE: Method is not available in early Python 3.11
try:
sys.set_int_max_str_digits(0)
except AttributeError:
_logger.warning("You're running an outdated Python 3.11 release; consider upgrading")

from dotenv import load_dotenv

Expand Down
4 changes: 2 additions & 2 deletions src/dipdup/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _help(self) -> str:

@dataclass(repr=False)
class CallbackError(Error):
"""An error occured during callback execution"""
"""An error occurred during callback execution"""

module: str
exc: Exception
Expand All @@ -261,7 +261,7 @@ def _help(self) -> str:

@dataclass(repr=False)
class CallbackTypeError(Error):
"""Agrument of invalid type was passed to a callback"""
"""Argument of invalid type was passed to a callback"""

kind: str
name: str
Expand Down
4 changes: 2 additions & 2 deletions src/dipdup/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from typing import cast

from async_lru import alru_cache
from lru import LRU # type: ignore[import-not-found]
from lru import LRU

from dipdup.exceptions import FrameworkException

Expand Down Expand Up @@ -115,7 +115,7 @@ def add_model(

try:
maxsize = cls.Meta.maxsize # type: ignore[attr-defined]
self._model[cls.__name__] = LRU(maxsize)
self._model[cls.__name__] = LRU(maxsize) # type: ignore[assignment]
except AttributeError:
self._model[cls.__name__] = {}

Expand Down
2 changes: 1 addition & 1 deletion src/dipdup/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def answers_from_terminal() -> Answers:
options=(
'postgres:15',
'timescale/timescaledb:latest-pg15',
'timescale/timescaledb-ha:pg15-latest',
'timescale/timescaledb-ha:pg15',
),
comments=(
'PostgreSQL',
Expand Down
Loading

0 comments on commit 7f31bbd

Please sign in to comment.