Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Total supply not updated after custom, cashback, transaction #4015
After performing the custom cashback transaction from the provided SDK tutorials. It seems that the total supply has not been updated.
call after tx with 10% bonus was broadcasted:
The transaction was broadcasted successfully. Balances of both accounts are updated. Since there are now more tokens on the network, just as when tokens are forged, the total supply should be updated as well.
Its actually not possible or at least not possible in current structure. Total supply is calculated statically from some basic values. Which are genesis block value and rewards. Its not possible to change that value in case of cash back transaction. Even if we change it runtime, in case the application restart we will loose that.
And its not possible to look into storage layer and find out which transactions generated extra supply. The only possibility left is to persist this value, even then finding that which transaction generated how much extra supply is not possible in current structure or not efficient.
@shuse2 We may be able to calculate runtime value from storage, but with recent change in DPOS will restructure the rewards values. So I suggest to not address this issue at the moment and after we are done with BFT and new DPOS restructuring.