- removed assignee
Make park rates effective 60 blocks after the actual vote
Currently parking rate are determined based on the rates published for the block that contains a parking transaction. Instead, use the rate from 60 blocks in the past. This will permit the parking rates to be known 60 blocks into the future.
https://discuss.nubits.com/t/passed-finalized-motion-for-protocol-changes/372
Comments (8)
-
Michael Witrant reporter
-
Michael Witrant reporter
-
assigned issue to
Michael Witrant
-
assigned issue to
-
Michael Witrant reporter
@Jordan Lee the current park rates are stored in each block. After this change what should be stored in each block? (i) The park rates effective for the transactions inside the same block or (ii) the voted park rate that will be effective 60 blocks later? I could not determine that myself because I don't really understand the purpose of this data inside the blocks. If the purpose is to make validation from lightweight clients easier then it should be (i) (but it would be odd to validate the premiums while not validating the rates). If the purpose is to easily display the current rates to the user then (ii) is probably better (because you know what are the upcoming rates, instead of the past ones). If the purpose is to make sure everyone agrees on the current rates, then either one would work but (i) would probably be better. But we can also just remove this data, because I'm not sure it's really useful (it looks like cache data stored inside the blockchain).
-
Michael Witrant reporter
- changed milestone to 2.0.0
-
Michael Witrant reporter
Solution proposed in pull request #228.
-
Jordan Lee repo owner
I understand all the information needed to derive the park rates for each block is in the blockchain. If calculating the park rates for each block isn't going to cause performance issues, I support removing it if it doesn't take much time to code the change.
-
Michael Witrant reporter
We already calculate the park rates for each block. It's needed because we must verify the park rates stored in the blocks. So if we remove park rates from the blocks then we would actually not be required to calculate them for each block. We could calculate them on demand, when the user asks for them or when there's an unpark transaction to verify. But I think it'd still be a good idea to calculate them for each block and store them in the index (and that's what we do already).
The question is not so much about calculating them, it's about storing them in the blockchain. Each full node must be able to calculate them anyway, so we can remove them from the blockchain. It's like cache data stored in the blockchain.
It shouldn't be long to change, and it will remove bloat from the blockchain (and it will save some verification time).
-
Michael Witrant reporter
- changed status to resolved
Pull request merged. Created issue #204 to remove calculated park rates.
- Log in to comment