diff --git a/zetaclient/chains/base/observer.go b/zetaclient/chains/base/observer.go index 07603a8517..905775b2b2 100644 --- a/zetaclient/chains/base/observer.go +++ b/zetaclient/chains/base/observer.go @@ -21,17 +21,20 @@ import ( ) const ( - // EnvVarLatestBlock is the environment variable to indicate latest block height + // EnvVarLatestBlock is the environment variable that forces the observer to scan from the latest block EnvVarLatestBlock = "latest" - // DefaultBlockCacheSize is the default size of the block cache + // DefaultBlockCacheSize is the default number of blocks that the observer will keep in cache for performance (without RPC calls) + // Cached blocks can be used to get block information and verify transactions DefaultBlockCacheSize = 1000 - // DefaultHeadersCacheSize is the default size of the headers cache + // DefaultHeadersCacheSize is the default number of headers that the observer will keep in cache for performance (without RPC calls) + // Cached headers can be used to get header information DefaultHeadersCacheSize = 1000 ) -// Observer is the base observer. +// Observer is the base structure for chain observers, grouping the common logic for each chain observer client. +// The common logic includes: chain, chainParams, contexts, zetacore client, tss, lastBlock, db, metrics, loggers etc. type Observer struct { // chain contains static information about the observed chain chain chains.Chain diff --git a/zetaclient/chains/base/signer.go b/zetaclient/chains/base/signer.go index 534cdb0bc3..2585218767 100644 --- a/zetaclient/chains/base/signer.go +++ b/zetaclient/chains/base/signer.go @@ -7,7 +7,8 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/metrics" ) -// Signer is the base signer +// Signer is the base structure for grouping the common logic between chain signers. +// The common logic includes: chain, chainParams, contexts, tss, metrics, loggers etc. type Signer struct { // chain contains static information about the external chain chain chains.Chain