-
Notifications
You must be signed in to change notification settings - Fork 185
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
Version Packages (next) #2088
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 4, 2024 17:19
a564672
to
8f84efd
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 8, 2024 13:37
8f84efd
to
46515f4
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 8, 2024 13:45
46515f4
to
fe6f227
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 8, 2024 13:52
fe6f227
to
a064152
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 8, 2024 13:59
a064152
to
9147a9e
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 10, 2024 17:59
9147a9e
to
e595bd1
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 09:37
e595bd1
to
d8dcbc2
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 09:53
d8dcbc2
to
0686f8d
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 11:35
0686f8d
to
2fddd45
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 11:46
2fddd45
to
2373c6a
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 12:16
2373c6a
to
67eb2cb
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 14:42
67eb2cb
to
cf98eaa
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 14:50
cf98eaa
to
1d7a071
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 11, 2024 14:57
1d7a071
to
25baf4d
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 18, 2024 17:36
57ea8ff
to
4e213b0
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 18, 2024 19:06
4e213b0
to
57b4a14
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 19, 2024 13:09
57b4a14
to
e9a4684
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 19, 2024 13:17
e9a4684
to
af4ca1d
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 19, 2024 14:13
af4ca1d
to
91fdc0e
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 19, 2024 15:09
91fdc0e
to
9c28b75
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 19:21
9c28b75
to
fa2e8a0
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 19:43
fa2e8a0
to
271ded8
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 20:30
271ded8
to
610b710
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 20:39
610b710
to
3d0dee4
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 20:55
3d0dee4
to
e6b73e6
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 22, 2024 21:11
e6b73e6
to
54f518b
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 23, 2024 14:47
54f518b
to
1cc85c0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, runchangeset pre exit
onmain
.Releases
@latticexyz/cli@2.0.0-next.16
Major Changes
CoreModule
, and added the systems as arguments toCoreModule
Patch Changes
063daf8: Previously
registerSystem
andregisterTable
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
andregisterTable
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/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 yourmud.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
andregisterTable
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
andregisterTable
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
intoAccessManagementSystem
,BalanceTransferSystem
,BatchCallSystem
,CoreRegistrationSystem
CoreModule
to receive the addresses of these systems as arguments, instead of deploying themCORE_SYSTEM_ID
constant withACCESS_MANAGEMENT_SYSTEM_ID
,BALANCE_TRANSFER_SYSTEM_ID
,BATCH_CALL_SYSTEM_ID
,CORE_REGISTRATION_SYSTEM_ID
, for each respective systemThese 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
requireNoCallback
modifier toprohibitDirectCallback
.StoreRegistrationSystem
andWorldRegistrationSystem
by fetching individual fields instead of entire records where possible.ROOT_NAMESPACE_STRING
andROOT_NAME_STRING
exports in favor of inlining these constants, to avoid reuse as they're meant for internal error messages and debugging.supportsInterface
in the Module contract.Depending on whether it is a root or non-root system, the call is performed via
delegatecall
orcall
.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.
coreModule
variable inWorldFactory
immutable.extcodesize
check from theCreate2
library.ResourceId
to use a global Solidityusing
statement.CoreModule
address the world was initialised with.initCallData
is empty. Added anunregisterDelegation
function which allows explicit unregistration, as opposed of passing in zero bytes intoregisterDelegation
.WorldContext
to get the world address fromWorldContextConsumerLib
instead ofStoreSwitch
.@latticexyz/world-modules@2.0.0-next.16
Major Changes
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 callinggetUniqueEntity
viaworld.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 yourmud.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
andregisterTable
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
andregisterTable
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 Solidityusing
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
Minor Changes
3ac68ad: Removed
allowEmpty
option fromFieldLayout.validate()
as field layouts should never be empty.103f635: Improved error messages for invalid
FieldLayout
sPatch 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 toprohibitDirectCallback
.37c228c: Refactored various files to specify integers in a hex base instead of decimals.
1bf2e90: Updated codegen to not render
push
andpop
methods for static arrays. Thelength
method now returns the hardcoded known length instead of calculating it like with a dynamic array.37c228c: Refactored
ResourceId
to use a global Solidityusing
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 thestart:end
slice ingetDynamicFieldSlice
is invalid (it used to revert with the default overflow error)9f8b84e: Aligned the order of function arguments in the
Storage
library.ad4ac44: Added more validation checks for
FieldLayout
andSchema
.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/block-logs-stream@2.0.0-next.16
Patch Changes
@latticexyz/common@2.0.0-next.16
Patch Changes
@latticexyz/config@2.0.0-next.16
Patch Changes
@latticexyz/dev-tools@2.0.0-next.16
Patch Changes
@latticexyz/faucet@2.0.0-next.16
Patch Changes
@latticexyz/phaserx@2.0.0-next.16
Patch Changes
@latticexyz/protocol-parser@2.0.0-next.16
Patch Changes
@latticexyz/react@2.0.0-next.16
Patch Changes
@latticexyz/recs@2.0.0-next.16
Patch Changes
@latticexyz/store-indexer@2.0.0-next.16
Patch Changes
@latticexyz/store-sync@2.0.0-next.16
Patch Changes
syncToZustand
speed of hydrating from snapshot by only applying block logs once per block instead of once per log.@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