From 3b290735b50c9f841e527c674922aafeec9fe662 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Aug 2023 15:42:37 +0000 Subject: [PATCH] Version Packages (next) --- .changeset/pre.json | 9 ++ CHANGELOG.md | 118 +++++++++++++++++++++++ packages/block-logs-stream/CHANGELOG.md | 9 ++ packages/block-logs-stream/package.json | 2 +- packages/cli/CHANGELOG.md | 71 ++++++++++++++ packages/cli/package.json | 2 +- packages/common/CHANGELOG.md | 32 ++++++ packages/common/package.json | 2 +- packages/config/CHANGELOG.md | 8 ++ packages/config/package.json | 2 +- packages/create-mud/CHANGELOG.md | 77 +++++++++++++++ packages/create-mud/package.json | 2 +- packages/dev-tools/CHANGELOG.md | 13 +++ packages/dev-tools/package.json | 14 +-- packages/ecs-browser/CHANGELOG.md | 9 ++ packages/ecs-browser/package.json | 2 +- packages/gas-report/CHANGELOG.md | 2 + packages/gas-report/package.json | 2 +- packages/network/CHANGELOG.md | 3 + packages/network/package.json | 2 +- packages/noise/CHANGELOG.md | 2 + packages/noise/package.json | 2 +- packages/phaserx/CHANGELOG.md | 7 ++ packages/phaserx/package.json | 2 +- packages/protocol-parser/CHANGELOG.md | 8 ++ packages/protocol-parser/package.json | 2 +- packages/react/CHANGELOG.md | 9 ++ packages/react/package.json | 2 +- packages/recs/CHANGELOG.md | 8 ++ packages/recs/package.json | 2 +- packages/schema-type/CHANGELOG.md | 2 + packages/schema-type/package.json | 2 +- packages/services/CHANGELOG.md | 11 +++ packages/services/package.json | 2 +- packages/solecs/CHANGELOG.md | 2 + packages/solecs/package.json | 2 +- packages/solhint-config-mud/CHANGELOG.md | 2 + packages/solhint-config-mud/package.json | 2 +- packages/solhint-plugin-mud/CHANGELOG.md | 2 + packages/solhint-plugin-mud/package.json | 2 +- packages/std-client/CHANGELOG.md | 40 ++++++++ packages/std-client/package.json | 2 +- packages/std-contracts/CHANGELOG.md | 2 + packages/std-contracts/package.json | 2 +- packages/store-cache/CHANGELOG.md | 10 ++ packages/store-cache/package.json | 2 +- packages/store-indexer/CHANGELOG.md | 10 ++ packages/store-indexer/package.json | 2 +- packages/store-sync/CHANGELOG.md | 43 +++++++++ packages/store-sync/package.json | 2 +- packages/store/CHANGELOG.md | 59 ++++++++++++ packages/store/package.json | 2 +- packages/utils/CHANGELOG.md | 2 + packages/utils/package.json | 2 +- packages/world/CHANGELOG.md | 71 ++++++++++++++ packages/world/package.json | 2 +- 56 files changed, 674 insertions(+), 33 deletions(-) create mode 100644 packages/network/CHANGELOG.md diff --git a/.changeset/pre.json b/.changeset/pre.json index 91c2d60115..b31265014f 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -37,32 +37,39 @@ "dirty-items-retire", "eighty-tigers-argue", "fast-ears-hug", + "few-mirrors-reflect", "fifty-squids-eat", "fifty-suits-shout", "fluffy-moles-march", "four-coats-pull", "giant-masks-carry", "great-cooks-dream", + "grumpy-geckos-raise", "itchy-kids-relax", "itchy-shoes-appear", "large-hats-walk", "large-sloths-camp", + "late-geese-guess", + "late-spies-cover", "lazy-ladybugs-return", "many-phones-study", "mean-pans-study", "metal-cats-double", "modern-bikes-build", + "modern-hornets-jam", "nasty-waves-divide", "nice-moose-love", "nice-pandas-knock", "olive-parrots-move", "perfect-mangos-cry", + "pink-fans-nail", "pink-horses-deny", "pretty-hotels-drop", "quick-numbers-flash", "rare-planes-draw", "red-turkeys-develop", "selfish-cycles-retire", + "seven-flies-chew", "sharp-worms-kneel", "smooth-elephants-wave", "smooth-pots-nail", @@ -73,6 +80,7 @@ "stale-cooks-reflect", "strange-candles-shout", "strange-ducks-float", + "strong-geckos-shake", "tame-lemons-play", "thin-buses-reply", "tricky-frogs-beam", @@ -81,6 +89,7 @@ "tricky-oranges-pump", "twenty-birds-scream", "weak-mails-cross", + "wild-gorillas-care", "witty-jokes-serve" ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index bff065482c..72a4ed5913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,121 @@ +# Version 2.0.0-next.3 + +## Major changes + +**[feat(world, store): stop loading schema from storage, require schema as an argument (#1174)](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57)** (@latticexyz/cli, @latticexyz/store, @latticexyz/world, create-mud) + +All `Store` methods now require the table's value schema to be passed in as an argument instead of loading it from storage. +This decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered). + +```diff + function setRecord( + bytes32 table, + bytes32[] calldata key, + bytes calldata data, ++ Schema valueSchema + ) external; +``` + +The same diff applies to `getRecord`, `getField`, `setField`, `pushToField`, `popFromField`, `updateInField`, and `deleteRecord`. + +This change only requires changes in downstream projects if the `Store` methods were accessed directly. In most cases it is fully abstracted in the generated table libraries, +so downstream projects only need to regenerate their table libraries after updating MUD. + +**[refactor(world): combine name and namespace to resource selector in World methods (#1208)](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c)** (@latticexyz/cli, @latticexyz/world) + +- All `World` function selectors that previously had `bytes16 namespace, bytes16 name` arguments now use `bytes32 resourceSelector` instead. + This includes `setRecord`, `setField`, `pushToField`, `popFromField`, `updateInField`, `deleteRecord`, `call`, `grantAccess`, `revokeAccess`, `registerTable`, + `registerStoreHook`, `registerSystemHook`, `registerFunctionSelector`, `registerSystem` and `registerRootFunctionSelector`. + This change aligns the `World` function selectors with the `Store` function selectors, reduces clutter, reduces gas cost and reduces the `World`'s contract size. + +- The `World`'s `registerHook` function is removed. Use `registerStoreHook` or `registerSystemHook` instead. + +- The `deploy` script is updated to integrate the World interface changes + +**[refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)** (@latticexyz/world) + +The `SnapSyncModule` is removed. The recommended way of loading the initial state of a MUD app is via the new [`store-indexer`](https://mud.dev/indexer). Loading state via contract getter functions is not recommended, as it's computationally heavy on the RPC, can't be cached, and is an easy way to shoot yourself in the foot with exploding RPC costs. + +The `@latticexyz/network` package was deprecated and is now removed. All consumers should upgrade to the new sync stack from `@latticexyz/store-sync`. + +**[feat(store,world): combine schema and metadata registration, rename getSchema to getValueSchema, change Schema table id (#1182)](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab)** (@latticexyz/cli, @latticexyz/store, @latticexyz/world, @latticexyz/store-sync, create-mud) + +- `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` +- `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + +- `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed +- The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` +- The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +**[refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)** (@latticexyz/services, create-mud) + +Move `createFaucetService` from `@latticexyz/network` to `@latticexyz/services/faucet`. + +```diff +- import { createFaucetService } from "@latticexyz/network"; ++ import { createFaucetService } from "@latticexyz/services/faucet"; +``` + +**[refactor: remove v1 network package, remove snap sync module, deprecate std-client (#1311)](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)** (@latticexyz/std-client, @latticexyz/common, create-mud) + +Deprecate `@latticexyz/std-client` and remove v1 network dependencies. + +- `getBurnerWallet` is replaced by `getBurnerPrivateKey` from `@latticexyz/common`. It now returns a `Hex` string instead of an `rxjs` `BehaviorSubject`. + + ``` + - import { getBurnerWallet } from "@latticexyz/std-client"; + + import { getBurnerPrivateKey } from "@latticexyz/common"; + + - const privateKey = getBurnerWallet().value; + - const privateKey = getBurnerPrivateKey(); + ``` + +- All functions from `std-client` that depended on v1 network code are removed (most notably `setupMUDNetwork` and `setupMUDV2Network`). Consumers should upgrade to v2 networking code from `@latticexyz/store-sync`. + +- The following functions are removed from `std-client` because they are very use-case specific and depend on deprecated code: `getCurrentTurn`, `getTurnAtTime`, `getGameConfig`, `isUntraversable`, `getPlayerEntity`, `resolveRelationshipChain`, `findEntityWithComponentInRelationshipChain`, `findInRelationshipChain`. Consumers should vendor these functions if they are still needed. + +- Remaining exports from `std-client` are moved to `/deprecated`. The package will be removed in a future release (once there are replacements for the deprecated exports). + + ```diff + - import { ... } from "@latticexyz/std-client"; + + import { ... } from "@latticexyz/std-client/deprecated"; + ``` + +## Patch changes + +**[refactor(store): optimize table libraries (#1303)](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd)** (@latticexyz/store) + +Optimize autogenerated table libraries + +**[feat(store-sync): add more logging to waitForTransaction (#1317)](https://github.com/latticexyz/mud/commit/3e024fcf395a1c1b38d12362fc98472290eb7cf1)** (@latticexyz/store-sync) + +add retry attempts and more logging to `waitForTransaction` + +**[refactor(store): optimize Schema (#1252)](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61)** (@latticexyz/store, @latticexyz/world) + +Optimize Schema methods. +Return `uint256` instead of `uint8` in SchemaInstance numFields methods + +--- + # Version 2.0.0-next.2 ## Major changes diff --git a/packages/block-logs-stream/CHANGELOG.md b/packages/block-logs-stream/CHANGELOG.md index 9aa9b7a141..6f921cf4ea 100644 --- a/packages/block-logs-stream/CHANGELOG.md +++ b/packages/block-logs-stream/CHANGELOG.md @@ -1,5 +1,14 @@ # @latticexyz/block-logs-stream +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 2b11af11d6..4989651090 100644 --- a/packages/block-logs-stream/package.json +++ b/packages/block-logs-stream/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/block-logs-stream", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Create a stream of EVM block logs for events", "repository": { "type": "git", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 916abff732..49f20eeb83 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,76 @@ # Change Log +## 2.0.0-next.3 + +### Major Changes + +- [#1174](https://github.com/latticexyz/mud/pull/1174) [`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57) Thanks [@alvrs](https://github.com/alvrs)! - All `Store` methods now require the table's value schema to be passed in as an argument instead of loading it from storage. + This decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered). + + ```diff + function setRecord( + bytes32 table, + bytes32[] calldata key, + bytes calldata data, + + Schema valueSchema + ) external; + ``` + + The same diff applies to `getRecord`, `getField`, `setField`, `pushToField`, `popFromField`, `updateInField`, and `deleteRecord`. + + This change only requires changes in downstream projects if the `Store` methods were accessed directly. In most cases it is fully abstracted in the generated table libraries, + so downstream projects only need to regenerate their table libraries after updating MUD. + +- [#1208](https://github.com/latticexyz/mud/pull/1208) [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c) Thanks [@alvrs](https://github.com/alvrs)! - - All `World` function selectors that previously had `bytes16 namespace, bytes16 name` arguments now use `bytes32 resourceSelector` instead. + This includes `setRecord`, `setField`, `pushToField`, `popFromField`, `updateInField`, `deleteRecord`, `call`, `grantAccess`, `revokeAccess`, `registerTable`, + `registerStoreHook`, `registerSystemHook`, `registerFunctionSelector`, `registerSystem` and `registerRootFunctionSelector`. + This change aligns the `World` function selectors with the `Store` function selectors, reduces clutter, reduces gas cost and reduces the `World`'s contract size. + + - The `World`'s `registerHook` function is removed. Use `registerStoreHook` or `registerSystemHook` instead. + + - The `deploy` script is updated to integrate the World interface changes + +- [#1182](https://github.com/latticexyz/mud/pull/1182) [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab) Thanks [@alvrs](https://github.com/alvrs)! - - `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` + + - `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + + - `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed + - The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` + - The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/world@2.0.0-next.3 + - @latticexyz/services@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/protocol-parser@2.0.0-next.3 + - @latticexyz/gas-report@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + - @latticexyz/solecs@2.0.0-next.3 + - @latticexyz/std-contracts@2.0.0-next.3 + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index e18c2bf0bb..c94f4651f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index d2bf018ce7..9d4d58447f 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,37 @@ # Change Log +## 2.0.0-next.3 + +### Minor Changes + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Deprecate `@latticexyz/std-client` and remove v1 network dependencies. + + - `getBurnerWallet` is replaced by `getBurnerPrivateKey` from `@latticexyz/common`. It now returns a `Hex` string instead of an `rxjs` `BehaviorSubject`. + + ``` + - import { getBurnerWallet } from "@latticexyz/std-client"; + + import { getBurnerPrivateKey } from "@latticexyz/common"; + + - const privateKey = getBurnerWallet().value; + - const privateKey = getBurnerPrivateKey(); + ``` + + - All functions from `std-client` that depended on v1 network code are removed (most notably `setupMUDNetwork` and `setupMUDV2Network`). Consumers should upgrade to v2 networking code from `@latticexyz/store-sync`. + + - The following functions are removed from `std-client` because they are very use-case specific and depend on deprecated code: `getCurrentTurn`, `getTurnAtTime`, `getGameConfig`, `isUntraversable`, `getPlayerEntity`, `resolveRelationshipChain`, `findEntityWithComponentInRelationshipChain`, `findInRelationshipChain`. Consumers should vendor these functions if they are still needed. + + - Remaining exports from `std-client` are moved to `/deprecated`. The package will be removed in a future release (once there are replacements for the deprecated exports). + + ```diff + - import { ... } from "@latticexyz/std-client"; + + import { ... } from "@latticexyz/std-client/deprecated"; + ``` + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Minor Changes diff --git a/packages/common/package.json b/packages/common/package.json index e7df95c6e0..e7e99b331c 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/common", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Common low level logic shared between packages", "repository": { "type": "git", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index b71ab4369e..968712c61b 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index b846fc5425..63666576c1 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/config", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Config for Store and World", "repository": { "type": "git", diff --git a/packages/create-mud/CHANGELOG.md b/packages/create-mud/CHANGELOG.md index a97f25d2a3..7c4eacaafe 100644 --- a/packages/create-mud/CHANGELOG.md +++ b/packages/create-mud/CHANGELOG.md @@ -1,5 +1,82 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- [#1174](https://github.com/latticexyz/mud/pull/1174) [`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57) Thanks [@alvrs](https://github.com/alvrs)! - All `Store` methods now require the table's value schema to be passed in as an argument instead of loading it from storage. + This decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered). + + ```diff + function setRecord( + bytes32 table, + bytes32[] calldata key, + bytes calldata data, + + Schema valueSchema + ) external; + ``` + + The same diff applies to `getRecord`, `getField`, `setField`, `pushToField`, `popFromField`, `updateInField`, and `deleteRecord`. + + This change only requires changes in downstream projects if the `Store` methods were accessed directly. In most cases it is fully abstracted in the generated table libraries, + so downstream projects only need to regenerate their table libraries after updating MUD. + +- [#1182](https://github.com/latticexyz/mud/pull/1182) [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab) Thanks [@alvrs](https://github.com/alvrs)! - - `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` + + - `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + + - `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed + - The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` + - The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Move `createFaucetService` from `@latticexyz/network` to `@latticexyz/services/faucet`. + + ```diff + - import { createFaucetService } from "@latticexyz/network"; + + import { createFaucetService } from "@latticexyz/services/faucet"; + ``` + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Deprecate `@latticexyz/std-client` and remove v1 network dependencies. + + - `getBurnerWallet` is replaced by `getBurnerPrivateKey` from `@latticexyz/common`. It now returns a `Hex` string instead of an `rxjs` `BehaviorSubject`. + + ``` + - import { getBurnerWallet } from "@latticexyz/std-client"; + + import { getBurnerPrivateKey } from "@latticexyz/common"; + + - const privateKey = getBurnerWallet().value; + - const privateKey = getBurnerPrivateKey(); + ``` + + - All functions from `std-client` that depended on v1 network code are removed (most notably `setupMUDNetwork` and `setupMUDV2Network`). Consumers should upgrade to v2 networking code from `@latticexyz/store-sync`. + + - The following functions are removed from `std-client` because they are very use-case specific and depend on deprecated code: `getCurrentTurn`, `getTurnAtTime`, `getGameConfig`, `isUntraversable`, `getPlayerEntity`, `resolveRelationshipChain`, `findEntityWithComponentInRelationshipChain`, `findInRelationshipChain`. Consumers should vendor these functions if they are still needed. + + - Remaining exports from `std-client` are moved to `/deprecated`. The package will be removed in a future release (once there are replacements for the deprecated exports). + + ```diff + - import { ... } from "@latticexyz/std-client"; + + import { ... } from "@latticexyz/std-client/deprecated"; + ``` + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/create-mud/package.json b/packages/create-mud/package.json index da8d21dfc0..b427089fd6 100644 --- a/packages/create-mud/package.json +++ b/packages/create-mud/package.json @@ -1,6 +1,6 @@ { "name": "create-mud", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Create a new MUD project", "license": "MIT", "author": "Lattice ", diff --git a/packages/dev-tools/CHANGELOG.md b/packages/dev-tools/CHANGELOG.md index 1948c9ab7f..d8a8a29a78 100644 --- a/packages/dev-tools/CHANGELOG.md +++ b/packages/dev-tools/CHANGELOG.md @@ -1,5 +1,18 @@ # @latticexyz/dev-tools +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`3e024fcf`](https://github.com/latticexyz/mud/commit/3e024fcf395a1c1b38d12362fc98472290eb7cf1), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/world@2.0.0-next.3 + - @latticexyz/store-sync@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/react@2.0.0-next.3 + - @latticexyz/recs@2.0.0-next.3 + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index 70c91e9067..4f07f4d16e 100644 --- a/packages/dev-tools/package.json +++ b/packages/dev-tools/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/dev-tools", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "MUD developer tools", "repository": { "type": "git", @@ -50,12 +50,12 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/common": "2.0.0-next.2", - "@latticexyz/recs": "2.0.0-next.2", - "@latticexyz/store": "2.0.0-next.2", - "@latticexyz/store-sync": "2.0.0-next.2", - "@latticexyz/utils": "2.0.0-next.2", - "@latticexyz/world": "2.0.0-next.2" + "@latticexyz/common": "2.0.0-next.3", + "@latticexyz/recs": "2.0.0-next.3", + "@latticexyz/store": "2.0.0-next.3", + "@latticexyz/store-sync": "2.0.0-next.3", + "@latticexyz/utils": "2.0.0-next.3", + "@latticexyz/world": "2.0.0-next.3" }, "publishConfig": { "access": "public" diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index 0076c626db..af746eeae1 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/std-client@2.0.0-next.3 + - @latticexyz/recs@2.0.0-next.3 + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index 3fb29f08da..15fe88dbe8 100644 --- a/packages/ecs-browser/package.json +++ b/packages/ecs-browser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/ecs-browser", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Component Browser for RECS", "repository": { "type": "git", diff --git a/packages/gas-report/CHANGELOG.md b/packages/gas-report/CHANGELOG.md index 2b137254f8..0eef0c9227 100644 --- a/packages/gas-report/CHANGELOG.md +++ b/packages/gas-report/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index 3b797fcfc4..e98581c4bf 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/gas-report", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Gas reporter for specific lines within forge tests", "repository": { "type": "git", diff --git a/packages/network/CHANGELOG.md b/packages/network/CHANGELOG.md new file mode 100644 index 0000000000..d8d171f8a9 --- /dev/null +++ b/packages/network/CHANGELOG.md @@ -0,0 +1,3 @@ +# @latticexyz/network + +## 2.0.0-next.3 diff --git a/packages/network/package.json b/packages/network/package.json index 642fd86792..17ded83f24 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/network", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "private": true } diff --git a/packages/noise/CHANGELOG.md b/packages/noise/CHANGELOG.md index 8668e9b17e..322a7fb9b7 100644 --- a/packages/noise/CHANGELOG.md +++ b/packages/noise/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/noise/package.json b/packages/noise/package.json index fdc33e98f0..de7ec14dd5 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/noise", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "license": "MIT", "type": "module", "exports": { diff --git a/packages/phaserx/CHANGELOG.md b/packages/phaserx/CHANGELOG.md index cfe97612f3..a9788ea419 100644 --- a/packages/phaserx/CHANGELOG.md +++ b/packages/phaserx/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/phaserx/package.json b/packages/phaserx/package.json index 2a57eec7d3..2ed2e4ec3a 100644 --- a/packages/phaserx/package.json +++ b/packages/phaserx/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/phaserx", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/protocol-parser/CHANGELOG.md b/packages/protocol-parser/CHANGELOG.md index 8fd989ac9a..ffc297830c 100644 --- a/packages/protocol-parser/CHANGELOG.md +++ b/packages/protocol-parser/CHANGELOG.md @@ -1,5 +1,13 @@ # @latticexyz/protocol-parser +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index e80e137483..a6337e4e8f 100644 --- a/packages/protocol-parser/package.json +++ b/packages/protocol-parser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/protocol-parser", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 52f6f5239f..1d4bd00558 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/store-cache@2.0.0-next.3 + - @latticexyz/recs@2.0.0-next.3 + ## 2.0.0-next.2 ### Minor Changes diff --git a/packages/react/package.json b/packages/react/package.json index 0e14374214..dec9a10529 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/react", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "React tools for MUD client.", "repository": { "type": "git", diff --git a/packages/recs/CHANGELOG.md b/packages/recs/CHANGELOG.md index 1a4f8a0b47..06d8bc6ea8 100644 --- a/packages/recs/CHANGELOG.md +++ b/packages/recs/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.3 + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/recs/package.json b/packages/recs/package.json index 96ca596afb..a45645d349 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/recs", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/schema-type/CHANGELOG.md b/packages/schema-type/CHANGELOG.md index 1324458eb1..9f038599bf 100644 --- a/packages/schema-type/CHANGELOG.md +++ b/packages/schema-type/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index 064c0f3a28..65015c03b6 100644 --- a/packages/schema-type/package.json +++ b/packages/schema-type/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/schema-type", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "SchemaType enum for various languages", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index 3fd2d67a8e..5d0744e1f3 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 2.0.0-next.3 + +### Major Changes + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Move `createFaucetService` from `@latticexyz/network` to `@latticexyz/services/faucet`. + + ```diff + - import { createFaucetService } from "@latticexyz/network"; + + import { createFaucetService } from "@latticexyz/services/faucet"; + ``` + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/services/package.json b/packages/services/package.json index 0e39680cc7..8daba15bf2 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "MUD services for enhanced interactions with on-chain ECS state", "repository": { "type": "git", diff --git a/packages/solecs/CHANGELOG.md b/packages/solecs/CHANGELOG.md index ca50905623..63b0f806ee 100644 --- a/packages/solecs/CHANGELOG.md +++ b/packages/solecs/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/solecs/package.json b/packages/solecs/package.json index 9a8f42d97b..a1a70aab81 100644 --- a/packages/solecs/package.json +++ b/packages/solecs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/solecs", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Solidity Entity Component System", "repository": { "type": "git", diff --git a/packages/solhint-config-mud/CHANGELOG.md b/packages/solhint-config-mud/CHANGELOG.md index 8652a1109c..d197e69d30 100644 --- a/packages/solhint-config-mud/CHANGELOG.md +++ b/packages/solhint-config-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index 0c2010f061..0ba8bf09ef 100644 --- a/packages/solhint-config-mud/package.json +++ b/packages/solhint-config-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-config-mud", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/solhint-plugin-mud/CHANGELOG.md b/packages/solhint-plugin-mud/CHANGELOG.md index 8652a1109c..d197e69d30 100644 --- a/packages/solhint-plugin-mud/CHANGELOG.md +++ b/packages/solhint-plugin-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index a2fa61b10d..762d83314d 100644 --- a/packages/solhint-plugin-mud/package.json +++ b/packages/solhint-plugin-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-plugin-mud", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/std-client/CHANGELOG.md b/packages/std-client/CHANGELOG.md index e76fe4fb88..cdd2efbb0d 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,45 @@ # Change Log +## 2.0.0-next.3 + +### Major Changes + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Deprecate `@latticexyz/std-client` and remove v1 network dependencies. + + - `getBurnerWallet` is replaced by `getBurnerPrivateKey` from `@latticexyz/common`. It now returns a `Hex` string instead of an `rxjs` `BehaviorSubject`. + + ``` + - import { getBurnerWallet } from "@latticexyz/std-client"; + + import { getBurnerPrivateKey } from "@latticexyz/common"; + + - const privateKey = getBurnerWallet().value; + - const privateKey = getBurnerPrivateKey(); + ``` + + - All functions from `std-client` that depended on v1 network code are removed (most notably `setupMUDNetwork` and `setupMUDV2Network`). Consumers should upgrade to v2 networking code from `@latticexyz/store-sync`. + + - The following functions are removed from `std-client` because they are very use-case specific and depend on deprecated code: `getCurrentTurn`, `getTurnAtTime`, `getGameConfig`, `isUntraversable`, `getPlayerEntity`, `resolveRelationshipChain`, `findEntityWithComponentInRelationshipChain`, `findInRelationshipChain`. Consumers should vendor these functions if they are still needed. + + - Remaining exports from `std-client` are moved to `/deprecated`. The package will be removed in a future release (once there are replacements for the deprecated exports). + + ```diff + - import { ... } from "@latticexyz/std-client"; + + import { ... } from "@latticexyz/std-client/deprecated"; + ``` + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/cli@2.0.0-next.3 + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/world@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/store-cache@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/recs@2.0.0-next.3 + - @latticexyz/solecs@2.0.0-next.3 + - @latticexyz/utils@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/std-client/package.json b/packages/std-client/package.json index f8969399d7..3a1094a132 100644 --- a/packages/std-client/package.json +++ b/packages/std-client/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/std-client", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Standard library for MUD client.", "repository": { "type": "git", diff --git a/packages/std-contracts/CHANGELOG.md b/packages/std-contracts/CHANGELOG.md index e159a0a02b..c698d0ea0e 100644 --- a/packages/std-contracts/CHANGELOG.md +++ b/packages/std-contracts/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/std-contracts/package.json b/packages/std-contracts/package.json index 05a51c8cff..637511b3aa 100644 --- a/packages/std-contracts/package.json +++ b/packages/std-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/std-contracts", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "MUD Contracts Standard Library", "repository": { "type": "git", diff --git a/packages/store-cache/CHANGELOG.md b/packages/store-cache/CHANGELOG.md index 6cf49cb00b..1f6d5a38a3 100644 --- a/packages/store-cache/CHANGELOG.md +++ b/packages/store-cache/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/store-cache/package.json b/packages/store-cache/package.json index 4d7a4de3f2..439db4f8b2 100644 --- a/packages/store-cache/package.json +++ b/packages/store-cache/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-cache", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Database to replicate Store contract state on a TypeScript client", "repository": { "type": "git", diff --git a/packages/store-indexer/CHANGELOG.md b/packages/store-indexer/CHANGELOG.md index 3571446c3e..a3b24a122f 100644 --- a/packages/store-indexer/CHANGELOG.md +++ b/packages/store-indexer/CHANGELOG.md @@ -1,5 +1,15 @@ # @latticexyz/store-indexer +## 2.0.0-next.3 + +### Patch Changes + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`3e024fcf`](https://github.com/latticexyz/mud/commit/3e024fcf395a1c1b38d12362fc98472290eb7cf1), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/store-sync@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/block-logs-stream@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index c051b86bce..026365ca2b 100644 --- a/packages/store-indexer/package.json +++ b/packages/store-indexer/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-indexer", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Minimal Typescript indexer for Store", "repository": { "type": "git", diff --git a/packages/store-sync/CHANGELOG.md b/packages/store-sync/CHANGELOG.md index 6c0ee19044..b16e11f5e2 100644 --- a/packages/store-sync/CHANGELOG.md +++ b/packages/store-sync/CHANGELOG.md @@ -1,5 +1,48 @@ # @latticexyz/store-sync +## 2.0.0-next.3 + +### Major Changes + +- [#1182](https://github.com/latticexyz/mud/pull/1182) [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab) Thanks [@alvrs](https://github.com/alvrs)! - - `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` + + - `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + + - `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed + - The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` + - The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +### Patch Changes + +- [#1317](https://github.com/latticexyz/mud/pull/1317) [`3e024fcf`](https://github.com/latticexyz/mud/commit/3e024fcf395a1c1b38d12362fc98472290eb7cf1) Thanks [@holic](https://github.com/holic)! - add retry attempts and more logging to `waitForTransaction` + +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/world@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/block-logs-stream@2.0.0-next.3 + - @latticexyz/protocol-parser@2.0.0-next.3 + - @latticexyz/recs@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index 4c987235c2..659aab999c 100644 --- a/packages/store-sync/package.json +++ b/packages/store-sync/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-sync", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Utilities to sync MUD Store events with a client or cache", "repository": { "type": "git", diff --git a/packages/store/CHANGELOG.md b/packages/store/CHANGELOG.md index 5adb08c8ab..93e91d9ad3 100644 --- a/packages/store/CHANGELOG.md +++ b/packages/store/CHANGELOG.md @@ -1,5 +1,64 @@ # Change Log +## 2.0.0-next.3 + +### Major Changes + +- [#1174](https://github.com/latticexyz/mud/pull/1174) [`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57) Thanks [@alvrs](https://github.com/alvrs)! - All `Store` methods now require the table's value schema to be passed in as an argument instead of loading it from storage. + This decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered). + + ```diff + function setRecord( + bytes32 table, + bytes32[] calldata key, + bytes calldata data, + + Schema valueSchema + ) external; + ``` + + The same diff applies to `getRecord`, `getField`, `setField`, `pushToField`, `popFromField`, `updateInField`, and `deleteRecord`. + + This change only requires changes in downstream projects if the `Store` methods were accessed directly. In most cases it is fully abstracted in the generated table libraries, + so downstream projects only need to regenerate their table libraries after updating MUD. + +- [#1182](https://github.com/latticexyz/mud/pull/1182) [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab) Thanks [@alvrs](https://github.com/alvrs)! - - `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` + + - `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + + - `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed + - The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` + - The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +### Patch Changes + +- [#1303](https://github.com/latticexyz/mud/pull/1303) [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd) Thanks [@dk1a](https://github.com/dk1a)! - Optimize autogenerated table libraries + +- [#1252](https://github.com/latticexyz/mud/pull/1252) [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61) Thanks [@dk1a](https://github.com/dk1a)! - Optimize Schema methods. + Return `uint256` instead of `uint8` in SchemaInstance numFields methods +- Updated dependencies [[`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/gas-report@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Major Changes diff --git a/packages/store/package.json b/packages/store/package.json index ef849f4c3a..101c4de37e 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "Store", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 76e0d719cf..adf661eb3a 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.3 + ## 2.0.0-next.2 ## 2.0.0-next.1 diff --git a/packages/utils/package.json b/packages/utils/package.json index 80bec0be00..740636d00d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/utils", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md index 73410d6e32..b0f228853e 100644 --- a/packages/world/CHANGELOG.md +++ b/packages/world/CHANGELOG.md @@ -1,5 +1,76 @@ # Change Log +## 2.0.0-next.3 + +### Major Changes + +- [#1174](https://github.com/latticexyz/mud/pull/1174) [`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57) Thanks [@alvrs](https://github.com/alvrs)! - All `Store` methods now require the table's value schema to be passed in as an argument instead of loading it from storage. + This decreases gas cost and removes circular dependencies of the Schema table (where it was not possible to write to the Schema table before the Schema table was registered). + + ```diff + function setRecord( + bytes32 table, + bytes32[] calldata key, + bytes calldata data, + + Schema valueSchema + ) external; + ``` + + The same diff applies to `getRecord`, `getField`, `setField`, `pushToField`, `popFromField`, `updateInField`, and `deleteRecord`. + + This change only requires changes in downstream projects if the `Store` methods were accessed directly. In most cases it is fully abstracted in the generated table libraries, + so downstream projects only need to regenerate their table libraries after updating MUD. + +- [#1208](https://github.com/latticexyz/mud/pull/1208) [`c32a9269`](https://github.com/latticexyz/mud/commit/c32a9269a30c1898932ebbf7e3b60e25d1bd884c) Thanks [@alvrs](https://github.com/alvrs)! - - All `World` function selectors that previously had `bytes16 namespace, bytes16 name` arguments now use `bytes32 resourceSelector` instead. + This includes `setRecord`, `setField`, `pushToField`, `popFromField`, `updateInField`, `deleteRecord`, `call`, `grantAccess`, `revokeAccess`, `registerTable`, + `registerStoreHook`, `registerSystemHook`, `registerFunctionSelector`, `registerSystem` and `registerRootFunctionSelector`. + This change aligns the `World` function selectors with the `Store` function selectors, reduces clutter, reduces gas cost and reduces the `World`'s contract size. + + - The `World`'s `registerHook` function is removed. Use `registerStoreHook` or `registerSystemHook` instead. + + - The `deploy` script is updated to integrate the World interface changes + +- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - The `SnapSyncModule` is removed. The recommended way of loading the initial state of a MUD app is via the new [`store-indexer`](https://mud.dev/indexer). Loading state via contract getter functions is not recommended, as it's computationally heavy on the RPC, can't be cached, and is an easy way to shoot yourself in the foot with exploding RPC costs. + + The `@latticexyz/network` package was deprecated and is now removed. All consumers should upgrade to the new sync stack from `@latticexyz/store-sync`. + +- [#1182](https://github.com/latticexyz/mud/pull/1182) [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab) Thanks [@alvrs](https://github.com/alvrs)! - - `Store`'s internal schema table is now a normal table instead of using special code paths. It is renamed to Tables, and the table ID changed from `mudstore:schema` to `mudstore:Tables` + + - `Store`'s `registerSchema` and `setMetadata` are combined into a single `registerTable` method. This means metadata (key names, field names) is immutable and indexers can create tables with this metadata when a new table is registered on-chain. + + ```diff + - function registerSchema(bytes32 table, Schema schema, Schema keySchema) external; + - + - function setMetadata(bytes32 table, string calldata tableName, string[] calldata fieldNames) external; + + + function registerTable( + + bytes32 table, + + Schema keySchema, + + Schema valueSchema, + + string[] calldata keyNames, + + string[] calldata fieldNames + + ) external; + ``` + + - `World`'s `registerTable` method is updated to match the `Store` interface, `setMetadata` is removed + - The `getSchema` method is renamed to `getValueSchema` on all interfaces + ```diff + - function getSchema(bytes32 table) external view returns (Schema schema); + + function getValueSchema(bytes32 table) external view returns (Schema valueSchema); + ``` + - The `store-sync` and `cli` packages are updated to integrate the breaking protocol changes. Downstream projects only need to manually integrate these changes if they access low level `Store` or `World` functions. Otherwise, a fresh deploy with the latest MUD will get you these changes. + +### Patch Changes + +- [#1252](https://github.com/latticexyz/mud/pull/1252) [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61) Thanks [@dk1a](https://github.com/dk1a)! - Optimize Schema methods. + Return `uint256` instead of `uint8` in SchemaInstance numFields methods +- Updated dependencies [[`952cd534`](https://github.com/latticexyz/mud/commit/952cd534447d08e6231ab147ed1cc24fb49bbb57), [`d5b73b12`](https://github.com/latticexyz/mud/commit/d5b73b12666699c442d182ee904fa8747b78fefd), [`afaf2f5f`](https://github.com/latticexyz/mud/commit/afaf2f5ffb36fe389a3aba8da2f6d8c84bdb26ab), [`0d12db8c`](https://github.com/latticexyz/mud/commit/0d12db8c2170905f5116111e6bc417b6dca8eb61), [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1)]: + - @latticexyz/store@2.0.0-next.3 + - @latticexyz/common@2.0.0-next.3 + - @latticexyz/config@2.0.0-next.3 + - @latticexyz/gas-report@2.0.0-next.3 + - @latticexyz/schema-type@2.0.0-next.3 + ## 2.0.0-next.2 ### Patch Changes diff --git a/packages/world/package.json b/packages/world/package.json index 070b6d8f4f..65739270f7 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world", - "version": "2.0.0-next.2", + "version": "2.0.0-next.3", "description": "World framework", "repository": { "type": "git",