private static TransactionReceipt decodeFlatReceipt(
      final RLPInput rlpInput, final boolean revertReasonAllowed) {
    rlpInput.enterList();
    // Flat receipts can be either legacy or eth/69 receipts.
    // To determine the type, we need to examine the logs' position, as the bloom filter cannot be
    // used. This is because compacted legacy receipts also lack a bloom filter.
    // The first element can be either the transaction type (eth/69 or stateRootOrStatus (eth/68
    final RLPInput firstElement = rlpInput.readAsRlp();
    // The second element can be either the state root or status (eth/68) or cumulative gas (eth/69)
    final RLPInput secondElement = rlpInput.readAsRlp();
    final boolean isCompacted = isNextNotBloomFilter(rlpInput);
    LogsBloomFilter bloomFilter = null;
    if (!isCompacted) {
      bloomFilter = LogsBloomFilter.readFrom(rlpInput);
    }
    boolean isEth69Receipt = isCompacted && !rlpInput.nextIsList();
    TransactionReceipt receipt;
    if (isEth69Receipt) {
      receipt = decodeEth69Receipt(rlpInput, firstElement, secondElement);
    } else {
      receipt =
          decodeLegacyReceipt(
              rlpInput, firstElement, secondElement, bloomFilter, revertReasonAllowed);
    }
    rlpInput.leaveList();
    return receipt;
  }
Creates a transaction receipt for the given RLP

@param rlpInput the RLP-encoded transaction receipt
@param revertReasonAllowed whether the rlp input is allowed to have a revert reason
@return the transaction receipt
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/receipt/TransactionReceiptDecoder.java