Add test for several stack-stx, stack-increase in one block
friedger opened this issue · 4 comments
Add test with several stack-stx and stack-increase calls to show
that "we cannot determine the order in which stack-increase were called within the same block. Because stack-increase alters reward-cycle-total-stacked, it means that we don't know the value of total-ustx that was erroneously written to each PoX address's entry affected by this block. This, in turn, prevents us from subtracting out this value in order to recover the solo stacker's original value"
In the original comment it was talked about stack-extend, I have adapted it to talk about stack-increase instead because I think that is the problematic function:
stack-increase
callsincrease-reward-cycle-entry
altering total-ustxstack-extend
callsadd-pox-addr-to-reward-cycles
adding new entries only.
Not sure what to exactly assert here. If you have more input please let me know.
How about a test where Alice and Bob stack the same amount, then increase by the same amount, but then show that their total-ustx
values in the map are different.