-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increased Emission Supply #14
Comments
The threshold must be changeable, right? If so, who has to be allowed to change that? |
For know the
Validators have E.g. validator started a ballot 2 days after |
Oh, I initially misunderstood. It's clear now, thanks. |
@rstormsf @vbaranov @igorbarinov The first version of the contracts is ready. There are totally two separate contracts:
These are draft versions for discussion. They don't have any tests yet.
Please take a look at the code. Did I get everything correctly? Some notes and questions:
The action is performed that has received the maximum number of votes: https://github.com/varasev/poa-network-consensus-contracts/blob/master/contracts/VotingToManageEmissionFunds.sol#L278-L305 In a controversial situation it keeps coins till the next |
@varasev My comments: VotingToManageEmissionFunds.sol:
EmissionFunds.sol:
|
VotingToManageEmissionFunds.sol:
So, the So, I think there is no problem here?
But I can't use I will do EmissionFunds.sol:
I think it's better not to make
We cannot revert in these methods because they are used by If we The next ballot may be started only after the previous ballot is finalized. So, if the |
Now I'm working on these contracts to improve finalization function. |
Parity team has implemented an ability to calculate the block rewards through a smart contract in Parity v1.11: openethereum/parity-ethereum#8419 (thanks!) @phahulin thank you for your test repo. Now we don't need to change an implementation of Besides, it is possible to assign the reward directly to validator's In addition to the previously described smart contracts (see other comments above) we need to implement one more contract (let's call it That contract has to keep two types of value:
Also, the |
Finalization function in I'm gonna work on |
A test Usage:
$ git clone https://github.com/varasev/test-block-reward.git
$ cd test-block-reward
$ npm i
$ npm run start
Payout key is read from another contract: https://github.com/varasev/test-block-reward/blob/2c8135a951fbaf34953e4ed05661b6e7e19833ab/contracts/TestBlockReward.sol#L52
$ npm run clear |
The Now I'm working on unit tests for |
@varasev note that there is no way to change BlockReward contract in the same way as we can change address of network consensus contract - there is no Would it be more flexible if we use BlockReward as a proxy to another "actual" contract that will calculate rewards? And add a method in BlockReward to change that contract's address. |
@phahulin Yes, good idea. I'll think about it. Perhaps, we could use |
We could use upgradable
|
Is it OK, if validators will be able to vote for changing of |
So, we'll make |
Smart contracts and relevant unit tests for |
|
Title
Abstract
Emission supply needs to be increased by 2.5%. All these supply are coming from POA block rewards and should go to a specific smart contract.
This change requires modifications from Rust(AuRa) implementation and additional work to implement in Solidity.
Specification
Smart contract:
The smart contract should be able to accept POA coin.
When a certain threshold reaches, validators should be able to start new ballot on what to do with these funds.
Once the new ballot has started, every validator needs to decide what should be done with the fund:
https://github.com/poanetwork/poa-network-consensus-contracts/blob/master/contracts/BallotsStorage.sol#L35
Deployed addresses could be found here:
Sokol
Core
Only validators voting keys could be used to vote:
https://github.com/poanetwork/poa-network-consensus-contracts/blob/master/contracts/KeysManager.sol#L148
The text was updated successfully, but these errors were encountered: