diff --git a/op-service/sources/eth_client.go b/op-service/sources/eth_client.go index fe95cceaff7..a0d303fd6f5 100644 --- a/op-service/sources/eth_client.go +++ b/op-service/sources/eth_client.go @@ -376,6 +376,14 @@ func (s *EthClient) GetStorageAt(ctx context.Context, address common.Address, st // ReadStorageAt is a convenience method to read a single storage value at the given slot in the given account. // The storage slot value is verified against the state-root of the given block if we do not trust the RPC provider, or directly retrieved without proof if we do trust the RPC. func (s *EthClient) ReadStorageAt(ctx context.Context, address common.Address, storageSlot common.Hash, blockHash common.Hash) (common.Hash, error) { + chainId, err := s.ChainID(ctx) + if err != nil { + return common.Hash{}, fmt.Errorf("failed to fetch chain id: %w", err) + } + // BSC Testnet doesn't support fetching the storage based on block hash + if chainId.Cmp(big.NewInt(97)) == 0 { + return s.GetStorageAt(ctx, address, storageSlot, "latest") + } if s.trustRPC { return s.GetStorageAt(ctx, address, storageSlot, blockHash.String()) } diff --git a/op-service/sources/receipts_rpc.go b/op-service/sources/receipts_rpc.go index a7b5fb318c8..c5c0305880f 100644 --- a/op-service/sources/receipts_rpc.go +++ b/op-service/sources/receipts_rpc.go @@ -105,6 +105,12 @@ func (f *RPCReceiptsFetcher) FetchReceipts(ctx context.Context, blockInfo eth.Bl return nil, err } + // This is a special case for BNB Testnet, where the receipt hash is not deterministic. + // We skip the validation for this block. + if blockInfo.ReceiptHash() == common.HexToHash("0xccc2eafe27c3dbcd0ad60a40f599fbc67a5e2dfbfdfbcce7e2455688870e7ec2") { + return + } + if err = validateReceipts(block, blockInfo.ReceiptHash(), txHashes, result); err != nil { return nil, err }