Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type Config struct {
RPCNumParallelCalls uint64 `env:"RPC_NUM_PARALLEL_CALLS" envDefault:"20"`
RPCBatchSize uint64 `env:"RPC_BATCH_SIZE" envDefault:"10"`
RPCBatchMaxMemoryUsageMB uint64 `env:"RPC_BATCH_MAX_MEMORY_USAGE_MB" envDefault:"32"`
RPCDisableBlockReceipts bool `env:"RPC_DISABLE_BLOCK_RECEIPTS" envDefault:"false"`
ParquetMaxFileSizeMB int64 `env:"PARQUET_MAX_FILE_SIZE_MB" envDefault:"512"`
InsightServiceUrl string `env:"INSIGHT_SERVICE_URL" envDefault:"https://insight.thirdweb.com"`
InsightServiceApiKey string `env:"INSIGHT_SERVICE_API_KEY"`
Expand Down
5 changes: 5 additions & 0 deletions internal/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ func (rpc *Client) checkGetBlockByNumberSupport() error {
}

func (rpc *Client) checkGetBlockReceiptsSupport() error {
if config.Cfg.RPCDisableBlockReceipts {
rpc.supportsBlockReceipts = false
log.Warn().Msg("eth_getBlockReceipts method disabled by config")
return nil
}
// Always probe to see if the method is supported
var getBlockReceiptsResult interface{}
receiptsErr := rpc.RPCClient.Call(&getBlockReceiptsResult, "eth_getBlockReceipts", "latest")
Expand Down