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

add democracy documentation #16

Merged
merged 3 commits into from
Jan 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions src/protocol-democracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,60 @@ If we want to relax this in the future, we would need to come up with a way to h

In order to determine if a vote is passing, we use Positive Turnout Bias. In addition we enforce a minimum turnout of 5%.

### Documentation
pifragile marked this conversation as resolved.
Show resolved Hide resolved
Go to the encointer-node repo and open 2 terminals:

Terminal 1:
```cargo build --release
./target/release/encointer-node-notee --dev --enable-offchain-indexing true -lencointer=debug,parity_ws=warn
pifragile marked this conversation as resolved.
Show resolved Hide resolved
```

Terminal 2:
```
cd client
python -m venv env
source env/bin.activate
pip install requirements.txt
python bootstrap_demo_community.py



# Go to next cycle
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 next-phase
pifragile marked this conversation as resolved.
Show resolved Hide resolved
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 next-phase
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 next-phase
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 listen -b 1

# Submitting proposal id 1, SetInactivityTimeout(8)
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 submit-set-inactivity-timeout-proposal //Alice 8
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 listen -b 1

# Submitting proposal id 2, UpdateNominalIncome(cid, 44)
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 --cid sqm1v79dF6b submit-update-nominal-income-proposal //Alice 44
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 listen -b 1
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 list-proposals
pifragile marked this conversation as resolved.
Show resolved Hide resolved

# Alice votes aye for proposal 1
pifragile marked this conversation as resolved.
Show resolved Hide resolved
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Alice 1 aye sqm1v79dF6b_1
# Bob votes aye for proposal 1
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Bob 1 aye sqm1v79dF6b_1
# Charlie votes aye for proposal 1
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Charlie 1 aye sqm1v79dF6b_1
# Alice votes nay for proposal 2
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Alice 2 nay sqm1v79dF6b_1
# Bob votes nay for proposal 2
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Bob 2 nay sqm1v79dF6b_1
# Charlie votes aye for proposal 2
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 vote //Charlie 2 aye sqm1v79dF6b_1
# Waiting 5 blocks...
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as confirmation period is set to 10 blocks and we already waited 6 blocks during the voting process

../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 listen -b 5
# Alice updates proposal state of proposal 1
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 update-proposal-state //Alice 1
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 list-proposals
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 list-enactment-queue
# Waiting 10 blocks...
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 listen -b 10
# Alice updates proposal state of proposal 2
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 update-proposal-state //Alice 2
../target/release/encointer-client-notee -u ws://127.0.0.1 -p 9944 list-proposals
```
Copy link
Member

Choose a reason for hiding this comment

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

after just reading this, I don't get what the expected outcome of this tutorial is. I suggest to break up this console blob into meaningful pieces and add educational prosa

Questions:

  • the timing of the entire process is unclear to me. You're just waiting a couple of blocks for the whole flow. Is there any relevance of cycle phases at all?
  • would it make sense to have participants with varying reputation to demonstrate the mechanics of voting power?
  • enactment: With these commands I don't see that the proposals had an effect ( or not)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. cycles dont have any relevance, only confirmation period and reputation lifetime.
  2. could make sense, but i suggest that this is a basic tutorial and this is enough.
  3. we see that the proposal is approved and in the enactment queue. we just dont wait for the enactment.

Loading