Skip to content
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

Columbus-2 Client Updates #140

Merged
merged 62 commits into from
Jun 4, 2019
Merged

Columbus-2 Client Updates #140

merged 62 commits into from
Jun 4, 2019

Conversation

yun-yeo
Copy link
Contributor

@yun-yeo yun-yeo commented May 10, 2019

Move client interface to core and replace cosmos dependent comment and description to terra.
Change terracli argument input to flag input.

Move bank, staking, distribute, slashing client interface to core.
Update cosmos-sdk version to v0.34.6
Add multisign rest interface
Fix graded vesting account export bug
Fix budget module to delete all votes when submitter withdraws the program
Fix to use DeleteVotesForProgram to delete all votes for a program.

Breaking Changes

Msg Types

cosmos-sdk/MsgSend => pay/MsgSend
cosmos-sdk/MsgMultiSend => pay/MsgMultiSend

cosmos-sdk/MsgCreateValidator => staking/MsgCreateValidator
cosmos-sdk/MsgEditValidator => staking/MsgEditValidator
cosmos-sdk/MsgDelegate => staking/MsgDelegate
cosmos-sdk/MsgUndelegate => staking/MsgUndelegate
cosmos-sdk/MsgBeginRedelegate => staking/MsgBeginRedelegate

cosmos-sdk/MsgWithdrawDelegationReward => distribution/MsgWithdrawDelegationReward
cosmos-sdk/MsgWithdrawValidatorCommission => distribution/MsgWithdrawValidatorCommission
cosmos-sdk/MsgModifyWithdrawAddress => distribution/MsgModifyWithdrawAddress

cosmos-sdk/MsgUnjail => slashing/MsgUnjail

New Msg Types

Oracle price vote

MsgPriceFeed is split into MsgPricePrevote and MsgPriceVote

Period  |  P1 |  P2 |  P3 |  ...    |
Prevote |  O  |  O  |  O  |  ...    |
        |-----\-----\-----\-----    |
Vote    |     |  O  |  O  |  ...    |

In prevote stage, a validator should submit the hash of the part of real vote msg to prove the validator is not just copying other validators price vote. In vote phrase, the validator should reveal the real price by submitting MsgPriceVote with salt.

The submission order has to be kept in (vote -> prevote) order. If an prevote comes early, it will replace previous prevote so next vote, which reveals the proof for previous prevote, will be failed.

Staking, Distrubtion

change rest interface url

"/distribution/parameters" => "/distribution/params"
"/staking/parameters" => "/staking/params"

Send Transaction

Add tax log to send transaction for recording real amount which a transaction pay.
Ex) txs/B515331BF9EA9A92AD59A85D593E5A2B170E3D297C59E85DDA9FA6FF33790E9B

{
  "logs": [
    {
      "msg_index": 0,
      "success": true,
      "log": "{\"tax\":\"400uluna\"}"
    }
  ]
}

Swap Transaction

Add swap_coin log to swap transaction for recording the amount of swapped coin along with offered coin

{
  "logs": [
    {
      "msg_index": 0,
      "success": true,
      "log": "{\"swap_coin\":\"400ukrw\"}"
    }
  ]
}

@yun-yeo yun-yeo requested review from dokwon and hanjukim May 28, 2019 07:03
Copy link
Contributor

@hanjukim hanjukim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

Copy link
Contributor

@dokwon dokwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great changes overall, think given breadth of changes a detailed code review / client functionality QA is in order

contrib/export/i-4-vesting-type-accounts.csv Show resolved Hide resolved
go.mod Show resolved Hide resolved
x/market/client/cli/tx.go Show resolved Hide resolved
x/market/client/cli/tx.go Outdated Show resolved Hide resolved
x/market/keeper.go Show resolved Hide resolved
x/mint/keeper.go Show resolved Hide resolved
x/oracle/handler.go Show resolved Hide resolved
x/oracle/handler.go Show resolved Hide resolved
@yun-yeo yun-yeo requested a review from dokwon June 3, 2019 08:25
Copy link
Contributor

@dokwon dokwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes reflected. LGTM.

@dokwon dokwon merged commit 17ca565 into develop Jun 4, 2019
@yun-yeo yun-yeo deleted the columbus-2 branch June 4, 2019 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants