What’s Changed
FetchRootKey
- refactors logic so that fetchrootkey is awaited before the first async call is made if
shouldFetchRootKey
is set. This resolves potential race conditions during local development
ReadState Expiry Rollback
- rolls back an intermittent bug introduced in v2.1.3, where a re-used readstate request would be sent with a mismatching ingress_expiry for a re-used signature. Should reduce the frequency of Invalid Signature errors. An improved strategy will be released in a future update
SyncTime
- HttpAgent now uses an anonymous identity for syncTime calls, which the replica will allow to have an invalid ingress_expiry provided. This (at last) allows clients with clocks diverging by >5 minutes to sync their time with the replica and behave normally
Enhanced Errors
- HttpAgent Errors now include more useful information when thrown, including the signature, the request id, the public key, and a stack trace. The agent’s ObservableLog utility is now also exported, and can be used for testing or independently. Reminder that the log exists! You can subscribe to events in the agent, and it is helpful for debugging.
Release notes are here: Release Release 2.3.0 · dfinity/agent-js · GitHub