-
Notifications
You must be signed in to change notification settings - Fork 196
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) #1921
Merged
Merged
Version Packages (next) #1921
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
November 13, 2023 07:02
f4a633f
to
cb9b313
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:20
cb9b313
to
45247db
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:29
45247db
to
0e32c32
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:37
0e32c32
to
55f374a
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:43
55f374a
to
fa0b8ef
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:50
fa0b8ef
to
4f563c8
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 07:55
4f563c8
to
3df6443
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 08:08
3df6443
to
1a5d1b3
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
November 13, 2023 08:14
1a5d1b3
to
07921af
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 10:24
2a370d0
to
8fb6b11
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 10:52
8fb6b11
to
bf10d53
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 12:30
bf10d53
to
571dd25
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 14:39
571dd25
to
790ccda
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 15:48
790ccda
to
350e177
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 2, 2024 15:56
350e177
to
2b74f34
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 11:26
2b74f34
to
c9b36e0
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 14:38
c9b36e0
to
02d33f5
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 14:51
02d33f5
to
92cd707
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 14:58
92cd707
to
c3a588e
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 15:05
c3a588e
to
95b8348
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 17:50
95b8348
to
0241ec0
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
January 3, 2024 17:58
0241ec0
to
a9f5e70
Compare
alvrs
approved these changes
Jan 4, 2024
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/[email protected]
Major Changes
logIndex
of the last update of a record to be able to return the snapshot logs in the order they were emitted onchain.Minor Changes
1b5eb0d: The
findAll
method is now considered deprecated in favor of a newgetLogs
method. This is only implemented in the Postgres indexer for now, with SQLite coming soon. The newgetLogs
method will be an easier and more robust data source to hydrate the client and other indexers and will allow us to add streaming updates from the indexer in the near future.For backwards compatibility,
findAll
is now implemented on top ofgetLogs
, with record key/value decoding done in memory at request time. This may not scale for large databases, so use wisely.e48fb3b: When the Postgres indexer starts up, it will now attempt to detect if the database is outdated and, if so, cleans up all MUD-related schemas and tables before proceeding.
5df1f31: Added
getLogs
query support to sqlite indexer4c1dcd8: - Improved query performance by 10x by moving from drizzle ORM to handcrafted SQL.
trpc
for more granular control over the transport layer.Added an
/api/logs
endpoint using the new query and gzip compression for 40x less data transferred over the wire.Deprecated the
/trpc/getLogs
and/trpc/findAll
endpoints.createIndexerClient
client for the new/api
indexer API exported from@latticexyz/store-sync/indexer-client
.The
createIndexerClient
export from@latticexyz/store-sync/trpc-indexer
is deprecated.f61b4bc: The
/api/logs
indexer endpoint is now returning a404
snapshot not found error when no snapshot is found for the provided filter instead of an empty200
response.Patch Changes
lastUpdatedBlockNumber
at the Postgres SQL query levelPreviously all
debug
logs were going tostderr
, which made it hard to find the unexpected errors.Now
debug
logs go tostdout
and we can add explicitstderr
logs.SENTRY_DNS
environment variable to the postgres indexer.pgBouncer
.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed./api/logs
is now stringifying the filter instead of logging[object Object]
.postgres-decoded
indexer.@latticexyz/[email protected]
Major Changes
504e25d:
lastUpdatedBlockNumber
columns in Postgres storage adapters are no longer nullablee48fb3b: Renamed singleton
chain
table toconfig
table for clarity.85b9461: The postgres indexer is now storing the
logIndex
of the last update of a record to be able to return the snapshot logs in the order they were emitted onchain.a4aff73: Previously, all
store-sync
strategies were susceptible to a potential memory leak where the stream that fetches logs from the RPC would get ahead of the stream that stores the logs in the provided storage adapter. We saw this most often when syncing to remote Postgres servers, where inserting records was much slower than we retrieving them from the RPC. In these cases, the stream would build up a backlog of items until the machine ran out of memory.This is now fixed by waiting for logs to be stored before fetching the next batch of logs from the RPC. To make this strategy work, we no longer return
blockLogs# @latticexyz/store-sync (stream of logs fetched from RPC but before they're stored) and instead just return
storedBlockLogs# @latticexyz/store-sync (stream of logs fetched from RPC after they're stored).1b5eb0d:
syncToPostgres
from@latticexyz/store-sync/postgres
now uses a single table to store all records in their bytes form (staticData
,encodedLengths
, anddynamicData
), more closely mirroring onchain state and enabling more scalability and stability for automatic indexing of many worlds.The previous behavior, where schemaful SQL tables are created and populated for each MUD table, has been moved to a separate
@latticexyz/store-sync/postgres-decoded
export bundle. This approach is considered less stable and is intended to be used for analytics purposes rather than hydrating clients. Some previous metadata columns on these tables have been removed in favor of the bytes records table as the source of truth for onchain state.This overhaul is considered breaking and we recommend starting a fresh database when syncing with either of these strategies.
7b73f44: 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.
Minor Changes
5df1f31: Refactored how we fetch snapshots from an indexer, preferring the new
getLogs
endpoint and falling back to the previousfindAll
if it isn't available. This refactor also prepares for an easier entry point for adding client caching of snapshots.The
initialState
option for various sync methods (syncToPostgres
,syncToRecs
, etc.) is now deprecated in favor ofinitialBlockLogs
. For now, we'll automatically convertinitialState
intoinitialBlockLogs
, but if you want to update your code, you can do:7eabd06: Added and populated
syncProgress
key in Zustand store for sync progress, like we do for RECS sync. This will let apps usingsyncToZustand
render a loading state while initial client hydration is in progress.4c1dcd8: - Improved query performance by 10x by moving from drizzle ORM to handcrafted SQL.
trpc
for more granular control over the transport layer.Added an
/api/logs
endpoint using the new query and gzip compression for 40x less data transferred over the wire.Deprecated the
/trpc/getLogs
and/trpc/findAll
endpoints.createIndexerClient
client for the new/api
indexer API exported from@latticexyz/store-sync/indexer-client
.The
createIndexerClient
export from@latticexyz/store-sync/trpc-indexer
is deprecated.Patch Changes
Previously all
debug
logs were going tostderr
, which made it hard to find the unexpected errors.Now
debug
logs go tostdout
and we can add explicitstderr
logs.createStoreSync
now correctly creates table registration logs from indexer records..d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.postgres-decoded
storage adapter@latticexyz/[email protected]
Minor Changes
mud build
command that generates table libraries, system interfaces, and typed ABIs.Patch Changes
mud set-version --link
will no longer attempt to fetch the latest version from npm.IWorld.sol
interface (a workaround forforge build
with extra output files doesn't re-run for cached files foundry-rs/foundry#6241)debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.@latticexyz/[email protected]
Minor Changes
1b5eb0d: Added
unique
andgroupBy
array helpers to@latticexyz/common/utils
.4c1dcd8: - Added a
Result<Ok, Err>
type for more explicit and typesafe error handling (inspired by Rust).includes
util as typesafe alternative toArray.prototype.includes()
.5df1f31: Updated
chunk
types to use readonly arraysPatch Changes
stdout
instead ofstderr
..d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.[email protected]
Minor Changes
window
global in vanilla JS template with an event listener on the button.Patch Changes
.gitignore
files@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.sendTransaction
, which does a better of managing nonces for higher volumes of transactions.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.useComponentValue
would not detect a change and re-render if the component value was immediately removed.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
slice4
function tobytes4
.mud.config.ts
source file was not included in the package, causing TS errors downstream..d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.StoreCore
to passpreviousEncodedLengths
intoonBeforeSpliceDynamicData
.debug
util to pipe tostdout
and added an additional util to explicitly pipe tostderr
when needed.It only affected external use of
Storage.load
with amemoryPointer
argumentstore
andworld
packages.@latticexyz/[email protected]
Patch Changes
.d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.@latticexyz/[email protected]
Patch Changes
mud.config.ts
source file was not included in the package, causing TS errors downstream.internal
visibility to thecoreSystem
variable inCoreModule
.requireInterface
to correctly specify ERC165.isInstalled
andrequireNotInstalled
helpers toModule
base contract.World
now correctly registers theFunctionSignatures
table..d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.store
andworld
packages.@latticexyz/[email protected]
Patch Changes
isInstalled
andrequireNotInstalled
helpers toModule
base contract..d.ts
type definition files for better compatibility when using MUD withmoduleResolution
set tobundler
ornode16
and fixes issues around missing type declarations for dependent packages.tokenAddress
[email protected]
[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]
@latticexyz/[email protected]