Problem
activation-service fails with 1010: Invalid Transaction: Transaction has a bad signature after a TFChain runtime upgrade, requiring a manual Docker restart to recover.
Root cause: tfgrid-api-client calls ApiPromise.create({ provider, types }) once at startup. The @polkadot/api instance caches the runtime specVersion at init time and uses it when building transaction signing payloads. After a runtime upgrade:
specVersion bumps on-chain
- The API's cached version is stale
- Signed transactions carry the old
specVersion → node rejects with bad signature
Additionally, the static types.json becomes a drift risk: any structural type change in the runtime is not reflected until the package is manually updated and redeployed.