-
Notifications
You must be signed in to change notification settings - Fork 31
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
[R4R] Add deposit address and do some refactor #101
Conversation
x/gov/keeper.go
Outdated
ParamStoreKeyDepositParams = []byte("depositparams") | ||
ParamStoreKeyTallyParams = []byte("tallyparams") | ||
|
||
DepositedCoinsAccAddr = sdk.AccAddress{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it proper to use 0x00000000000000000000 as deposit address? Cosmos uses the following method to generate address.
DepositedCoinsAccAddr = sdk.AccAddress(crypto.AddressHash([]byte("govDepositedCoins")))
BurnedDepositCoinsAccAddr = sdk.AccAddress(crypto.AddressHash([]byte("govBurnedDepositCoins")))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it will use sha256 and get 20 bytes from it.
@darren-liu what's your point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never burn by chain itself.
but I think we may need a better addresses.
x/gov/keeper.go
Outdated
ParamStoreKeyDepositParams = []byte("depositparams") | ||
ParamStoreKeyTallyParams = []byte("tallyparams") | ||
|
||
DepositedCoinsAccAddr = sdk.AccAddress{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never burn by chain itself.
but I think we may need a better addresses.
please make sure Erheng know this change (1. the new address in QA and Testnet 2. include all deposits amount to handle deposit/voting expire) to his recon service... |
* R4R: Add interface to remove validator (#91) * Add validator remove interface * add unit test * Fix failed unit test in gov and stake * Add proposal id checking in msg validate * Add validator consensus addr into proposal decription * Add remove validator command line interface * Add new proposal type to NormalizeProposalType * add validator consensus address checking * Rename consensus address flag name * refactor handler test import * Use json marshal to replace cdc marshal * Add automatic gov proposal when proposal id is zero * add deposit flag * Add routerCallRecord * Resolve comment, a tx only contains one msg * improve the validate logic for remove validator * refactor go import * remove necessary checking * stake: add fee addr for each validator * [R4R] update gov strategy (#73) * update gov strategy * refactor * revert change * [R4R] Add deposit address and do some refactor (#101) * add address for deposits * refactor * refactor * revert change * refactor * refactor * change proposals to publish * update deposit address
Description
When ppl deposit coins to a proposal, we will add these tokens to a specific address.
And do some refactor.
Rationale
tell us why we need these changes...
Example
Add upgrade config in app.toml
Changes
Notable changes:
Preflight checks
make build
)make test
)make integration_test
)Already reviewed by
...
Related issues
... reference related issue #'s here ...