@Test
  void shouldReturnTheCorrectWorldViewForTxStartEnd() {
    final TxStartEndTracer txStartEndTracer = new TxStartEndTracer();

    // block contains 1 transaction
    final BlockTraceResult blockTraceResult = traceService.traceBlock(31, txStartEndTracer);

    assertThat(blockTraceResult).isNotNull();

    final List<TransactionTraceResult> transactionTraceResults =
        blockTraceResult.transactionTraceResults();
    assertThat(transactionTraceResults.size()).isEqualTo(1);

    assertThat(transactionTraceResults.get(0).getTxHash()).isNotNull();
    assertThat(transactionTraceResults.get(0).getStatus())
        .isEqualTo(TransactionTraceResult.Status.SUCCESS);
    assertThat(transactionTraceResults.get(0).errorMessage()).isEmpty();

    assertThat(txStartEndTracer.txStartWorldView).isNotNull();
    assertThat(txStartEndTracer.txEndWorldView).isNotNull();

    assertThat(txStartEndTracer.txStartTransaction.getNonce())
        .isEqualTo(txStartEndTracer.txEndTransaction.getNonce())
        .isEqualTo(30);
    assertThat(txStartEndTracer.txStartTransaction.getGasLimit())
        .isEqualTo(txStartEndTracer.txEndTransaction.getGasLimit())
        .isEqualTo(314159);
    assertThat(txStartEndTracer.txStartTransaction.getTo().get())
        .isEqualTo(txStartEndTracer.txEndTransaction.getTo().get())
        .isEqualTo(Address.fromHexString("0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"));
    assertThat(txStartEndTracer.txStartTransaction.getValue())
        .isEqualTo(txStartEndTracer.txEndTransaction.getValue())
        .isEqualTo(
            Wei.fromHexString(
                "0x000000000000000000000000000000000000000000000000000000000000000a"));
    assertThat(txStartEndTracer.txStartTransaction.getPayload())
        .isEqualTo(txStartEndTracer.txEndTransaction.getPayload())
        .isEqualTo(Bytes.fromHexString("0xfd408767"));

    assertThat(txStartEndTracer.txEndStatus).isTrue();
    assertThat(txStartEndTracer.txEndOutput).isEqualTo(Bytes.fromHexString("0x"));
    assertThat(txStartEndTracer.txEndGasUsed).isEqualTo(24303);
    assertThat(txStartEndTracer.txEndSelfDestructs).isEmpty();
    assertThat(txStartEndTracer.txEndTimeNs).isNotNull();

    assertThat(txStartEndTracer.txEndLogs).isNotEmpty();

    final Log actualLog = txStartEndTracer.txEndLogs.get(0);
    assertThat(actualLog.getLogger())
        .isEqualTo(Address.fromHexString("0x6295ee1b4f6dd65047762f924ecd367c17eabf8f"));
    assertThat(actualLog.getData())
        .isEqualTo(
            Bytes.fromHexString(
                "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9000000000000000000000000000000000000000000000000000000000000002a"));
    assertThat(actualLog.getTopics()).hasSize(4);
    assertThat(actualLog.getTopics().get(0))
        .isEqualTo(
            Bytes.fromHexString(
                "0xd5f0a30e4be0c6be577a71eceb7464245a796a7e6a55c0d971837b250de05f4e"));
    assertThat(actualLog.getTopics().get(1))
        .isEqualTo(
            Bytes.fromHexString(
                "0x0000000000000000000000000000000000000000000000000000000000000001"));
    assertThat(actualLog.getTopics().get(2))
        .isEqualTo(
            Bytes.fromHexString(
                "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"));
    assertThat(actualLog.getTopics().get(3))
        .isEqualTo(
            Bytes.fromHexString(
                "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
  }
The blockchain for testing has a height of 32 and the account
0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b makes a transaction per block. So, in the head, the
nonce of this account should be 32.
app/src/test/java/org/hyperledger/besu/services/TraceServiceImplTest.java