Skip to content

v0.16.0

Choose a tag to compare

@sinzii sinzii released this 08 Sep 03:32
· 87 commits to main since this release

👋 Hey everyone,

We’re happy to announce that Dedot v0.16.0 has just been released with new features and bug fixes:

  1. The Archive JSON-RPCs are officially integrated into DedotClient. Now we can query historical data via client.at when connecting to an archive node. Please keep in mind that the smoldot light-client does not support this archive JSON-RPC API, so if you want to query historical data, make sure to connect to an RPC archive node.

  2. Dedot’s internal caching now uses LRU caching with a controlled maximum capacity. This significantly reduces memory consumption when running Dedot in long-running tasks and querying historical data heavily.

  3. The clients now expose a .clearCache() method, allowing you to manually clear the internal cache if you want to keep memory consumption minimal.

Even though memory usage is now reduced and controlled by the LRU cache, this will also help if you want to clear the cache manually as needed.

Please keep in mind that this will also clear the cached metadata if you enabled metadata caching (via the cacheMetadata option). If you wish to keep the metadata cache while clearing others, we added a keepMetadataCache: boolean parameter to this method to allow that (e.g: calling .clearCache(true))

  1. The ChainApi interface now includes references to some known types of the chain (Address, RuntimeCall, Signature…), making it easier to enable more type inference for chain interaction within the clients. For example, the returned extrinsic is now fully typed after being decoded via client.registry.$Extrinsic.tryDecode. To make this work, make sure to regenerate your chain types via Dedot’s CLI or bump the @dedot/chaintypes package to the latest version 0.152.0.

  2. The atBlockHash from the ISubstrateClientAt interface is now non-optional (non-undefined), so you don’t have to handle TypeScript complaints when accessing atBlockHash via client.at instances.

  3. Fixed duplicated type names when generating chain types for some chains, e.g., Bittensor.

We’d like to give a huge shoutout to Moose (@antlerminator) for providing great feedback and reporting issues. Most of the features and fixes in this release are based on his feedback. We really appreciate his contributions 🙏.

We understand there are still things we need to work on to improve Dedot, and we’ll keep continue doing that and deliver in the next release.

That’s it for now! As always, let us know if you have any feedback or run into issues. We’re here to assist along the way!

What's Changed

  • feat(api): archive json-rpc integration by @sinzii in #573
  • fix(api): make ISubstrateClientAt.atBlockHash prop non-optional by @sinzii in #575
  • chore: improve IStorage JSDoc by @sinzii in #576
  • feat(chainHead): clearCache manually by @sinzii in #577
  • fix: add LRU caching, improve overall memory consumption by @sinzii in #578
  • fix(codegen): duplicated type names by @sinzii in #580
  • fix: remove console warn by @sinzii in #586
  • chore: bump versions by @sinzii in #587
  • feat: add known chain types by @sinzii in #588

Full Changelog: v0.15.2...v0.16.0