Skip to content

Commit

Permalink
Version Packages (next)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 11, 2024
1 parent 103f635 commit 25baf4d
Show file tree
Hide file tree
Showing 63 changed files with 452 additions and 37 deletions.
7 changes: 6 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"fifty-squids-eat",
"fifty-suits-itch",
"fifty-suits-shout",
"five-emus-battle",
"flat-trainers-marry",
"fluffy-days-carry",
"fluffy-moles-march",
Expand Down Expand Up @@ -133,6 +134,7 @@
"large-sloths-camp",
"late-cobras-ring",
"late-geese-guess",
"late-rats-hide",
"late-spies-cover",
"lazy-ladybugs-return",
"lemon-zoos-mate",
Expand All @@ -157,6 +159,7 @@
"mighty-eels-type",
"mighty-years-whisper",
"modern-bikes-build",
"modern-brooms-rule",
"modern-hornets-jam",
"modern-stingrays-kneel",
"modern-trains-remain",
Expand Down Expand Up @@ -188,6 +191,7 @@
"poor-waves-occur",
"popular-coins-invent",
"pretty-hotels-drop",
"pretty-toys-rescue",
"proud-insects-perform",
"proud-turkeys-compete",
"purple-ghosts-hear",
Expand Down Expand Up @@ -309,6 +313,7 @@
"witty-tigers-rest",
"yellow-bags-learn",
"young-crabs-rest",
"young-pandas-explode"
"young-pandas-explode",
"young-poets-beam"
]
}
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
## Version 2.0.0-next.16

Release date: Thu Jan 11 2024

### Major changes

**[feat(world): require namespace to exist before registering systems/tables in it [C-01] (#2007)](https://github.com/latticexyz/mud/commit/063daf80ef9aa9151903061fc7d80c170a96cb07)** (@latticexyz/cli, @latticexyz/world-modules, @latticexyz/world)

Previously `registerSystem` and `registerTable` had a side effect of registering namespaces if the system or table's namespace didn't exist yet.
This caused a possible frontrunning issue, where an attacker could detect a `registerSystem`/`registerTable` transaction in the mempool,
insert a `registerNamespace` transaction before it, grant themselves access to the namespace, transfer ownership of the namespace to the victim,
so that the `registerSystem`/`registerTable` transactions still went through successfully.
To mitigate this issue, the side effect of registering a namespace in `registerSystem` and `registerTable` has been removed.
Calls to these functions now expect the respective namespace to exist and the caller to own the namespace, otherwise they revert.

Changes in consuming projects are only necessary if tables or systems are registered manually.
If only the MUD deployer is used to register tables and systems, no changes are necessary, as the MUD deployer has been updated accordingly.

```diff
+ world.registerNamespace(namespaceId);
world.registerSystem(systemId, system, true);
```

```diff
+ world.registerNamespace(namespaceId);
MyTable.register();
```

**[feat(store-indexer, store-sync): improve query performance and enable compression, add new api (#2026)](https://github.com/latticexyz/mud/commit/4c1dcd81eae44c37f66bd80871daf02834c04fb5)** (@latticexyz/store-sync)

Postgres storage adapter now uses snake case for decoded table names and column names. This allows for better SQL ergonomics when querying these tables.

To avoid naming conflicts for now, schemas are still case-sensitive and need to be queried with double quotes. We may change this in the future with [namespace validation](https://github.com/latticexyz/mud/issues/1991).

### Minor changes

**[feat(store): improve FieldLayout errors [N-03] (#2114)](https://github.com/latticexyz/mud/commit/103f635ebc20ac1aecc5c526c4bcb928e860a7ed)** (@latticexyz/store)

Improved error messages for invalid `FieldLayout`s

```diff
-error FieldLayoutLib_InvalidLength(uint256 length);
+error FieldLayoutLib_TooManyFields(uint256 numFields, uint256 maxFields);
+error FieldLayoutLib_TooManyDynamicFields(uint256 numFields, uint256 maxFields);
+error FieldLayoutLib_Empty();
```

### Patch changes

**[refactor(world): use \_getSystem when fetching system addresses [N-11] (#2022)](https://github.com/latticexyz/mud/commit/c207d35e822afe5f04225d6854fb039116cc7840)** (@latticexyz/world)

Optimised `StoreRegistrationSystem` and `WorldRegistrationSystem` by fetching individual fields instead of entire records where possible.

**[fix(world): module supports world context consumer id [L-12] (#2032)](https://github.com/latticexyz/mud/commit/f6f402896d8256da3b868f865a960db68393caf4)** (@latticexyz/world)

Added the WorldContextConsumer interface ID to `supportsInterface` in the Module contract.

**[refactor(store): order load function arguments [N-02] (#2033)](https://github.com/latticexyz/mud/commit/9f8b84e733412323103fdd81067f8edc9d681a17)** (@latticexyz/store)

Aligned the order of function arguments in the `Storage` library.

```solidity
store(uint256 storagePointer, uint256 offset, bytes memory data)
store(uint256 storagePointer, uint256 offset, uint256 length, uint256 memoryPointer)
load(uint256 storagePointer, uint256 offset, uint256 length)
load(uint256 storagePointer, uint256 offset, uint256 length, uint256 memoryPointer)
```

---

## Version 2.0.0-next.15

Release date: Wed Jan 03 2024
Expand Down
70 changes: 70 additions & 0 deletions docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
## Version 2.0.0-next.16

Release date: Thu Jan 11 2024

### Major changes

**[feat(world): require namespace to exist before registering systems/tables in it [C-01] (#2007)](https://github.com/latticexyz/mud/commit/063daf80ef9aa9151903061fc7d80c170a96cb07)** (@latticexyz/cli, @latticexyz/world-modules, @latticexyz/world)

Previously `registerSystem` and `registerTable` had a side effect of registering namespaces if the system or table's namespace didn't exist yet.
This caused a possible frontrunning issue, where an attacker could detect a `registerSystem`/`registerTable` transaction in the mempool,
insert a `registerNamespace` transaction before it, grant themselves access to the namespace, transfer ownership of the namespace to the victim,
so that the `registerSystem`/`registerTable` transactions still went through successfully.
To mitigate this issue, the side effect of registering a namespace in `registerSystem` and `registerTable` has been removed.
Calls to these functions now expect the respective namespace to exist and the caller to own the namespace, otherwise they revert.

Changes in consuming projects are only necessary if tables or systems are registered manually.
If only the MUD deployer is used to register tables and systems, no changes are necessary, as the MUD deployer has been updated accordingly.

```diff
+ world.registerNamespace(namespaceId);
world.registerSystem(systemId, system, true);
```

```diff
+ world.registerNamespace(namespaceId);
MyTable.register();
```

**[feat(store-indexer, store-sync): improve query performance and enable compression, add new api (#2026)](https://github.com/latticexyz/mud/commit/4c1dcd81eae44c37f66bd80871daf02834c04fb5)** (@latticexyz/store-sync)

Postgres storage adapter now uses snake case for decoded table names and column names. This allows for better SQL ergonomics when querying these tables.

To avoid naming conflicts for now, schemas are still case-sensitive and need to be queried with double quotes. We may change this in the future with [namespace validation](https://github.com/latticexyz/mud/issues/1991).

### Minor changes

**[feat(store): improve FieldLayout errors [N-03] (#2114)](https://github.com/latticexyz/mud/commit/103f635ebc20ac1aecc5c526c4bcb928e860a7ed)** (@latticexyz/store)

Improved error messages for invalid `FieldLayout`s

```diff
-error FieldLayoutLib_InvalidLength(uint256 length);
+error FieldLayoutLib_TooManyFields(uint256 numFields, uint256 maxFields);
+error FieldLayoutLib_TooManyDynamicFields(uint256 numFields, uint256 maxFields);
+error FieldLayoutLib_Empty();
```

### Patch changes

**[refactor(world): use \_getSystem when fetching system addresses [N-11] (#2022)](https://github.com/latticexyz/mud/commit/c207d35e822afe5f04225d6854fb039116cc7840)** (@latticexyz/world)

Optimised `StoreRegistrationSystem` and `WorldRegistrationSystem` by fetching individual fields instead of entire records where possible.

**[fix(world): module supports world context consumer id [L-12] (#2032)](https://github.com/latticexyz/mud/commit/f6f402896d8256da3b868f865a960db68393caf4)** (@latticexyz/world)

Added the WorldContextConsumer interface ID to `supportsInterface` in the Module contract.

**[refactor(store): order load function arguments [N-02] (#2033)](https://github.com/latticexyz/mud/commit/9f8b84e733412323103fdd81067f8edc9d681a17)** (@latticexyz/store)

Aligned the order of function arguments in the `Storage` library.

```solidity
store(uint256 storagePointer, uint256 offset, bytes memory data)
store(uint256 storagePointer, uint256 offset, uint256 length, uint256 memoryPointer)
load(uint256 storagePointer, uint256 offset, uint256 length)
load(uint256 storagePointer, uint256 offset, uint256 length, uint256 memoryPointer)
```

---

## Version 2.0.0-next.15

Release date: Wed Jan 03 2024
Expand Down
2 changes: 2 additions & 0 deletions packages/abi-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @latticexyz/abi-ts

## 2.0.0-next.16

## 2.0.0-next.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/abi-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/abi-ts",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Create TypeScript type declaration files (`.d.ts`) for your ABI JSON files.",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/block-logs-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @latticexyz/block-logs-stream

## 2.0.0-next.16

### Patch Changes

- @latticexyz/common@2.0.0-next.16

## 2.0.0-next.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/block-logs-stream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/block-logs-stream",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Create a stream of EVM block logs for events",
"repository": {
"type": "git",
Expand Down
41 changes: 41 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Change Log

## 2.0.0-next.16

### Patch Changes

- 063daf80: Previously `registerSystem` and `registerTable` had a side effect of registering namespaces if the system or table's namespace didn't exist yet.
This caused a possible frontrunning issue, where an attacker could detect a `registerSystem`/`registerTable` transaction in the mempool,
insert a `registerNamespace` transaction before it, grant themselves access to the namespace, transfer ownership of the namespace to the victim,
so that the `registerSystem`/`registerTable` transactions still went through successfully.
To mitigate this issue, the side effect of registering a namespace in `registerSystem` and `registerTable` has been removed.
Calls to these functions now expect the respective namespace to exist and the caller to own the namespace, otherwise they revert.

Changes in consuming projects are only necessary if tables or systems are registered manually.
If only the MUD deployer is used to register tables and systems, no changes are necessary, as the MUD deployer has been updated accordingly.

```diff
+ world.registerNamespace(namespaceId);
world.registerSystem(systemId, system, true);
```

```diff
+ world.registerNamespace(namespaceId);
MyTable.register();
```

- Updated dependencies [c207d35e]
- Updated dependencies [f6f40289]
- Updated dependencies [063daf80]
- Updated dependencies [9f8b84e7]
- Updated dependencies [103f635e]
- @latticexyz/world@2.0.0-next.16
- @latticexyz/world-modules@2.0.0-next.16
- @latticexyz/store@2.0.0-next.16
- @latticexyz/abi-ts@2.0.0-next.16
- @latticexyz/common@2.0.0-next.16
- @latticexyz/config@2.0.0-next.16
- @latticexyz/gas-report@2.0.0-next.16
- @latticexyz/protocol-parser@2.0.0-next.16
- @latticexyz/schema-type@2.0.0-next.16
- @latticexyz/services@2.0.0-next.16
- @latticexyz/utils@2.0.0-next.16

## 2.0.0-next.15

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/cli",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Command line interface for mud",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 2.0.0-next.16

### Patch Changes

- @latticexyz/schema-type@2.0.0-next.16

## 2.0.0-next.15

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/common",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Common low level logic shared between packages",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 2.0.0-next.16

### Patch Changes

- @latticexyz/common@2.0.0-next.16
- @latticexyz/schema-type@2.0.0-next.16

## 2.0.0-next.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/config",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Config for Store and World",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions packages/create-mud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change Log

## 2.0.0-next.16

## 2.0.0-next.15

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/create-mud/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-mud",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "Create a new MUD project",
"license": "MIT",
"author": "Lattice <[email protected]>",
Expand Down
18 changes: 18 additions & 0 deletions packages/dev-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @latticexyz/dev-tools

## 2.0.0-next.16

### Patch Changes

- Updated dependencies [c207d35e]
- Updated dependencies [f6f40289]
- Updated dependencies [063daf80]
- Updated dependencies [9f8b84e7]
- Updated dependencies [103f635e]
- @latticexyz/world@2.0.0-next.16
- @latticexyz/store@2.0.0-next.16
- @latticexyz/store-sync@2.0.0-next.16
- @latticexyz/react@2.0.0-next.16
- @latticexyz/common@2.0.0-next.16
- @latticexyz/recs@2.0.0-next.16
- @latticexyz/schema-type@2.0.0-next.16
- @latticexyz/utils@2.0.0-next.16

## 2.0.0-next.15

### Patch Changes
Expand Down
14 changes: 7 additions & 7 deletions packages/dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/dev-tools",
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"description": "MUD developer tools",
"repository": {
"type": "git",
Expand Down Expand Up @@ -51,12 +51,12 @@
"vitest": "0.31.4"
},
"peerDependencies": {
"@latticexyz/common": "2.0.0-next.15",
"@latticexyz/recs": "2.0.0-next.15",
"@latticexyz/store": "2.0.0-next.15",
"@latticexyz/store-sync": "2.0.0-next.15",
"@latticexyz/utils": "2.0.0-next.15",
"@latticexyz/world": "2.0.0-next.15"
"@latticexyz/common": "2.0.0-next.16",
"@latticexyz/recs": "2.0.0-next.16",
"@latticexyz/store": "2.0.0-next.16",
"@latticexyz/store-sync": "2.0.0-next.16",
"@latticexyz/utils": "2.0.0-next.16",
"@latticexyz/world": "2.0.0-next.16"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 2 additions & 0 deletions packages/ecs-browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @latticexyz/ecs-browser

## 2.0.0-next.16

## 2.0.0-next.15

## 2.0.0-next.14
Expand Down
Loading

0 comments on commit 25baf4d

Please sign in to comment.