Skip to content

Releases: canvasxyz/canvas

v0.8.11

05 Dec 19:54
Compare
Choose a tag to compare

Changed

  • Fix issues when running multiple instances of the universal replication server on the same discovery topic.

v0.8.5

05 Dec 19:55
Compare
Choose a tag to compare

Changed

  • Fix issues with connection status being incorrectly propagated to the client.

v0.8.2

04 Dec 22:00
Compare
Choose a tag to compare

Fixes a dependency issue.

Changed

  • Use bytesToHex/hexToBytes instead of Buffer in non-polyfilled environments.

v0.8.1

04 Dec 05:04
Compare
Choose a tag to compare

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

03 Dec 07:26
Compare
Choose a tag to compare

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 to app.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

29 Nov 18:41
Compare
Choose a tag to compare

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 of db.table.get() inside the contract

Added

  • Added boolean type to ModelDB
  • Added json type to ModelDB
  • Added useTick() hook

v0.6.1

11 Nov 01:41
Compare
Choose a tag to compare

Changed

  • Add new signers
  • Update signer internals
  • Update libp2p to address some WebRTC peering issues

Added

  • @canvas-js/chain-cosmos
  • @canvas-js/chain-atp
  • @canvas-js/chain-solana
  • @canvas-js/chain-substrate

v0.5.0

27 Oct 16:55
Compare
Choose a tag to compare

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

18 Apr 14:56
Compare
Choose a tag to compare

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.
  • 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.
  • 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 and chainId in action and session payloads have been consolidated into a single CAIP-2 chain identifier chain: 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", ... }
  • As a result, the constructor signature of the chain implementation classes have all changed.
    • EthereumChainImplementation is now constructor(chainId: number, domain: string)
    • SubstrateChainImplementation and SolanaChainImplementation are both constructor(genesisHash: string)
    • CosmosChainImplementation is now constructor(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://...
  • There are changes to the ApplicationData object returned from the root HTTP route.
    • chains is now string[] instead of Record<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

28 Mar 23:59
Compare
Choose a tag to compare

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 a core: 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.