By default, the agent is configured to talk to the main Internet Computer, and verifies responses using a hard-coded public key.
This function will instruct the agent to ask the endpoint for its public key, and use that instead. This is required when talking to a local test instance, for example. Only use this when you are not talking to the main Internet Computer, otherwise you are prone to man-in-the-middle attacks! Do not call this function by default.
I suggest you do:
let a = Agent::builder().[...].unwrap();
agent.fetch_root_key().await?; // only if not talking to mainnet
[...]
a.update(...)