dfinity / nns-dapp

The Dapp of the Internet Computer's Network Nervous System.
https://nns.ic0.app/
Other
112 stars 38 forks source link

FOLLOW-1337: Disable FORCE_CALL_STRATEGY #5376

Closed dskloetd closed 2 months ago

dskloetd commented 2 months ago

Motivation

FORCE_CALL_STRATEGY is currently used to limit the number of update calls made to the Internet Computer for certain cases. We want to stop doing this to avoid the possibility of displaying incorrect data from a malicious node.

Changes

Change FORCE_CALL_STRATEGY from "query" to undefined. This makes sure we do a query and update in all the places where FORCE_CALL_STRATEGY is used.

Tests

  1. Fixed an e2e test which got broken because some caching started working again because it only caches certified results.
  2. Other existing tests pass (FORCE_CALL_STRATEGY was still set to undefined by default in unit tests).
  3. Temporarily added some logging to manually test that 2 requests are made to load account balances.

Todos

dskloetd commented 2 months ago

LGTM. What do you think—how safe is it to deploy two pretty big changes within a single release (this and agent-js 2)?

Let's be a bit more thorough in the manual testing of the next RC. The changes seem orthogonal so I see not reason to do them separately.