iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

persist staking protocol balance (before Greenland height) to DB in archive mode

Open dustinxie opened this issue 4 years ago • 3 comments

What version of iotex-core are you using (ioctl version)?

latest

What operating system and processor architecture are you using?

don't care

What did you do? If possible, provide a recipe for reproducing the error.

when we handle the special account io000000000000000000000000stakingprotocol (staking protocol balance), it's balance is saved in-memory, and written to DB starting at Greenland height

for rosetta client in archive mode, this caused an issue b/c it cannot query the balance at a height that is below current tip height

so in archive mode, we also need to persist the staking protocol balance at each height (after native staking activation, and before Greenland) to DB

What did you expect to see?

What did you see instead?

dustinxie avatar Sep 08 '20 03:09 dustinxie

fairbank-Greenland

coderbradlee avatar Sep 08 '20 21:09 coderbradlee

rosettacli test failed,because there's staking action in different height,when call api to get staking account's balance,there's error:

  1. no actual staking action in this height
  2. have staking action in this height,but tipheight still haven't write balance in this height those two errors cannot differentiate

coderbradlee avatar Nov 16 '20 03:11 coderbradlee

What version of iotex-core are you using (ioctl version)?

latest

What operating system and processor architecture are you using?

don't care

What did you do? If possible, provide a recipe for reproducing the error.

when we handle the special account io000000000000000000000000stakingprotocol (staking protocol balance), it's balance is saved in-memory, and written to DB starting at Greenland height

for rosetta client in archive mode, this caused an issue b/c it cannot query the balance at a height that is below current tip height

so in archive mode, we also need to persist the staking protocol balance at each height (after native staking activation, and before Greenland) to DB

What did you expect to see?

What did you see instead?

@millken pls verify if this is still true

raullenchai avatar Jun 27 '22 18:06 raullenchai