@hyperbridge/sdk 2.8.6 → 2.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7991,7 +7991,15 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
7991
7991
  if (!this.httpApi) {
7992
7992
  const httpUrl = deriveHttpUrl(this.wsEndpoint());
7993
7993
  const api = new ApiPromise({
7994
- provider: new HttpProvider(httpUrl),
7994
+ // Response cache off (third argument, capacity 0). polkadot-js caches every request that
7995
+ // names a block hash — `chain_getHeader(hash)`, `state_getRuntimeVersion(hash)`, storage
7996
+ // reads at a hash — by storing the request promise itself, a rejected one included, for a
7997
+ // 30s TTL that every hit refreshes. The phantom poll retries the block it failed on with
7998
+ // identical parameters every tick, so one reset connection became the same rejection
7999
+ // replayed from memory on every tick, faster than the TTL could lapse, and the node never
8000
+ // saw a second request. The cache bought nothing here anyway: the poll reads each block
8001
+ // once, and `api.at(hash)` reuses registries at the api layer regardless.
8002
+ provider: new HttpProvider(httpUrl, {}, 0),
7995
8003
  typesBundle: HYPERBRIDGE_TYPES_BUNDLE,
7996
8004
  // A second connection to the node the ws api already reported on; its init warnings
7997
8005
  // would just be duplicates.