Raw queries are much cheaper than smart queries, as they access the storage directly. Every time a query returns an umodified value from the store, it could in principle be done through a raw query.
Since raw queries have their own problems (no encapsulation, become part of the public API, requires care, migrations, etc.) let's use them only when / if convenient. By example, when querying something regularly at each block, like is the case with:
BTC header info. Queried from the btc-staking contracts to the babylon-contract.
Finality Provider voting power. Queried from finality-provider to the btc-staking contract.
Raw queries are much cheaper than smart queries, as they access the storage directly. Every time a query returns an umodified value from the store, it could in principle be done through a raw query.
Since raw queries have their own problems (no encapsulation, become part of the public API, requires care, migrations, etc.) let's use them only when / if convenient. By example, when querying something regularly at each block, like is the case with:
btc-staking
contracts to thebabylon-contract
.finality-provider
to thebtc-staking
contract.