Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Create custodian.json schema #2

Closed
lukestokes opened this issue Jul 6, 2018 · 12 comments
Closed

Create custodian.json schema #2

lukestokes opened this issue Jul 6, 2018 · 12 comments

Comments

@lukestokes
Copy link
Contributor

I propose we define a schema for how we want to collect information about custodians to be used in our toolkit.

From the design document:

bio (hash) - Link to IPFS file containing structured data about the candidate (schema.org preferred)

@afurmanczyk
Copy link

Hi,
I believe it's very important that voters have a clear idea about, basic info about the candidates, their general location in the world, what they would like to be paid, their background, list reasons why they would make a good custodian, and lastly state what actions they will take if elected as a custodian. Not having this information clearly visible for all token holders invites misinformed voting which hurts the ability of voters to make informed decisions about who they want to represent them in the DAC.

I'd like to propose this field structure for the Custodian Candidates to make things clear to voters:

Profile Picture: Doesn't need to be of the actual custodian, could be a picture of a cat, but it shouldn't be of another person other than themselves, like Donald Trump or your wife etc, so that the voters are not misled or confused about who you are. Summary: Picture is either YOU or a non-person image.

Name: Can be first name or full name. (Maybe a sudo name also?)

Location: Doesn't have to be a physical address, but a general geographical region would be good, so voters are aware if all custodians are coming from just 1 country or if they're more spread around the world.

Requested Pay: Custodian enters their requested pay so it's transparent to everyone.

Background: Custodian Candidate has up to 500 words to summarize their background and experience.

Reasons why they would be a good custodian: This is where a Candidate can put forward the reasons they believe they would be a good custodian. (Up to 500 words.)

If elected as a custodian what would I do?
This is a portion where candidates communicate to voters what actions they will take if elected. (Up to 200 words.)

Finally, I agree with Luke, that this could hosted by IPFS and each custodian should have an on-chain log of every vote they have made or missed while acting as an elected custodian.

@lukestokes
Copy link
Contributor Author

lukestokes commented Jul 9, 2018

Cool, thanks @afurmanczyk.

Currently, these are the properties suggested for the regcandidate call:

  • account (account_name)
  • bio (ipfs_hash/url)
  • requested_pay

So based on that, I don't think we'll need requested pay as part of the candidate bio also.

The "what would I do" part is quite interesting in that the primary role of custodians is to just vote on worker proposals (as far as I understand). Anything beyond that would/should be handled as a worker proposal. By that I mean they shouldn't inflate their requested custodian pay based on other value adds. If a custodian is involved in a WP being voted on, they can abstain from that vote according to my understanding of the constitution. The final pay of the custodians is determined via:

Emoluments of each Custodian during a term shall be the average of the Nominee Emoluments Declaration of Custodians appointed for such term divided by twelve (12)

According to 5.8 of the constitution.

Similar to the bp.json spec, I'd also like to see optional fields for social media accounts, links to a website, etc.

@afurmanczyk
Copy link

Sorry, I think the "What would I do" was unclear.

It's a place for candidates to explain their stance on issues and also highlight their direction. As a voter I would find this extremely important to know. If one candidate wants to focus on tech development, while someone else wants to fund a lot of meet ups, vs someone wants to pay out a lot of "dividends" this is critical information.

It's more of like:

  • what direction would I take the DAC in?
  • what work do I value to be done for the DAC in WPs?
  • what sort of things would I vote for/against?
  • any other promises etc they want to make to voters that they will or won't do as a custodian

@saromckenna
Copy link

saromckenna commented Jul 16, 2018

I would like to suggest including a field where a candidate can indicate if any other tokenholder or past/present Custodian is endorsing them.

I realise there are downsides to this (cliques/networks forming) but the upsides are very practical and real. As has been much discussed, the paradox of voting (the Downs paradox) means voters are faced with a task of researching that can be disproportionate to what they gain. This is why electoral slates and eventually political parties form - so that voters can outsource candidate vetting. Luke I know you run a BP proxy voting tool for, I presume, this reason.

Endorsement information - something like 'I've been endorsed by xyz' - could just be included in a free text field. But I think that for non-English voters it might be nice to have it separated out; additionally if it were possible for a notification to go to the endorser, they would know if someone were claiming to be endorsed when they weren't.

If this is unpopular, let's not do it. I do think we'll find voters seeking this kind of information about candidates.

@afurmanczyk
Copy link

That's an interesting idea Saro. I like how you've framed it, and I agree there's value for token holders in seeing who is endorsing who. One thing I'd like to say though is that I'd much prefer endorsements to be done on chain and then provable, so that way people don't just list a bunch of fake endorsements and get support in a misleading way.

This might not be a core needed feature right at launch, so if people agree they like it, maybe it could be a WP for development once the elected custodians are in place?

Overall great idea, I can see the utility.

@lukestokes
Copy link
Contributor Author

@saromckenna I do think endorsements are important, but as Andrew said, they have to be on chain. If a custodian is endorsed by xyz, then xyz votes for them as a custodian and that should be clear. What might be interesting is within the interfaxe showing the top supporters of a custodian by stake weight using something like this: https://labs.eostitan.com/#/account-profiles

image

@saromckenna
Copy link

That would work!

@lukestokes
Copy link
Contributor Author

lukestokes commented Jul 23, 2018

I don't have much experience with Schema.org, but looking through the Person schema, I think that gives us basically everything we'd need: https://schema.org/Person

Here's an example:

{
  "givenName": "John",
  "familyName": "Doe",
  "gender": "Male",
  "description": "Here's a bit about myself and why I'm qualified to be a custodian for eosDAC. I've helped the DAC in the following ways... and if elected, I would...",
  "email": "john.doe@example.com",
  "url": "https://example.com",
  "image": "http://example.com/myimage.jpg",
  "sameAs": [
    "https://www.facebook.com/john-doe",
    "https://twitter.com/johndoe",
    "https://plus.google.com/john_doe"
  ],
  "timezone": "CDT"
}

When I try to think about more complicated things we might want to add for a custodian like Actions or Events, it just gets confusing. I was thinking of adding nationality, but Country in schema.org is confusing. I don't know if I can just add a new property like "timezone" but it makes sense to me. I'm thinking we probably don't need phone number? How do we want to handle chat handles for things like WeChat, Discord, Telegram, etc where they don't have a url structure?

The "sameAs" approach appears to be how Google handles structured data, so I figured that would make sense. Applications could clearly look for values in the url such as "twitter" to categorize them into something meaningful (and show icons, etc).

Naming stuff is hard. @michaeljyeates or @dali1986 any additional ideas? Is this in line with what you had in mind?

We can use a tool like this to get a cleaned up schema once we figure out what we want: https://jsonschema.net/

@dali1986
Copy link
Member

The Schema.org details looks fine and I think a single pitch text field is fine which can be the description field. That way we will have freeform answers to 'why should you be a custodian?' hopefully this will allow for more creativity and if people are struggling then the question prompts can be put as a guide. I think that people should only fill in details they are comfortable sharing but ultimately the voters will decide how much information they want from their custodians.

Just double checking only the link will be stored on chain as any personal data on chain will only become more problematic due to blockchain ignorant regulation such as GDPR and right to be forgotten. We probably also need a simple tool to allow candidates to generate their schema file.

@lukestokes
Copy link
Contributor Author

We probably also need a simple tool to allow candidates to generate their schema file.

Yeah, that's the next thing I was thinking about. If you're cool with this being a version 1 start, we can start with that.

@dali1986
Copy link
Member

Yes, On this I think it is a good thing to start with the skeleton and iterate if needs are found.

@lukestokes
Copy link
Contributor Author

I'm going to close this out for now as it seems like a fair enough start.

Here's some HTML I through together for creating the json file as well which Kas used to build something directly in the tool.

<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script
	  src="https://code.jquery.com/jquery-3.3.1.min.js"
	  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
	  crossorigin="anonymous"></script>
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<!-- Latest compiled and minified JavaScript -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

</head>
<body>
<div class="container-fluid">
Example:
<pre>
{
  "givenName": "John",
  "familyName": "Doe",
  "gender": "Male",
  "description": "Here's a bit about myself and why I'm qualified to be a custodian for eosDAC. I've helped the DAC in the following ways... and if elected, I would...",
  "email": "john.doe@example.com",
  "url": "https://example.com",
  "image": "http://example.com/myimage.jpg",
  "sameAs": [
    "https://www.facebook.com/john-doe",
    "https://twitter.com/johndoe",
    "https://plus.google.com/john_doe"
  ],
  "timezone": "CDT"
}
</pre>
<form name="custodian_json_form" id="custodian_json_form">
<div class="form-group">
	<label for="givenName">Given Name:</label>
	<input type="text" class="form-control" name="givenName" id="givenName" value="">
</div>
<div class="form-group">
	<label for="familyName">Family Name:</label>
	<input type="text" class="form-control" name="familyName" id="familyName" value="">
</div>
<div class="form-group">
	<label for="gender">Gender:</label>
	<input type="text" class="form-control" name="gender" id="gender" value="">
</div>
<div class="form-group">
	<label for="timezone">Timezone:</label>
	<input type="text" class="form-control" name="timezone" id="timezone" value="">
</div>
<div class="form-group">
	<label for="description">Short Self Description:</label>
	<input type="text" class="form-control" name="description" id="description" value="">
	<p class="help-block">In your self-description, include your qualifications as and eosDAC custodian.</p>
</div>
<div class="form-group">
	<label for="email">Email:</label>
	<input type="text" class="form-control" name="email" id="email" value="">
</div>
<div class="form-group">
	<label for="url">Website URL:</label>
	<input type="text" class="form-control" name="url" id="url" value="" placeholder="https://example.com">
</div>
<div class="form-group">
	<label for="image">Profile Picture URL:</label>
	<input type="text" class="form-control" name="image" id="image" value="" placeholder="https://example.com/your_picture.png">
</div>
<div class="form-group">
	<label for="sameAs_1">Social Profile URL 1:</label>
	<input type="text" class="form-control" name="sameAs_1" id="sameAs_1" value="">
	<p class="help-block">Please include the full URL of your favorite social media and profile pages such as Steemit, Facebook, Twitter, Github, Keybase, YouTube, Google Plus, etc</p>
</div>
<div class="form-group">
	<label for="sameAs_2">Social Profile URL 2:</label>
	<input type="text" class="form-control" name="sameAs_2" id="sameAs_2" value="">
</div>
<div class="form-group">
	<label for="sameAs_3">Social Profile URL 3:</label>
	<input type="text" class="form-control" name="sameAs_3" id="sameAs_3" value="">
</div>
<div class="form-group">
	<label for="sameAs_4">Social Profile URL 4:</label>
	<input type="text" class="form-control" name="sameAs_4" id="sameAs_4" value="">
</div>
<div class="form-group">
	<label for="sameAs_5">Social Profile URL 5:</label>
	<input type="text" class="form-control" name="sameAs_5" id="sameAs_5" value="">
</div>
<div class="form-group">
	<label for="sameAs_6">Social Profile URL 6:</label>
	<input type="text" class="form-control" name="sameAs_6" id="sameAs_6" value="">
</div>
<div class="form-group">
	<label for="sameAs_7">Social Profile URL 7:</label>
	<input type="text" class="form-control" name="sameAs_7" id="sameAs_7" value="">
</div>
<div class="form-group">
	<label for="sameAs_8">Social Profile URL 8:</label>
	<input type="text" class="form-control" name="sameAs_8" id="sameAs_8" value="">
</div>
<div class="form-group">
	<label for="sameAs_9">Social Profile URL 9:</label>
	<input type="text" class="form-control" name="sameAs_9" id="sameAs_9" value="">
</div>
<div class="form-group">
	<label for="sameAs_10">Social Profile URL 10:</label>
	<input type="text" class="form-control" name="sameAs_10" id="sameAs_10" value="">
</div>

<p>Output:</p>
<textarea class="form-control" rows="20" name="custodian_json" id="custodian_json"></textarea>

<button name="copy_button" id="copy_button" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="top" title="Click to copy" onclick="copyCustodianJSON()">Copy JSON</button>

</form>

<p>Copy this JSON and save it as a new <a href="https://gist.github.com/">gist on Github</a> or as a file on any other website which will allow free access to the file. You can name it custodian.json. Use the URL to this raw file as your custodian bio.</p>

<script>

$( document ).ready(function() {

	$("#custodian_json_form input").change(function(){
		var input_val = $( this ).val();
		var field_name = this.name;
		if (field_name in custodian_json) {
			custodian_json[field_name] = input_val;
		}
		var update_sameas = false;
		if (field_name.indexOf('sameAs_') != -1) {
			update_sameas = true;
		}
		if (update_sameas) {
			rebuildSameAs();
		} else {
			updateJSONTextarea();
		}
	});
	$('[data-toggle="tooltip"]').tooltip();
});


function rebuildSameAs() {
	var sameAs = [];
	$("#custodian_json_form input[name^=sameAs]").each(function(index, element) {
		if ($(element).val() != "") {
			sameAs[sameAs.length] = $(element).val();
		}
	});
	custodian_json.sameAs = sameAs.slice();
	updateJSONTextarea();
}

function updateJSONTextarea()
{
	$("#custodian_json").val(JSON.stringify(custodian_json, null, 2));	
}

function copyCustodianJSON() {
	/* Get the text field */
	var copyText = document.getElementById("custodian_json");
	copyText.select();
	document.execCommand("copy");
	return false;
}

var custodian_json = {
  "givenName": "",
  "familyName": "",
  "gender": "",
  "description": "",
  "email": "",
  "url": "",
  "image": "",
  "sameAs": [],
  "timezone": ""
};


</script>

</div>
</body>
</html>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants