Supplying a blockhash with many method calls

This doesn’t really have anything to do with the client per say, but rather the gRPC API or SDK (C# or any for that matter).

Many methods takes a blockhash as an argument - I assume this is to provide an entry point (point in blockchain time) for the data you wish to retrieve, so if you wish to retrieve info about an account, the blockhash you provide with this call, determines from/at which state of the blockchain the account info should be retrieved… like “what do you want? = account info” - “from when do you want it? = from this-block”…or is the purpose an entirely different one?

Also, getting the latest finalized block is easiest done by calling the GetConsensusStatus method (as it takes no arguments) or something else?

  • Yes, the block hash argument is to determine from what point in time you want the data.
  • GetConsensusStatus is the way to get the last finalized (or best) block.

Thank you.

What is the reason for calling it the “best” block rather than the latest (finalized) ?

The best block is not necessarily the same as the last finalized block. In general the last finalized block is either the best block, or an ancestor of the best block.

Concordium at present has a two layer consensus. The first layer has a Nakamoto style consensus with a “longest chain” rule. The best block refers to this. On top of this there is a finalization layer which marks blocks as finalized.