@Test
  public void blobsWithCommitmentsSize_BlobVersion0() {
    TransactionTestFixture preparedTx =
        prepareTransaction(
            TransactionType.BLOB, 10, Wei.of(500), Wei.of(50), 10, 1, BlobType.KZG_PROOF, null);
    Transaction txBlob = preparedTx.createTransaction(KEYS1);
    BytesValueRLPOutput rlpOut = new BytesValueRLPOutput();
    TransactionEncoder.encodeRLP(txBlob, rlpOut, EncodingContext.POOLED_TRANSACTION);

    txBlob =
        TransactionDecoder.decodeRLP(
                new BytesValueRLPInput(rlpOut.encoded(), false), EncodingContext.POOLED_TRANSACTION)
            .detachedCopy();
    System.out.println(txBlob.getSender());
    System.out.println(txBlob.getHash());
    System.out.println(txBlob.getSize());

    final BlobsWithCommitments bwc = txBlob.getBlobsWithCommitments().get();
    final ClassLayout cl = ClassLayout.parseInstance(bwc);
    System.out.println(cl.toPrintable());
    System.out.println("BlobsWithCommitments size: " + cl.instanceSize());
    final ClassLayout rl = ClassLayout.parseInstance(bwc.getBlobs());
    System.out.println(rl.toPrintable());
    System.out.println("BlobProofBundle size:" + rl.instanceSize());

    assertThat(cl.instanceSize() + rl.instanceSize()).isEqualTo(BLOBS_WITH_COMMITMENTS_SIZE);
  }
Field which value is dynamic and can only be calculated at runtime
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/PendingTransactionEstimatedMemorySizeTest.java