Closed kmw101 closed 5 years ago
Some questions:
Admin
field being used anywhere except assignment. Some answers:
So since this updates an existing one - we need to implement the Admin logic first I suppose. I haven't worked on distribution extension, but couldn't find any usage.
So basically what we need is to have admin key (that matches the address in revenue obj).
Also bear in mind that we currently distribute funds prior to updating the revenue object. Is that something that still makes sense in this scenario or not? If not - then we'd have to cater for it somehow in weave first.
I am not 100% sure of the terminology in the code.
My understanding of the existing code is that the revenue from fees accrues into a revenue account, the governing board sets the q-factor
or weighting for each validator and this then applied when the revenue is moved to the distribution account.
The new requirement is for the depositors to be added to the recipients subject to being approved by the governing board. The CLI tool is the way to present the depositors and apply the q-factor
or weighting as a proposal for the governing board.
I'll explain:
Now questions about the process:
To answer your questions
@ethanfrey I believe that we will need to start with updating the distribution extension for that, let me know if that makes sense:
Current implementation allows resetting the list, but it does the distribution beforehand, if that's okay - we can go with that, but that will require us to send the list of validators and depositors as one at the same time
This is actually good and what any sane service provider would expect (we set the rates BEFORE we provide services, not after). Let's keep it as is.
Since there are no more on-chain checks in any form, we can just use simple SendTx here
Same UI for them, but it prepares a governance proposal, which is basically a BatchMsg with a whole list of SendMsg from the "reward fund" (fee collector) to all the different validators. At whatever rate governance decides.
The utility of distribution was to provide up-front guarantees, which was a good idea from @husio. I think it is correct and we can leave it for when the economists see the light. For now, let's just use SendMsg.
We can brainstorm more tomorrow.
Yep, that sounds good. I also like the up-front guarantee model more as otherwise this becomes a mess and also not very blockchain'y.
Yep, that sounds good. I also like the up-front guarantee model more as otherwise this becomes a mess and also not very blockchain'y
Yes, the token economics is becoming very non-blockchainy. :disappointed: Anyway, let's just get this over the line, and wait for external validators to raise the same points, which are more likely to be heard than developers who clearly do not understand incentive mechanisms.
After applying https://github.com/iov-one/weave/issues/636 you need to pay 100 IOV in order to distribute funds.
The current implementation distributes funds before the update so that there is a guarantee of the share. This means that someone has to pay 100 IOV in order to update a revenue configuration.
The 100 IOV come from the Governing Board fund (address to be supplied).
We will not use the distribution contract as they do not want to provide any guarantees (read: unnecessary restrictions on the off-chain calculations). Just Escrow (hopefully) and Send.
Maybe in the future, the wisdom of the upfront guarantees will be recognized :pray:
I think this is achievable with the current version of bnscli
. I would like this to be tested by @kmw101 on a real network (antnet is using version 0.16) before we close this issue. This will be also our first user feedback on the bnscli
tool. :crossed_fingers:
Here is the example set of commands. Looks like the fee setting is still missing.
$ cat /tmp/issue_625.sh
#!/bin/sh
set -ex
# Show the current bnscli version to ease the debugging.
bnscli version
if [ ! -f $BNSCLI_PRIV_KEY ]
then
>&2 echo "Private key not generated. Use 'bnscli keygen' to generate one."
exit 2
fi
export BNSCLI_TM_ADDR=https://bns.antnet.iov.one:443
source_account="seq:foo/src/1"
# The data can come from a CSV file as well.
(
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/1" -amount "1 BTC" -memo "`date` payment"
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/2" -amount "666 IOV" -memo "`date` payment"
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/3" -amount "999 IOV" -memo "`date` payment"
) \
| bnscli as-batch \
| bnscli as-proposal -title "$USER test" -description "$USER testing issue 625" -electionrule 1 \
| bnscli sign \
| bnscli submit
Happy to coordinate the testing!
Once https://github.com/iov-one/weave/pull/746 is merged, with-fee
command is available.
I am using antnet for texting this script: export BNSCLI_TM_ADDR=https://bns.antnet.iov.one:443
There are some thing missing in order to successfully run this script.
-amount "1 IOV"
#!/bin/sh
set -ex
# Show the current bnscli version to ease the debugging.
bnscli version
if [ ! -f $BNSCLI_PRIV_KEY ]
then
>&2 echo "Private key not generated. Use 'bnscli keygen' to generate one."
exit 2
fi
source_account="seq:foo/src/1"
# The data can come from a CSV file as well.
(
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/1" -amount "1 BTC" -memo "`date` payment"
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/2" -amount "666 IOV" -memo "`date` payment"
bnscli send-tokens -src "$source_account" -dst "seq:foo/dst/3" -amount "999 IOV" -memo "`date` payment"
) \
| bnscli as-batch \
| bnscli as-proposal -title "$USER test" -description "$USER testing issue 625" -electionrule 1 \
| bnscli with-fee -amount "1 IOV" \
| bnscli sign \
| bnscli submit
Very nice job.
Note to testers, if you replace the | bnscli submit
with | bnscli view
you can see what will be submitted. This is also present in all the cli test cases, but sometimes trying code yourself is enlightening
Done.
An authorised user has a CLI tool to upload a csv file with the following columns:The file is parsed and errors are displayed to the user. The wallets and q-factor are added to the proposed distribution and is voted on by the governing board.
Revised 05/06/2019
An authorised use has a CLI tool to upload a csv containing the following columns:
The file is parsed and any parsing errors shown to the user.
The output is the creation of a proposal, something like
CreateProposalMsg(Batch(SendMsg...)
which the economic committee then vote on.