Releases: canvasxyz/canvas
Releases · canvasxyz/canvas
v0.8.11
v0.8.5
v0.8.2
v0.8.1
Stability improvements.
Changed
- Rebroadcast the session along with every action over pubsub
- Allow actions with missing parents to be applied if history indexing is off
- Change
app.connections
to a mapping of PeerIDs to detailed information about the peer, including connection status and whether that peer is subscribed to the application topic - Ping peers to detect if we have a valid connection
- Maintain
app.status
which tracks if there is at least one online connection, subscribed to the application topic
v0.7.2
Stability improvements.
Changed
- Prevent multiple tabs from trying to use the same PeerId
- Prevent locks for Merkle sync from being held indefinitely
- Reduce GossipSub penalties for misbehaving peers
- Default to using browser-to-server WebSocket transport; only use browser-to-browser WebRTC if
enableWebRTC: true
is set in the config- You should use WebSocket for production applications now.
- Note that using WebSocket means you must use a replication server (i.e.
canvas cli
or another persistent node in the cloud). See below for a universal solution to this.
- Applications now start libp2p automatically
app.start/stop()
have been moved toapp.libp2p.start/stop()
but are no longer needed.
- Adds a
heartbeat
message type, in preparation for live presence support.
Added
@canvas-js/replication-server
: A universal replication server that watches a discovery topic and saves and replicates all actions on all topics broadcast to it.- If you configure any application with the universal replication server's discovery topic, the application will automatically be replicated.
v0.7.0
Changed
- Add active peer discovery to
@canvas-js/discovery
. Applications can configure a peer discovery topic, where clients will broadcast a regular heartbeat. The same peer discovery topic can be shared across Canvas applications, for e.g. a network of chat rooms - Unified syntax for database accessors. We now use
db.get("table")
everywhere instead ofdb.table.get()
inside the contract
Added
- Added
boolean
type to ModelDB - Added
json
type to ModelDB - Added
useTick()
hook
v0.6.1
v0.5.0
Changed
- Rewrite the entire framework! 🎉
- Add causal graph structure to the action log
- Separate ModelDB and GossipLog into standalone packages
- New basic data structures using the IPLD data model
- New
SessionSigner
interface - Use WebRTC for direct browser-to-browser peering
- Support
db.get
inside contracts via history indexing
Added
New packages:
@canvas-js/signed-cid
@canvas-js/modeldb
@canvas-js/gossiplog
@canvas-js/discovery
@canvas-js/templates
@canvas-js/vm
v0.4.0
This release brings some breaking changes to the message payload formats, migrating to CAIP-2 identifiers everywhere, and some major networking upgrades!
What's new
- Specs now declare exactly which chains they support using an
export const chains: string[]
export.- If one isn't declared, it defaults to
["eip155:1"]
(Ethereum mainnet only). - Applying a message will throw an error if the message is signed for a chain not declared in the
chains
array. - You must provide a chain implementation for every chain declared in the spec to
Core.initialize
.
- If one isn't declared, it defaults to
- Ethereum session signatures now use SIWE instead of EIP-712. This should be transparent to users, but is a breaking change to the signature generation and verification.
- The subject URI of the SIWE message is
ethereum:${sessionAddress}
. - The
ipfs://Qm...
URI of the app is given as the only resource URI. - Ethereum session signatures are now a 3-tuple string format
${domain}/${nonce}/${signatureBytes}
so that the SIWE message text can be deterministically reconstructed by verifiers.
- The subject URI of the SIWE message is
- major libp2p upgrades resulting in faster peer discovery times and more reliable connections. Many thanks to the libp2p team for responding quickly to some bugs we found!
- More organized and colorful logging :)
Breaking changes
appName
has been removed from specs and message payloads.chain
andchainId
in action and session payloads have been consolidated into a single CAIP-2 chain identifierchain: string
. CAIP is a great project dedicated to solving cross-chain identifier formats better than we could have.- Before:
{ chain: "ethereum", chainId: "1", ... }
- After:
{ chain: "eip155:1", ... }
- Before:
- As a result, the constructor signature of the chain implementation classes have all changed.
EthereumChainImplementation
is nowconstructor(chainId: number, domain: string)
SubstrateChainImplementation
andSolanaChainImplementation
are bothconstructor(genesisHash: string)
CosmosChainImplementation
is nowconstructor(chainId: string, bech32Prefix: string)
Upgrade guide
The user-facing changes in this release are
- Update the constructor of your chain implementations. For example, if you're creating a
EthereumChainImplementation
, you have to pass it a number instead of a string. - A new way to pass Ethereum RPC URLs to the CLI
- Before:
--chain-rpc ethereum 1 http://...
- After:
--chain eip155:1=http://...
- Before:
- There are changes to the
ApplicationData
object returned from the root HTTP route.chains
is nowstring[]
instead ofRecord<string, string[]>
.
- Multi-chain apps now have to declare their specific set of supported chains using the
export const chains = [ ... ]
export with CAIP-2 identifiers.
v0.3.0
This release lands support for running Canvas apps entirely in the browser, along with improvements to the underlying libp2p networking stack!
What's New
@canvas-js/core
can be bundled and imported from the browser. Browser cores use IndexedDB for persisting messages, and an in-memory WASM SQLite database for the model store. You can provide acore: Core
instance directly to the<Canvas />
element instead of a host API URL, and use the rest of the hooks exactly the same way. See the example in examples/chat-browser!- Upgrade to libp2p v0.43.0 with the new Circuit Relay v2 implementation
Breaking Changes
- The
--listen
CLI argument is now a string /ws multiaddr, not a port number. This makes it possible to control the network interface in addition to the port. - The WebSocket API has been redesigned as a more minimal server-to-client event stream.
- The
ApplicationData
interface has been updated to include peering and merkle root metadata.