Skip to content

Commit

Permalink
proofreading
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Nov 24, 2023
1 parent daf9f19 commit 8b49b5c
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/12.faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ContractStorage(BaseModel):
# unique_field_bar: str
```

Don't forget `Extra.ignore` Pydantic hint, otherwise storage deserialization will fail. To restore the original typeclass, remove modified file and run `dipdup init` again. You can also add `--force` flag to overwrite all ABIs and typeclasses.
Don't forget `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 `--force` flag to overwrite all ABIs and typeclasses.

### How to use off-chain datasources?

Expand Down Expand Up @@ -119,7 +119,7 @@ class Token(Model):
...
```

Default decimal precision in Python is 28 digits. DipDup tries to increase it automatically guessing the value from the schema. It works in most cases, but not for really big numbers. You can increase the precision manually in config.
The default decimal precision in Python is 28 digits. DipDup tries to increase it automatically by guessing the value from the schema. It works in most cases, but not for really big numbers. You can increase the precision manually in config.

```yaml [dipdup.yaml]
advanced:
Expand Down
2 changes: 1 addition & 1 deletion docs/13.troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This page contains tips for troubleshooting DipDup issues. Start with "General"

### Update DipDup to the latest version

If you experience an issue, first of all, make sure that you're using the latest version of DipDup. If new release is available you'll see a warning message when running DipDup. You can update DipDup using the following commands depending on your installation method:
If you experience an issue, first of all, make sure that you're using the latest version of DipDup. If a new release is available you'll see a warning message when running DipDup. You can update DipDup using the following commands depending on your installation method:

```shell [Terminal]
# Built-in installer
Expand Down
10 changes: 5 additions & 5 deletions docs/14.contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ We use several tools to enforce codestyle and code quality: `black` for autoform
- Consistency is the key. If you see a pattern in the codebase, follow it.
- Use `NOTE`, `TODO`, and `FIXME` prefixes for meaningful comments. They help a lot to navigate the codebase.
- Lazy imports are important to keep startup time low for tiny commands. We also do it for project imports, so not a big deal.
- Some methods and attributes made private to avoid polluting the public API. Feel free to access them from the outside if you know what you are doing.
- Finally, about exact language features. f-string formatting is preferred over other syntax. Be careful with walrus operator. Don't forget else in conditional expressions. Listen to you mom. We have no consensus about the match-case yet.
- Some methods and attributes are made private to avoid polluting the public API. Feel free to access them from the outside if you know what you are doing.
- Finally, about exact language features. f-string formatting is preferred over other syntax. Be careful with the walrus operator. Don't forget else in conditional expressions. Listen to your mom. We have no consensus about the match-case yet.

### Packaging

- All dependencies MUST be declared in `pyproject.toml` file add pinned to non-breaking versions (e.g. `~1.2`).
- All dependencies MUST be declared in `pyproject.toml` file and pinned to non-breaking versions (e.g. `~1.2`).

### Changelog

Expand All @@ -49,7 +49,7 @@ We use several tools to enforce codestyle and code quality: `black` for autoform

### Documentation

- A page in "Release notes" section MUST accompany all major releases. Minor releases SHOULD be documented as well.
- A page in "Release notes" section MUST accompany all major releases. Minor releases SHOULD be documented as well. Avoid includes in Release notes pages as they are not intended to change over time.

## Maintainer Guide

Expand Down Expand Up @@ -90,7 +90,7 @@ We use several tools to enforce codestyle and code quality: `black` for autoform

### 6.5 branch

- DipDup 6.5 is supported until March 2024. Maintainers MUST backport bugfixes from the main branch until then. All Tezos and TzKT related code was synced with `next`, so it should be a relatively easy task.
- DipDup 6.5 is supported until March 2024. Maintainers MUST backport bugfixes from the main branch until then. All Tezos and TzKT-related code was synced with `next`, so it should be a relatively easy task.
- 6.5 docs and installer are hosted on GH Pages at `docs.dipdup.io`.

## MIT License
Expand Down
43 changes: 40 additions & 3 deletions docs/9.release-notes/1.v7.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,45 @@ Smart rollups are Tezos’ permissionless L2 scaling solution. They are WASM app
Since version 7.2 you can index Etherlink smart rollups like regular Tezos contracts. Choose `demo_etherlink` template when creating a new project:

```yaml [dipdup.yaml]
{{ #include ../src/demo_etherlink/dipdup.yaml }}
spec_version: 2.0
package: demo_etherlink

datasources:
tzkt:
kind: tezos.tzkt
url: ${TZKT_URL:-https://api.tzkt.io}

contracts:
controller:
kind: tezos
address: KT1Ax1oGGjooakyYJvtrX3q5zxRwYv6EAeC2
typename: controller
rollup:
kind: tezos
address: sr1SW7VtD6xbSAEoRk8LXewr3igfWjBx7FPB
typename: rollup

indexes:
rollup_operations:
kind: tezos.tzkt.operations
datasource: tzkt
contracts:
- controller
- rollup
handlers:
- callback: on_rollup_call
pattern:
- type: transaction
destination: controller
entrypoint: default
alias: controller_default
- type: transaction
destination: rollup
entrypoint: default
alias: rollup_default
```
Etherlink rollups' addresses start with `sr1` prefix instead of `KT1`, and entrypoint is always `default`. If you omit entrypoint in the operation pattern, the transaction will be treated as untyped.
Etherlink rollups' addresses start with the `sr1` prefix instead of `KT1`, and an entrypoint is always `default`. If you omit an entrypoint in the operation pattern, the transaction will be treated as untyped.

See the [tezos.tzkt.operations](../2.indexes/5.tezos_tzkt_operations.md) page for more details.

Expand Down Expand Up @@ -54,6 +89,8 @@ See the [API reference](../7.references/5.api.md) for more details.

`make` is back! After gathering feedback from the community we decided to return `Makefile` to the base template, but _make_ it package manager-agnostic. Instead, when creating a new project DipDup suggests choosing a package manager from PDM/Poetry/None (sets `package_manager` field in `replay.yaml` config). No action is required for existing projects, but you can run `dipdup init --base [--force]` to update the project base.

Finally, performance. Indexing EVM events with node RPC (`evm.node` datasource) has become faster. Node RPC is used only for the "last mile" - fetching blocks not yet in Subsquid Archives API - and realtime subscriptions, so it's not a big deal, but still nice to have. Finally, typeclass generation (with `datamodel-codegen`) is also faster now, and resulting classes use `X | Y` union syntax when possible.
Indexing EVM events with node RPC (`evm.node` datasource) has become faster. Node RPC while inherently slow, is used only for the "last mile" indexing (fetching a few hundred latest blocks not yet in Subsquid Archives API) and realtime subscriptions.

Finally, we have sped up the generation of Pydantic typeclasses with `datamodel-codegen`. Also, resulting classes use `X | Y` union syntax when possible.

{{ #include 9.release-notes/_footer.md }}
16 changes: 8 additions & 8 deletions docs/9.release-notes/2.v7.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: DipDup 7.1 release notes

Welcome, developers!

After maybe-too-long awaited 7.0 stable release we decided to establish shorter and more predictable release cycle. So, expect new DipDup versions to arrive more frequently, but maybe be less groundbreaking. Today we're releasing DipDup 7.1 with new index kind, CLI options, and lots of small improvements. Let's dive in!
After maybe-too-long awaited 7.0 stable release we decided to establish a shorter and more predictable release cycle. So, expect new DipDup versions to arrive more frequently, but maybe be less groundbreaking. Today we're releasing DipDup 7.1 with new index kind, CLI options, and lots of small improvements. Let's dive in!

## Indexing Tezos token balances

Expand Down Expand Up @@ -54,9 +54,9 @@ DipDup has lots of tools to work with SQL like parameterized scripts, queries, a

## More `config env` command options

Managing environment variables could be a pain, still it's an important part of a modern 12-factor application. Try to keep your project config completely environment-agnostic to make deploy easier and ensure secrets are safe. This release brings a few new options to the `config env` command to make it easier to work with environment variables.
Managing environment variables could be a pain, still, it's an important part of a modern 12-factor application. Try to keep your project config completely environment-agnostic to make deployment easier and ensure secrets are safe. This release brings a few new options to the `config env` command to make it easier to work with environment variables.

Compose stack definitions in `deploy` package directory include environment variables from `.env` files (generated with `config env` command without arguments). New `--compose, -c` flag also allows exporting config variables in Compose format. Copy necessary strings from the output to the `environment` section of the service definition and you're good.
Compose stack definitions in the `deploy` package directory include environment variables from `.env` files (generated with `config env` command without arguments). New `--compose, -c` flag also allows exporting config variables in Compose format. Copy the necessary strings from the output to the `environment` section of the service definition and you're good.

```shell [Terminal]
$ dipdup config env --compose
Expand All @@ -79,13 +79,13 @@ DIPDUP_REPLAY_PATH=
DIPDUP_TEST=
```

You could notice a new variable here, `DIPDUP_DEBUG`. Setting it to true will increase logging verbosity (equal to `logging: debug` in config) and enable some additional checks. Make sure that this flag is set if you're gathering logs for a bug report.
You can notice a new variable here, `DIPDUP_DEBUG`. Setting it to true will increase logging verbosity (equal to `logging: debug` in config) and enable some additional checks. Make sure that this flag is set if you're gathering logs for a bug report.

Finally, `--unsafe` flag allows exporting environment variables from the current shell session. Missing short option is intentional to prevent accidental usage. Missing example output here is also intentional, because it's, you know, unsafe to share your secrets. Don't do that.
Finally, the `--unsafe` flag allows exporting environment variables from the current shell session. The short option missing is intentional to prevent accidental usage. Missing example output here is also intentional, because it's, you know, unsafe to share your secrets. Don't do that.

## Improved base template

One of DipDup killer features is that we scaffold everything: package metadata, types and callback stubs, Compose definitions etc. We constantly improve the base template to make it more useful. You can run `dipdup new` once, answer a few questions get a fully working project. But you also use `init` command later to refresh files from the base template in your project.
One of DipDup's killer features is that we scaffold everything: package metadata, types and callback stubs, Compose definitions etc. We constantly improve the base template to make it more useful. You can run `dipdup new` once, answer a few questions get a fully working project. But you also use the `init` command later to refresh files from the base template in your project.

```shell [Terminal]
# First make sure that repo is clean
Expand All @@ -103,7 +103,7 @@ git diff

This feature is a huge time saver when you maintain multiple projects and want them to be consistent. Or to modify the `replay.yaml` file and apply changes to the whole project instead of generating a new one or finding and replacing all occurrences manually.

In this release we have updated linter rules to be more strict. Scripts to run CI routines were also updated. Run `pdm run -l` to see the full list of available scripts.
In this release, we have updated linter rules to be more strict. Scripts to run CI routines were also updated. Run `pdm run -l` to see the full list of available scripts.

```shell
$ pdm run -l
Expand All @@ -117,7 +117,7 @@ $ pdm run -l
╰────────┴───────────┴──────────────────────────────────╯
```

Inspect `pyproject.toml` to see how these scripts are defined or add your own to automate common tasks.
Inspect the `pyproject.toml` file to see how these scripts are defined or add your own to automate common tasks.

Here's a basic example of a GitHub Actions workflow to run all checks on every push:

Expand Down
6 changes: 3 additions & 3 deletions docs/9.release-notes/3.v7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ DipDup projects now run on Python 3.11. Performance improvements introduced in t

We have improved pre-fetching and caching data during indexing to increase the indexing speed.

Docker images are now based on Debian 12. They are simple, secure and easy to extend - just run pip as a default user. Alpine images are no longer published due to the lack of support in one of libraries we depend on, but migration should be seamless.
Docker images are now based on Debian 12. They are simple, secure and easy to extend - just run pip as a default user. Alpine images are no longer published due to the lack of support in one of the libraries we depend on, but migration should be seamless.

See the [Docker](../6.deployment/2.docker.md) page in the docs.

Expand All @@ -114,14 +114,14 @@ Here are some other notable changes not covered above:

The previous version of the framework is powering dozens of APIs in production. We want to give those projects enough time for migration or to wait a bit while the current branch is being ironed out. Given that, **DipDup 6.5 will be supported until March 2024**. We will continue to release bugfixes and security updates until that date. You can find the old documentation [here](https://docs.dipdup.io/), but some pages may be outdated. If you've found such a page or other issue, please drop us a message.

Of course, we encourage you migrating to 7.0 soon to explore all the cool stuff in this release.
Of course, we encourage you to migrate to 7.0 soon to explore all the cool stuff in this release.

## Migration guide

Migration from 6.5 requires several manual actions described further. First, make sure that your project is running the latest release, currently 6.5.10. Then, perform the steps below.

1. Install Python 3.11 with pyenv or your favorite tool. Make sure that `python3.11` is available in your shell. Install DipDup 7.0 with our script or manually.
2. Run the `dipdup new` command. Choose `[none]` at the first page, then `demo_blank` template (also used as package name in examples below). Answer the rest of the questions as you like.
2. Run the `dipdup new` command. Choose `[none]` on the first page, then `demo_blank` template (also used as package name in examples below). Answer the rest of the questions as you like.
3. Move your old root config to the `demo_blank/dipdup.yaml` path. Update its contents according to the [Config changes](#config-changes) section below.
4. Enter the package directory and run the `dipdup init` command. It will generate a bunch of typeclasses and callback stubs following the structure of the old package. Now is a good time to commit your changes.
5. Move function bodies of every callback in `hooks` and `handlers` directories to the corresponding stubs. If necessary, update type annotations to match with autogenerated imports.
Expand Down

0 comments on commit 8b49b5c

Please sign in to comment.