Deterministic numbering of virtual operations #1675
Labels
3d Bug
Classification indicating the existing implementation does not match the intention of the design
6 API
Impact flag identifying the application programing interface (API)
6 Protocol
Impact flag identifying the blockchain logic, consensus, validation, etc.
Milestone
User Story
These fields are in
operation_history_object
:Earlier described in #206, numbering of virtual operations (read:
virtual_op
field) is not deterministic, which have caused confusions to client application developers.That said, different API nodes may return different
virtual_op
values when being queried with same parameters.Here I propose a rule about deterministic numbering of virtual operations:
virtual_op = 0
;trx_in_block
andop_in_trx
are indexes start from0
, E.G. if a block contains 2 transactions,trx_in_block
of theoperation_history_object
s may be0
and1
.fill_order_operation
s caused by alimit_order_create_operation
), let(block_num,trx_in_block,op_in_trx)
be the same as the real operation, and letvirtual_op
s be1
,2
, ...limit_order_cancel_operation
s due to expiration),trx_in_block
be the number of transactions in the block, E.G. let it be2
if the block contains 2 transactions,op_in_trx = 0
,virtual_op
s be0
,1
, ...Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.
Additional Context (optional)
Add any other context about your request here.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: