 Hi everyone. I'm going to use this video to show you how to deploy a community governance using governance for Git and how to conduct polls on various issues. Okay, so as a first order of business, let me mention that in the governance for Git repo, you're going to find a file called walkthrough.sh, which contains all of the material and steps that I'm going to cover in this video. So I'm going to open a terminal here and start with the first order of business, which is to install the governance for Git application. This is a Go application, so we're just going to use a standard workflow like so. And I'm going to make sure it has been installed. There we go. Okay. Now that we have the software ready, the first thing everybody needs to do, regardless of their role in the community, whether you're an organizer or a community member, you need to create your own identity. So your own identity is held in a Git repository, which you have to create for the software to use. Each identity, every person requires two repositories, one public, one private. The public one holds your public credentials, as well as other information used by the software. And your private repository holds your private credentials. So I will create a repository for myself. And I'll call it better public. And I'm going to make sure that it's public. Here we go. And then I'm also going to create a repository for my private credentials, better dash private. And I'm going to make sure it's private, so only I can write to this repository or read from it. There we go. Now, this is what every member of the community needs to do. Now, because I'm also playing the role of the community organizer, in other words, the person who is going to deploy the community governance, and I'm going to manage it and administer it. I also need to create a public and private repository for the community itself. And I'm going to do this. And I'm going to call my community repository community dash public. This would be the public repository of the community. This repository is going to hold the community's public credentials, as well as all community governance records for everybody to inspect and audit if need be. So this would be a public repository. I'm going to create it. And similarly, I'm going to create one private repository for the community, which is going to hold the community's private keys. Make sure it's private and create. Okay. So now I have two repositories, public and private, for my own personal identity. And I also have a public and private repository for the community itself. Now, I'll get back to the command line. And the first thing I need to do is to configure my command line client with the information about my personal as well as the community repositories. So the configuration for governance for Git by default resides in your home directory slash dot gov forget config dot json. I'm going to open this file. I have prefilled this file. So let me just explain what all the fields mean. I start by telling the client what is the URL of the public governance repository. I tell it also the branch where I want the application to keep its data. I do the same thing for the private repository for the community. And I also do the same thing for my personal public and private repositories. So if you are not the administrator or the organizer for the community, you will not be entering this information about the private community repository. But the rest of the config should look the same. Finally, I need to tell the application how to authenticate into the private repositories that I'm going to be accessing. And to do this, I use this auth section, which basically says for this URL, use the following SSH credentials, which are found in the standard location on my local hard drive. So I do this for the private community repository, which I'm going to have access to because I'm the organizer. So if you're a community member, you wouldn't have this line. And for my personal private repository, I'm also going to use the same SSH credentials. Okay. Once we have this file, we can, we can close it. And now we can use the governance forget application. Okay. So the first thing we're going to do is we need to initialize my identity. So this would be accomplished using gaffer get clients, the initialize identity command. So enter. And after a brief wait, our identity is initialized. So what happened? I want to show you what happened. If I go to my public and private repositories, we'll see that they have been populated. So my public repository is going to have my public credentials, which essentially holds some public signing keys. And similarly, my private repository will be populated with my private credentials. So I'm ready to use the system as my identity has been initialized. Now, I'm going to put on my head of the community organizer. And I'm also going to initialize the community repository. So this is done using the command initialize governance. Very similar. And once it's ready, I'm going to also double check here that my governance repositories were both populated respectively. Okay. Now I'm ready to start using the application. So a community uses an abstraction of users and groups that is very similar to users and groups in a unique system. And as a community organizer, I can add users, create groups and add users to groups. And I'm going to show you how to do this. So right now, the community is initialized, it has no users in it. So my first step would be to create a user for myself. So I execute governance forget user add. I pick a name for the user that I want to add. This name can be anything you like, as long as it is unique in the context of this community. So I'm going to pick better for myself. And I need to specify the user's identity by providing the URL of this user's public repository, which in our case was github.patter.patter.public.git and uses the main branch. Okay. So this added the user to the community. And if you're wondering where the state is being updated, this would be in the community's public repository. Now you can see that there's a new directory here, members that basically codifies this new user. In general, every user that's added to a community automatically gets added to the group called everybody. So I can verify that the user was created by listing this group. So I will say governance forget group list. And the name of the group that I want to list is group everybody. And I can verify here that there is one user called better. Great. Now I would like to show you how to create a new group. Perhaps we'll call it contributors that can hold a list of users that are contributing to the source code, for instance. I will say governance forget group add the name of the group that I want to use. So contributors. Again, you can pick any name you like as long as it's unique in the context of the community. So this command will create the group itself. But the group will be empty, which I can verify by listing its contents. The group will be empty. And now I'm going to add the user better to this group. So I use governance forget. Member add which user. So username better. And I'm adding it to which group group named contributors. So this command should add better to the group contributors. And then I can verify that this happened by listing the contents of this group. Okay. Finally, I'm going to be interested, of course, in participating in voting. And every user is associated with account balances with different kinds of tokens. And voting requires that I have voting credits. So as an administrator, I'm going to give myself some voting credits so we can try voting later on. For this, I will use the command governance forget balance. This command balance has lots of subcommands for dealing with user balances. You can read about them using the help. So in fact, at any point, you can put a dash H and figure out what subcommands are available. I'm going to use the command add balance in this case. So I'm going to say governance forget balance add. So first I specify which user am I adding to. This would be the user pattern. The key flag specifies the name of the of the balance that I'm adding to. And in this case, I want to add voting credits. This particular balance voting under underscore credits is the balance that the system uses when users vote on polls or referendums etc. And finally, using the value flag, I'm going to specify how many credits I want to give to this user better. In this case, I will give myself 30 credits. Okay, done. And now I will just make sure that I actually have the credits. So I'm going to use the balance command again, I'm going to look at the help to remind myself, oops, governance forget, I will look at the help to remind myself, what was the name of the command for reading my credits, it's the command get. I will look for the help of this command. So I need to specify the type of balance and for which user. So I'm going to say, I'm interested in the balance of user pattern. And the balance is named voting credits. So let's see what I get. Okay, just as we expect, I have 30 credits available for voting purposes. Cool. So now that I have a balance and a user, let's showcase how we can create a ballot and invite people to vote. And then we're going to cast a vote. So the I'm putting my head of the community organizer again, so the community organizer can create a ballot using the ballot commands and sub command open. So ballot open, I need to give a name to the ballot. And in this example, I'm going to call my ballot issue slash one. So ballot names can be any valid path name. All ballots have to have unique names. They're all going to be kept in the governance records for eternity for people to look at and look both at current and at past ballots. So you have to make sure that you pick sort of meaningful unique names. So this ballot is going to be called issue slash one. I'm going to give it a title, which is a human readable description, a short description of the ballots. And I will also give it a longer human readable description. You can put whatever text you like here. Typically, you might be conducting a vote where the vote pertains to some particular issue or a pull request or something that has a link. And it's advisable that you put the link in the description so that people can find more information about the ballot. Then I need to specify who is eligible to participate in this ballot. And for this purpose, I specify a group that can participate. So I'm going to say that the contributors group in the community can participate in this ballot. And finally, I need to specify what are the choices within the ballot that people can vote on. I will create a ballot with only one choice. And I'll just call it I one for issue one. But you could also have multiple, multiple choices to vote on. So let's create the ballot. Okay, so now this ballot has been created and it's open for users of the community to vote on it, up vote or down vote. And they can do so until the ballot is formally closed by the organizer, which we're going to do later. So now that the ballot is open, I am going to, again, put my hat of just a regular member of the community. And I'm going to cast a vote on this ballot. So I'm going to use the government's forget command ballot vote. And I have to specify which ballot I'm voting on. So I provide the name of the ballot here issue slash one. Then I specify the choice that I want to vote on, in this case, I one. And finally, using the flag strengths, I will specify how many voting credits I want to cast to choice I one in this ballot. So this could be a positive or a negative number in case you want to up or down vote, respectively. But the number of tokens that you cast, the number of voting credits that you cast must be available in your voting credits balance. So let me cast negative three votes for this particular choice. And let's see what happens. Okay, so this went through. Now I've cast my vote. But my vote is not going to be reflected in the ballot tally until the organizer of the community collects the currently outstanding votes. So putting my hats of the community organizer again, I will say governance forget ballot tally, meaning that so the command tally essentially has the effect of collecting all uncollected votes that have been cast by community members and incorporating them in the current tally. So I need to specify what is the ballot that I'm tallying. So this would be issue slash one. And let me make this window a little bit bigger and execute this command. Okay, so the tally went through successfully. And you're going to get Jason output that contains a lot of information, you know, it has a description, it has a description of the ballot itself, as well as a description of all the votes that have been fetched so far, as well as the current tally. You will notice that the tally here is minus 1.7 rather than minus three, which is how much voting credits we cast to it. This is because our this particular ballots use the defaults balloting strategy, which uses quadratic voting. And so we have the square root of three as as what's actually being cast into the into this choice. Okay, so in general, when an organizer opens a ballot, they would keep it open for probably multiple days, they will notify members of the community that balloting is is is open. And it's throughout throughout the period when the ballot is open. The community organizer can occasionally run the tally command to collect outstanding votes and incorporate them in the final tally. Once the tally, the period for voting has expired, the organizer has to close the ballot, which means that no more votes will be accepted and the final tallies will be computed and frozen. And so this is done with the command governance forget ballot. Close and then the name of the ballots issue one. Oh, and let's look at the help of this command. We there's one more parameter that I need to specify summary summary specifies an outcome that it's a parameter that you can pass to the balloting algorithm. Oftentimes, it's not necessary. So we can just pass an empty string or we can just say, okay. For some different kinds of voting schemes, the summary parameter would be necessary and it would it would be specified in the specific type of voting scheme that you're using. Okay, so this ballot was closed and the final tallies are printed out here. If at any point in time, you want to view the current tally of an open ballots or the final tally of a closed ballot, whether you're an organizer or just a regular community member, you can do so again using the ballot command. Let's look at the help. Using the subcommands show open or show closed. In this case, we closed the ballot so we can use the show closed command to remind ourselves of the final tally for this ballot. So I can say, show me the talent for the closed ballot code issue slash one. And this would give us a JSON representation of the final outcome. This is it for now. Thank you for listening and make sure to look around the various subcommands that are available through the command line tools help. They're all fairly well documented and describe all the functions that you can perform. There's quite a few more functions that I wasn't able to cover. Thank you.