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

Change stake pool fields #198

Merged
merged 9 commits into from
Mar 10, 2022
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

- name: "Deploy 0Chain"
if: github.event_name == 'push' || github.event.inputs.existing_network == ''
uses: 0chain/actions/deploy-0chain@master
uses: 0chain/actions/deploy-0chain@blobber-stake-one
with:
kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }}
teardown_condition: "TESTS_PASSED"
Expand All @@ -109,10 +109,10 @@ jobs:
explorer_image: ${{ env.EXPLORER_TAG }}
zproxy_image: staging
zsearch_image: staging
blobber_stake_image: latest
blobber_stake_image: one

- name: "Run System tests"
uses: 0chain/actions/run-system-tests@master
uses: 0chain/actions/run-system-tests@blobber-stake-one
with:
network: ${{ env.NETWORK_URL }}
zbox_cli_branch: ${{ env.ZBOX_BRANCH }}
Expand Down
43 changes: 20 additions & 23 deletions internal/cli/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,34 +215,31 @@ type BlobberAllocation struct {
}

type StakePoolInfo struct {
ID string `json:"pool_id"`
Balance int64 `json:"balance"`
Unstake int64 `json:"unstake"`
Free int64 `json:"free"`
Capacity int64 `json:"capacity"`
WritePrice int64 `json:"write_price"`
OffersTotal int64 `json:"offers_total"`
UnstakeTotal int64 `json:"unstake_total"`
Delegate []*StakePoolDelegatePoolInfo `json:"delegate"`
Penalty int64 `json:"penalty"`
Rewards StakePoolRewardsInfo `json:"rewards"`
Settings StakePoolSettings `json:"settings"`
}

// StakePoolRewardsInfo represents stake pool rewards.
type StakePoolRewardsInfo struct {
Charge int64 `json:"charge"` // total for all time
Blobber int64 `json:"blobber"` // total for all time
Validator int64 `json:"validator"` // total for all time
ID string `json:"pool_id"` // pool ID
Balance int64 `json:"balance"` // total balance
Unstake int64 `json:"unstake"` // total unstake amount
Free int64 `json:"free"` // free staked space
Capacity int64 `json:"capacity"` // blobber bid
WritePrice int64 `json:"write_price"` // its write price
OffersTotal int64 `json:"offers_total"` //
UnstakeTotal int64 `json:"unstake_total"`
Delegate []StakePoolDelegatePoolInfo `json:"delegate"`
Penalty int64 `json:"penalty"` // total for all
Rewards int64 `json:"rewards"`
Settings StakePoolSettings `json:"settings"`
}

type StakePoolDelegatePoolInfo struct {
ID string `json:"id"` // pool ID
ID string `json:"id"` // blobber ID
Balance int64 `json:"balance"` // current balance
DelegateID string `json:"delegate_id"` // wallet
Rewards int64 `json:"rewards"` // total for all time
Penalty int64 `json:"penalty"` // total for all time
Unstake bool `json:"unstake"`
Rewards int64 `json:"rewards"` // current
UnStake bool `json:"unstake"` // want to unstake

TotalReward int64 `json:"total_reward"`
TotalPenalty int64 `json:"total_penalty"`
Status string `json:"status"`
RoundCreated int64 `json:"round_created"`
}

type StakePoolSettings struct {
Expand Down