cli
cli copied to clipboard
Network `publish`: `--shares` option doesn't work
Describe the bug
ignite network chain publish ... --shares 10%foo
Should allocate 10% of the foo
share for the published testnet as rewards. Meaning 10% of the vouchers for foo
should be put in reward pool for the testnet
The command doesn't set the rewards for the testnet
To reproduce Steps to reproduce the behavior:
Start a local spn
ignite chain serve -r
Publish the chain with shares
ignite network chain publish https://github.com/lubtd/orbit.git --chain-id orbit-1 --local --shares 10%foo
The chain has no reward
ignite network chain list --local
Launch Id Chain Id Source Campaign Id Network Reward
1 orbit-1 https://github.com/lubtd/orbit.git 1 testnet -
spnd q reward list-reward-pool
pagination:
next_key: null
total: "0"
rewardPool: []
What version are you using?
Provide the output of the ignite version
command.
development
Seems the vouchers are mint in the coordinator balance, we should send a MsgSendRewards
in addition
spnd q bank balances spn165wt8n7n9280vqrgkjz85d4ew90fe3vt6cg8v6
balances:
- amount: "100000"
denom: uspn
- amount: "10000"
denom: v/1/foo
The CLI logic will only create the shares if we pass a campaign ID or publish a mainnet chain. For we can have the shares we should have a campaign ID:
https://github.com/ignite/cli/blob/833876b01e525cbbcdfbf9097c1c24569aca645e/ignite/services/network/publish.go#L182-L182
Seems the vouchers are mint in the coordinator balance, we should send a
MsgSendRewards
in additionspnd q bank balances spn165wt8n7n9280vqrgkjz85d4ew90fe3vt6cg8v6 balances: - amount: "100000" denom: uspn - amount: "10000" denom: v/1/foo
@lubtd, are you mean to call the MsgSetRewards
when we pass the campaignID
, right? and the lastRewardHeight
should be zero?
--shares
means the chain being published is incentivized with shares of a campaign (to be renamed project btw) therefore MsgSetRewards
must be called to set the reward pool to incentivize the chain.
@lubtd, are you mean to call the MsgSetRewards when we pass the campaignID, right? and the lastRewardHeight should be zero?
If I remember thee issue well (I need to check again) the vouchers were minted but not deposited in a reward pool, therefore we already have the logic where the campaign ID is used to mint the voucher, the only remaining thing is to use them to deposit in reward pool
It must be check if lastRewardHeight
can be left uninitialized, if not we should make mandatory to provide a flag value for the last reward height