Skip to content

Commit e37d4ce

Browse files
Fix crash while processing storage consisting of a single big map id (#182)
* WIP * WIP * wip * Test * Changelog * Changelog * Cleanup * Tidier tests * Working tests with plain list storage * whoooah * Changelog
1 parent 1bc81b5 commit e37d4ce

File tree

18 files changed

+381
-185
lines changed

18 files changed

+381
-185
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Please use [this](https://docs.gitlab.com/ee/development/changelog.html) document as guidelines to keep a changelog.
44

5-
## 4.0.0-rc2 - [unreleased]
5+
## 4.0.0-rc2 - 2021-12-11
66

77
### ⚠ Migration
88

@@ -16,10 +16,11 @@ Please use [this](https://docs.gitlab.com/ee/development/changelog.html) documen
1616

1717
* cli: Fixed config not being verified when invoking some commands
1818
* index: Fixed incorrect log messages, remove duplicate ones.
19+
* index: Fixed crash while processing storage of some contracts.
1920

2021
### Performance
2122

22-
* index: Checks performed on each iteration of the main dipdup loop are slightly faster now.
23+
* index: Checks performed on each iteration of the main DipDup loop are slightly faster now.
2324

2425
## 4.0.0-rc1 - 2021-12-02
2526

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.ONESHELL:
2-
.PHONY: docs
2+
.PHONY: test
33
.DEFAULT_GOAL: all
44

55
DEV=1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
from dipdup.context import HookContext
32

3+
44
async def on_synchronized(
55
ctx: HookContext,
66
) -> None:
7-
await ctx.execute_sql('on_synchronized')
7+
await ctx.execute_sql('on_synchronized')

src/dipdup/config.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def valid_immune_tables(cls, v):
123123
@dataclass
124124
class HTTPConfig:
125125
"""Advanced configuration of HTTP client
126-
126+
127127
:param cache: Whether to cache responses
128128
:param retry_count: Number of retries before giving up
129129
:param retry_sleep: Sleep time between retries
@@ -132,8 +132,9 @@ class HTTPConfig:
132132
:param ratelimit_period: Time period for rate limiting
133133
:param connection_limit: Number of simultaneous connections
134134
:param connection_timeout: Connection timeout
135-
:param batch_size: Number of items fetched in a single request
135+
:param batch_size: Number of items fetched in a single request
136136
"""
137+
137138
cache: Optional[bool] = None
138139
retry_count: Optional[int] = None
139140
retry_sleep: Optional[float] = None
@@ -259,6 +260,7 @@ class CoinbaseDatasourceConfig(NameMixin):
259260
:param passphrase: API passphrase
260261
:param http: HTTP client configuration
261262
"""
263+
262264
kind: Literal['coinbase']
263265
api_key: Optional[str] = None
264266
secret_key: Optional[str] = None
@@ -476,6 +478,7 @@ class OperationHandlerOriginationPatternConfig(PatternConfig, StorageTypeMixin):
476478
:param source: Source contract alias to filter operations with
477479
:param similar_to: Alias of contract having the same code/signature (depending on `strict` field)
478480
"""
481+
479482
type: Literal['origination'] = 'origination'
480483
source: Optional[Union[str, ContractConfig]] = None
481484
similar_to: Optional[Union[str, ContractConfig]] = None

0 commit comments

Comments
 (0)