account_operations account_op_seq_no are noncontiguous

In following scenario:

  • Create testnet and make fork
  • Perform some transactions in fork part of network
  • Go Back from fork (transactions are reverted)
  • Perform some transactions on the same account

We have as a result noncoutigous accout_op_seq_no values, ...189, 190, 194 in table 'account_operations'

On different node in the same testnet, where fork didn't happen we have values ...190, 191, 192

The same happens in similar fork situation for: 'id' in 'accounts' and 'id' in 'operations' (different values if we have fork) however it looks like those columns are internal for haf. Consequently 'operation_id' in 'account_operations' also has different values but its referencing correct entry in 'operations' table.

Screenshot_from_2021-11-30_14-52-18

Screenshot_from_2021-11-30_14-51-56

(result of select * from hive.account_operations where account_op_seq_no>188;)

Reproduction:

branch: ms_additional_system_tests

failing pipeline: https://gitlab.syncad.com/hive/haf/-/pipelines/33997

failing test: test_compare_forked_account_operations

Edited by Marcin Sobczyk