code: def recover_chain_id(storage: SQLiteStorage) -> ChainID:
      
      action_init_chain = json.loads(storage.get_state_changes(limit=1, offset=0)[0])
  
      assert action_init_chain['_type'] == 'raiden.transfer.state_change.ActionInitChain'
      return action_init_chain['chain_id']
docs: We can reasonably assume, that any database has only one value for `chain_id` at this point
      in time.