Skip to content

Commit

Permalink
docs(filter-sync and dozer): explain that there are two sync types
Browse files Browse the repository at this point in the history
closes #3143
  • Loading branch information
qbzzt committed Sep 12, 2024
1 parent c71eff1 commit 93a5f9c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/components/common-text/FilterTypes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Callout } from "nextra/components";

<Callout type="info">
MUD data synchronization, and therefore filtering, comes in two flavors: [Dozer](/state-query/dozer) and [generic](/guides/hello-world/filter-sync).

| | Dozer | Generic |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Filtering | Can filter on most SQL functions | Can only filter on tables and the first two key fields (limited by [`eth_getLogs`](https://ethereum.github.io/execution-apis/api-documentation/) filters) |
| Availability | [Redstone](https://redstone.xyz/docs/network-info), [Garnet](https://garnetchain.com/docs/network-info), or elsewhere if you run your own instance | Any EVM chain |
| Security assumptions | The Dozer instance returns accurate information | The endpoint returns accurate information (same assumption as any other blockchain app) |

</Callout>
3 changes: 3 additions & 0 deletions docs/pages/guides/hello-world/filter-sync.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { CollapseCode } from "../../../components/CollapseCode";
import FilterTypes from "../../../components/common-text/FilterTypes.mdx";

# Filter data synchronization

In this tutorial you modify `networkSetup.ts` to filter the information you synchronize.
Filtering information this way allows you to reduce the use of network resources and makes loading times faster.

<FilterTypes />

## Setup

To see the effects of filtering we need a table with entries to filter. To get such a table:
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/state-query/dozer.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { CollapseCode } from "../../components/CollapseCode";
import FilterTypes from "../../components/common-text/FilterTypes.mdx";
import { Callout } from "nextra/components";

# Dozer

<FilterTypes />

If there is a dozer instance serving a blockchain, as there is for [Redstone](https://redstone.xyz/) and [Garnet](https://garnetchain.com/docs/what-is-redstone), you can use it to run queries on the data of any `World` on that blockchain.

The query language is a subset of [the SQL `SELECT` command](<https://en.wikipedia.org/wiki/Select_(SQL)>).
Expand Down

0 comments on commit 93a5f9c

Please sign in to comment.