Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (next) #2088

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Version Packages (next) #2088

merged 1 commit into from
Jan 23, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 4, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@latticexyz/cli@2.0.0-next.16

Major Changes

  • 57d8965: Separated core systems deployment from CoreModule, and added the systems as arguments to CoreModule

Patch Changes

  • 063daf8: 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.

    +  world.registerNamespace(namespaceId);
       world.registerSystem(systemId, system, true);
    +  world.registerNamespace(namespaceId);
       MyTable.register();
  • Updated dependencies [c6c13f2]

  • Updated dependencies [eaa766e]

  • Updated dependencies [0f27afd]

  • Updated dependencies [865253d]

  • Updated dependencies [e6c03a8]

  • Updated dependencies [c207d35]

  • Updated dependencies [d00c4a9]

  • Updated dependencies [37c228c]

  • Updated dependencies [1bf2e90]

  • Updated dependencies [f6f4028]

  • Updated dependencies [08b4221]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [063daf8]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [2bfee92]

  • Updated dependencies [7b28d32]

  • Updated dependencies [9f8b84e]

  • Updated dependencies [aee8020]

  • Updated dependencies [ad4ac44]

  • Updated dependencies [57d8965]

  • Updated dependencies [e4a6189]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [3ac68ad]

  • Updated dependencies [c642ff3]

  • Updated dependencies [37c228c]

  • Updated dependencies [103f635]

    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/world-modules@2.0.0-next.16
    • @latticexyz/world@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

@latticexyz/world@2.0.0-next.16

Major Changes

  • 0f27afd: World function signatures for namespaced systems have changed from {namespace}_{systemName}_{functionName} to {namespace}__{functionName} (double underscore, no system name). This is more ergonomic and is more consistent with namespaced resources in other parts of the codebase (e.g. MUD config types, table names in the schemaful indexer).

    If you have a project using the namespace key in your mud.config.ts or are manually registering systems and function selectors on a namespace, you will likely need to codegen your system interfaces (pnpm build) and update any calls to these systems through the world's namespaced function signatures.

  • 865253d: Refactored InstalledModules to key modules by addresses instead of pre-defined names. Previously, modules could report arbitrary names, meaning misconfigured modules could be installed under a name intended for another module.

  • 063daf8: 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.

    +  world.registerNamespace(namespaceId);
       world.registerSystem(systemId, system, true);
    +  world.registerNamespace(namespaceId);
       MyTable.register();
  • 57d8965: - Split CoreSystem into AccessManagementSystem, BalanceTransferSystem, BatchCallSystem, CoreRegistrationSystem

    • Changed CoreModule to receive the addresses of these systems as arguments, instead of deploying them
    • Replaced CORE_SYSTEM_ID constant with ACCESS_MANAGEMENT_SYSTEM_ID, BALANCE_TRANSFER_SYSTEM_ID, BATCH_CALL_SYSTEM_ID, CORE_REGISTRATION_SYSTEM_ID, for each respective system

    These changes separate the initcode of CoreModule from the bytecode of core systems, which effectively removes a limit on the total bytecode of all core systems.

  • c642ff3: Namespaces are not allowed to contain double underscores ("__") anymore, as this sequence of characters is used to separate the namespace and function selector in namespaced systems.
    This is to prevent signature clashes of functions in different namespaces.

    (Example: If namespaces were allowed to contain this separator string, a function "function" in namespace "namespace__my" would result in the namespaced function selector "namespace__my__function",
    and would clash with a function "my__function" in namespace "namespace".)

Patch Changes

  • e6c03a8: Renamed the requireNoCallback modifier to prohibitDirectCallback.
  • c207d35: Optimised StoreRegistrationSystem and WorldRegistrationSystem by fetching individual fields instead of entire records where possible.
  • d00c4a9: Removed ROOT_NAMESPACE_STRING and ROOT_NAME_STRING exports in favor of inlining these constants, to avoid reuse as they're meant for internal error messages and debugging.
  • 37c228c: Refactored various files to specify integers in a hex base instead of decimals.
  • f6f4028: Added the WorldContextConsumer interface ID to supportsInterface in the Module contract.
  • 08b4221: Systems are expected to be always called via the central World contract.
    Depending on whether it is a root or non-root system, the call is performed via delegatecall or call.
    Since Systems are expected to be stateless and only interact with the World state, it is not necessary to prevent direct calls to the systems.
    However, since the CoreSystem is known to always be registered as a root system in the World, it is always expected to be delegatecalled,
    so we made this expectation explicit by reverting if it is not delegatecalled.
  • 37c228c: Made the coreModule variable in WorldFactory immutable.
  • 37c228c: Removed the unnecessary extcodesize check from the Create2 library.
  • 37c228c: Refactored ResourceId to use a global Solidity using statement.
  • 37c228c: Refactored EIP165 usages to use the built-in interfaceId property instead of pre-defined constants.
  • 2bfee92: Added a table to track the CoreModule address the world was initialised with.
  • aee8020: Namespace balances can no longer be transferred to non-existent namespaces.
  • e4a6189: Prevented invalid delegations by performing full validation regardless of whether initCallData is empty. Added an unregisterDelegation function which allows explicit unregistration, as opposed of passing in zero bytes into registerDelegation.
  • 37c228c: Refactored various Solidity files to not explicitly initialise variables to zero.
  • 37c228c: Refactored WorldContext to get the world address from WorldContextConsumerLib instead of StoreSwitch.
  • Updated dependencies [c6c13f2]
  • Updated dependencies [e6c03a8]
  • Updated dependencies [37c228c]
  • Updated dependencies [1bf2e90]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [7b28d32]
  • Updated dependencies [9f8b84e]
  • Updated dependencies [ad4ac44]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [3ac68ad]
  • Updated dependencies [37c228c]
  • Updated dependencies [103f635]
    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/common@2.0.0-next.16
    • @latticexyz/config@2.0.0-next.16
    • @latticexyz/schema-type@2.0.0-next.16

@latticexyz/world-modules@2.0.0-next.16

Major Changes

  • 865253d: Refactored InstalledModules to key modules by addresses instead of pre-defined names. Previously, modules could report arbitrary names, meaning misconfigured modules could be installed under a name intended for another module.

Patch Changes

  • eaa766e: Removed IUniqueEntitySystem in favor of calling getUniqueEntity via world.call instead of the world function selector. This had a small gas improvement.

  • 0f27afd: World function signatures for namespaced systems have changed from {namespace}_{systemName}_{functionName} to {namespace}__{functionName} (double underscore, no system name). This is more ergonomic and is more consistent with namespaced resources in other parts of the codebase (e.g. MUD config types, table names in the schemaful indexer).

    If you have a project using the namespace key in your mud.config.ts or are manually registering systems and function selectors on a namespace, you will likely need to codegen your system interfaces (pnpm build) and update any calls to these systems through the world's namespaced function signatures.

  • 063daf8: 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.

    +  world.registerNamespace(namespaceId);
       world.registerSystem(systemId, system, true);
    +  world.registerNamespace(namespaceId);
       MyTable.register();
  • 37c228c: Refactored ResourceId to use a global Solidity using statement.

  • 37c228c: Refactored EIP165 usages to use the built-in interfaceId property instead of pre-defined constants.

  • 37c228c: Refactored various Solidity files to not explicitly initialise variables to zero.

  • Updated dependencies [c6c13f2]

  • Updated dependencies [0f27afd]

  • Updated dependencies [865253d]

  • Updated dependencies [e6c03a8]

  • Updated dependencies [c207d35]

  • Updated dependencies [d00c4a9]

  • Updated dependencies [37c228c]

  • Updated dependencies [1bf2e90]

  • Updated dependencies [f6f4028]

  • Updated dependencies [08b4221]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [063daf8]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [2bfee92]

  • Updated dependencies [7b28d32]

  • Updated dependencies [9f8b84e]

  • Updated dependencies [aee8020]

  • Updated dependencies [ad4ac44]

  • Updated dependencies [57d8965]

  • Updated dependencies [e4a6189]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [37c228c]

  • Updated dependencies [3ac68ad]

  • Updated dependencies [c642ff3]

  • Updated dependencies [37c228c]

  • Updated dependencies [103f635]

    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/world@2.0.0-next.16
    • @latticexyz/common@2.0.0-next.16
    • @latticexyz/config@2.0.0-next.16
    • @latticexyz/schema-type@2.0.0-next.16

@latticexyz/store@2.0.0-next.16

Minor Changes

  • 3ac68ad: Removed allowEmpty option from FieldLayout.validate() as field layouts should never be empty.

  • 103f635: Improved error messages for invalid FieldLayouts

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

Patch Changes

  • c6c13f2: Storage events are now emitted after "before" hooks, so that the resulting logs are now correctly ordered and reflect onchain logic. This resolves issues with store writes and event emissions happening in "before" hooks.

  • e6c03a8: Renamed the requireNoCallback modifier to prohibitDirectCallback.

  • 37c228c: Refactored various files to specify integers in a hex base instead of decimals.

  • 1bf2e90: Updated codegen to not render push and pop methods for static arrays. The length method now returns the hardcoded known length instead of calculating it like with a dynamic array.

  • 37c228c: Refactored ResourceId to use a global Solidity using statement.

  • 37c228c: Refactored EIP165 usages to use the built-in interfaceId property instead of pre-defined constants.

  • 7b28d32: Added a custom error Store_InvalidBounds for when the start:end slice in getDynamicFieldSlice is invalid (it used to revert with the default overflow error)

  • 9f8b84e: Aligned the order of function arguments in the Storage library.

    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)
  • ad4ac44: Added more validation checks for FieldLayout and Schema.

  • 37c228c: Refactored various Solidity files to not explicitly initialise variables to zero.

  • 37c228c: Refactored some Store functions to use a right bit mask instead of left.

  • 37c228c: Simplified a check in Slice.getSubslice.

  • 37c228c: Optimised the Schema.validate function to decrease gas use.

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

@latticexyz/block-logs-stream@2.0.0-next.16

Patch Changes

  • @latticexyz/common@2.0.0-next.16

@latticexyz/common@2.0.0-next.16

Patch Changes

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

@latticexyz/config@2.0.0-next.16

Patch Changes

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

@latticexyz/dev-tools@2.0.0-next.16

Patch Changes

  • Updated dependencies [c6c13f2]
  • Updated dependencies [0f27afd]
  • Updated dependencies [865253d]
  • Updated dependencies [e6c03a8]
  • Updated dependencies [c207d35]
  • Updated dependencies [d00c4a9]
  • Updated dependencies [37c228c]
  • Updated dependencies [1bf2e90]
  • Updated dependencies [f6f4028]
  • Updated dependencies [08b4221]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [063daf8]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [2bfee92]
  • Updated dependencies [a735e14]
  • Updated dependencies [7b28d32]
  • Updated dependencies [9f8b84e]
  • Updated dependencies [aee8020]
  • Updated dependencies [ad4ac44]
  • Updated dependencies [57d8965]
  • Updated dependencies [e4a6189]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [3ac68ad]
  • Updated dependencies [c642ff3]
  • Updated dependencies [37c228c]
  • Updated dependencies [103f635]
    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/world@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

@latticexyz/faucet@2.0.0-next.16

Patch Changes

  • @latticexyz/common@2.0.0-next.16

@latticexyz/phaserx@2.0.0-next.16

Patch Changes

  • @latticexyz/utils@2.0.0-next.16

@latticexyz/protocol-parser@2.0.0-next.16

Patch Changes

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

@latticexyz/react@2.0.0-next.16

Patch Changes

  • Updated dependencies [c6c13f2]
  • Updated dependencies [e6c03a8]
  • Updated dependencies [37c228c]
  • Updated dependencies [1bf2e90]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [7b28d32]
  • Updated dependencies [9f8b84e]
  • Updated dependencies [ad4ac44]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [3ac68ad]
  • Updated dependencies [37c228c]
  • Updated dependencies [103f635]
    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/recs@2.0.0-next.16

@latticexyz/recs@2.0.0-next.16

Patch Changes

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

@latticexyz/store-indexer@2.0.0-next.16

Patch Changes

  • Updated dependencies [c6c13f2]
  • Updated dependencies [e6c03a8]
  • Updated dependencies [37c228c]
  • Updated dependencies [1bf2e90]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [a735e14]
  • Updated dependencies [7b28d32]
  • Updated dependencies [9f8b84e]
  • Updated dependencies [ad4ac44]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [3ac68ad]
  • Updated dependencies [37c228c]
  • Updated dependencies [103f635]
    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/store-sync@2.0.0-next.16
    • @latticexyz/block-logs-stream@2.0.0-next.16
    • @latticexyz/common@2.0.0-next.16
    • @latticexyz/protocol-parser@2.0.0-next.16

@latticexyz/store-sync@2.0.0-next.16

Patch Changes

  • a735e14: Improved syncToZustand speed of hydrating from snapshot by only applying block logs once per block instead of once per log.
  • Updated dependencies [c6c13f2]
  • Updated dependencies [0f27afd]
  • Updated dependencies [865253d]
  • Updated dependencies [e6c03a8]
  • Updated dependencies [c207d35]
  • Updated dependencies [d00c4a9]
  • Updated dependencies [37c228c]
  • Updated dependencies [1bf2e90]
  • Updated dependencies [f6f4028]
  • Updated dependencies [08b4221]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [063daf8]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [2bfee92]
  • Updated dependencies [7b28d32]
  • Updated dependencies [9f8b84e]
  • Updated dependencies [aee8020]
  • Updated dependencies [ad4ac44]
  • Updated dependencies [57d8965]
  • Updated dependencies [e4a6189]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [37c228c]
  • Updated dependencies [3ac68ad]
  • Updated dependencies [c642ff3]
  • Updated dependencies [37c228c]
  • Updated dependencies [103f635]
    • @latticexyz/store@2.0.0-next.16
    • @latticexyz/world@2.0.0-next.16
    • @latticexyz/block-logs-stream@2.0.0-next.16
    • @latticexyz/common@2.0.0-next.16
    • @latticexyz/protocol-parser@2.0.0-next.16
    • @latticexyz/recs@2.0.0-next.16
    • @latticexyz/schema-type@2.0.0-next.16

@latticexyz/abi-ts@2.0.0-next.16

create-mud@2.0.0-next.16

@latticexyz/gas-report@2.0.0-next.16

@latticexyz/noise@2.0.0-next.16

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

@latticexyz/services@2.0.0-next.16

solhint-config-mud@2.0.0-next.16

solhint-plugin-mud@2.0.0-next.16

@latticexyz/utils@2.0.0-next.16

@latticexyz/ecs-browser@2.0.0-next.16

@latticexyz/network@2.0.0-next.16

@latticexyz/solecs@2.0.0-next.16

@latticexyz/std-client@2.0.0-next.16

@latticexyz/std-contracts@2.0.0-next.16

@latticexyz/store-cache@2.0.0-next.16

@yonadaaa yonadaaa merged commit 64611aa into main Jan 23, 2024
1 check passed
@yonadaaa yonadaaa deleted the changeset-release/main branch January 23, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant