Skip to content

Commit

Permalink
Merge branch 'main' into test-and-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs committed Jan 3, 2024
2 parents cf533e5 + 1a0fa79 commit c82181a
Show file tree
Hide file tree
Showing 142 changed files with 2,420 additions and 289 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-forks-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store": patch
---

Changed the type of the output variable in the `slice4` function to `bytes4`.
5 changes: 5 additions & 0 deletions .changeset/fair-pillows-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

Added a script to run the decoded postgres indexer.
8 changes: 8 additions & 0 deletions .changeset/fast-pandas-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@latticexyz/store-indexer": patch
"@latticexyz/store-sync": patch
---

Added explicit error logs for unexpected situations.
Previously all `debug` logs were going to `stderr`, which made it hard to find the unexpected errors.
Now `debug` logs go to `stdout` and we can add explicit `stderr` logs.
6 changes: 6 additions & 0 deletions .changeset/fluffy-days-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@latticexyz/store-indexer": major
"@latticexyz/store-sync": major
---

The postgres indexer is now storing the `logIndex` of the last update of a record to be able to return the snapshot logs in the order they were emitted onchain.
5 changes: 5 additions & 0 deletions .changeset/fresh-seals-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/common": patch
---

The benchmark util now logs to `stdout` instead of `stderr`.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-chefs-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/world": patch
---

Added explicit `internal` visibility to the `coreSystem` variable in `CoreModule`.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-wombats-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/world": patch
---

Fixed `requireInterface` to correctly specify ERC165.
6 changes: 6 additions & 0 deletions .changeset/grumpy-icons-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@latticexyz/world-modules": patch
"@latticexyz/world": patch
---

Added `isInstalled` and `requireNotInstalled` helpers to `Module` base contract.
5 changes: 5 additions & 0 deletions .changeset/large-schools-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

Added a Sentry middleware and `SENTRY_DNS` environment variable to the postgres indexer.
23 changes: 23 additions & 0 deletions .changeset/poor-beans-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
"@latticexyz/abi-ts": patch
"@latticexyz/block-logs-stream": patch
"@latticexyz/common": patch
"@latticexyz/config": patch
"@latticexyz/dev-tools": patch
"@latticexyz/faucet": patch
"@latticexyz/gas-report": patch
"@latticexyz/noise": patch
"@latticexyz/phaserx": patch
"@latticexyz/protocol-parser": patch
"@latticexyz/react": patch
"@latticexyz/recs": patch
"@latticexyz/schema-type": patch
"@latticexyz/services": patch
"@latticexyz/store-sync": patch
"@latticexyz/store": patch
"@latticexyz/utils": patch
"@latticexyz/world-modules": patch
"@latticexyz/world": patch
---

TS packages now generate their respective `.d.ts` type definition files for better compatibility when using MUD with `moduleResolution` set to `bundler` or `node16` and fixes issues around missing type declarations for dependent packages.
5 changes: 5 additions & 0 deletions .changeset/rich-carpets-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store": patch
---

Fixed `StoreCore` to pass `previousEncodedLengths` into `onBeforeSpliceDynamicData`.
5 changes: 5 additions & 0 deletions .changeset/rich-experts-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

Disabled prepared statements for the postgres indexer, which led to issues in combination with `pgBouncer`.
12 changes: 12 additions & 0 deletions .changeset/rich-worms-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@latticexyz/abi-ts": patch
"@latticexyz/block-logs-stream": patch
"@latticexyz/cli": patch
"@latticexyz/common": patch
"@latticexyz/faucet": patch
"@latticexyz/store-indexer": patch
"@latticexyz/store-sync": patch
"@latticexyz/store": patch
---

Updated the `debug` util to pipe to `stdout` and added an additional util to explicitly pipe to `stderr` when needed.
5 changes: 5 additions & 0 deletions .changeset/silver-wasps-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

The error log if no data is found in `/api/logs` is now stringifying the filter instead of logging `[object Object]`.
6 changes: 6 additions & 0 deletions .changeset/smart-fireants-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@latticexyz/store": patch
"@latticexyz/world": patch
---

Removed unused imports from various files in the `store` and `world` packages.
5 changes: 5 additions & 0 deletions .changeset/sour-rivers-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

Added a binary for the `postgres-decoded` indexer.
5 changes: 5 additions & 0 deletions .changeset/tiny-lions-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/faucet": patch
---

Updated to use MUD's `sendTransaction`, which does a better of managing nonces for higher volumes of transactions.
7 changes: 7 additions & 0 deletions .changeset/tough-moose-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@latticexyz/common": minor
---

- Added a `Result<Ok, Err>` type for more explicit and typesafe error handling ([inspired by Rust](https://doc.rust-lang.org/std/result/)).

- Added a `includes` util as typesafe alternative to [`Array.prototype.includes()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
22 changes: 22 additions & 0 deletions .changeset/wild-years-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"@latticexyz/store-indexer": minor
"@latticexyz/store-sync": minor
---

- Improved query performance by 10x by moving from drizzle ORM to handcrafted SQL.
- Moved away from `trpc` for more granular control over the transport layer.
Added an `/api/logs` endpoint using the new query and gzip compression for 40x less data transferred over the wire.
Deprecated the `/trpc/getLogs` and `/trpc/findAll` endpoints.
- Added a `createIndexerClient` client for the new `/api` indexer API exported from `@latticexyz/store-sync/indexer-client`.
The `createIndexerClient` export from `@latticexyz/store-sync/trpc-indexer` is deprecated.

```diff
- import { createIndexerClient } from "@latticexyz/store-sync/trpc-indexer";
+ import { createIndexerClient } from "@latticexyz/store-sync/indexer-client";

- const indexer = createIndexerClient({ url: "https://indexer.holesky.redstone.xyz/trpc" });
+ const indexer = createIndexerClient({ url: "https://indexer.holesky.redstone.xyz" });

- const snapshot = indexer.getLogs.query(options);
+ const snapshot = indexer.getLogs(options);
```
5 changes: 5 additions & 0 deletions .changeset/yellow-bags-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": minor
---

The `/api/logs` indexer endpoint is now returning a `404` snapshot not found error when no snapshot is found for the provided filter instead of an empty `200` response.
2 changes: 1 addition & 1 deletion docs/pages/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The easiest way to get started with MUD is to use [a template](/templates/typescript/getting-started).

1. Ensure you have `node` and `pnpm` installed.
1. Ensure you have [`node`](https://nodejs.org/en/download/package-manager#macos), [`pnpm`](https://pnpm.io/installation) and [`foundry`](https://getfoundry.sh/) installed.
1. Create and start the application:

```sh copy
Expand Down
11 changes: 10 additions & 1 deletion docs/pages/services/faucet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ A minimal Typescript faucet to drip native tokens on Ethereum chains

## Getting ETH from a faucet

[This sample program](https://github.com/latticexyz/mud/tree/main/examples/faucet-client) shows how to obtain ETH from a faucet.
[This sample program](https://github.com/latticexyz/mud/tree/main/examples/faucet-client) shows how to obtain ETH from a faucet using TypeScript.

Alternatively, you can submit a `POST` request to the faucet.
For example, if you use the default `HOST` and `PORT`, this command requests a drip to the zero address.

```sh copy
curl -X POST http://127.0.0.1:3002/trpc/drip \
-H "Content-Type: application/json" \
-d '{"address": "0x0000000000000000000000000000000000000000"}'
```

0 comments on commit c82181a

Please sign in to comment.