private List<Account> createRandomAccounts(
      final MutableWorldState worldState,
      final int count,
      final float percentContractAccounts,
      final float percentContractAccountsWithNonEmptyStorage) {
    final WorldUpdater updater = worldState.updater();
    final List<Account> accounts = new ArrayList<>(count);
    for (int i = 0; i < count; i++) {
      final MutableAccount account = updater.getOrCreate(address());
      if (random.nextFloat() < percentContractAccounts) {
        // Some percentage of accounts are contract accounts
        account.setCode(bytesValue(5, 50));
        if (random.nextFloat() < percentContractAccountsWithNonEmptyStorage) {
          // Add some storage for contract accounts
          final int storageValues = random.nextInt(20) + 10;
          for (int j = 0; j < storageValues; j++) {
            account.setStorageValue(uint256(), uint256());
          }
        }
      }
      account.setNonce(random.nextLong());
      account.setBalance(Wei.of(positiveLong()));

      accounts.add(account);
    }
    updater.commit();
    worldState.persist(null);
    return accounts;
  }
Generates a sequence of blocks with some accounts and account storage pre-populated with random
data.
ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/BlockDataGenerator.java