Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Genesis Protocol Guide to creating an RChain network #986

Open
1 of 3 tasks
David405 opened this issue Sep 30, 2018 · 35 comments
Open
1 of 3 tasks

Genesis Protocol Guide to creating an RChain network #986

David405 opened this issue Sep 30, 2018 · 35 comments
Assignees
Labels
colab issues handled in the cooperation laboratory developer-education guide: @JoshyOrndorff cf. #692 Sep 29

Comments

@David405
Copy link

David405 commented Sep 30, 2018

Benefit to RChain

  • Provide guidance for validators aiming to create their own shard.

  • Assists node testers to create their own bootstrap network.

Budget and Objectives

  • Create a document for Genesis Protocol Guide. documentation

  • Slides

  • Self help video

Estimated Budget of Task: $[TBD]
Estimated Timeline Required to Complete the Task: [3 days]
How will we measure completion? [documentation, video reviewed and uploaded]

See CONTRIBUTING.md for details on budget and reward process.

Legal

Task Submitter shall not submit Tasks that will involve RHOC being transacted in any manner that (i) jeopardizes RHOC’s status as a software access token or other relevant and applicable description of the RHOC as an “asset”—not a security— or (2) violates, in any manner, applicable U.S. Securities laws.

@David405 David405 added the developer-education guide: @JoshyOrndorff cf. #692 Sep 29 label Sep 30, 2018
@David405 David405 self-assigned this Sep 30, 2018
@JoshOrndorff
Copy link

This is a great idea, and I will support it. It does need some revising though. Here's what I propose.

  • Do the whole process again with minimum of 5 signatures
  • Do it on node 0.7 (once it is released) so our documentation will be fresh for a month or more rather than becoming outdated in a few days.
  • Write in collaboration with someone like @jeremybeal11 or @TrenchFloat who are skilled writers. The current doc was clearly written by someone with good technical understanding but less editorial experience.

I imagine this will take 3 days for 2-3 people involved with the writing and a few hours for the other validators who participate but don't write.

This bounty is complete when we have a technically correct and complete document written in a style and quality acceptable for publication on blog.rchain.coop

proposed budget: $900

@jeremybeal11
Copy link

@JoshOrndorff i like your proposal. i'm more then willing to help when this comes to close to the 0.7 update.

@JoshOrndorff
Copy link

@David405 Do you want to take the technical lead on the technical aspects of this process along with @jeremybeal11 ?

@David405
Copy link
Author

David405 commented Oct 5, 2018

I am in touch with @jeremybeal11 and we seem to flow quite well, it wouldn't be a difficult process for us to work as a team.

@JoshOrndorff
Copy link

Wonderful. Assuming node 0.7 is released by October 12, is it reasonable to have a draft of the writeup by October 19th and a final version by October 25th?

@jeremybeal11
Copy link

@JoshOrndorff sounds good, and I do like our flow! @David405 lets put this on the calendar and work out a plan, and while we are discussing this lets 1) formalize the purpose of this project, 2) illustrate the outcome we expect, and 3) how would we measure its success.

@JoshOrndorff
Copy link

Preliminary node 0.7 release is available https://repo.pyr8.io/rchain/downloads/release-rnode-v0.7/

Anyone still interested here?

@David405
Copy link
Author

@JoshOrndorff I was actually thinking of using next week's release, I am of the view that the current release is not stable enough, I may be wrong?

@JoshOrndorff
Copy link

JoshOrndorff commented Oct 10, 2018 via email

@David405
Copy link
Author

Alright then but you would like for the process to be repeated?

@jeremybeal11
Copy link

@JoshOrndorff and @David405 i'm still interested. just let me know when everyone wants to do it!

@JoshOrndorff
Copy link

Someone just needs to step up and schedule the ceremony. @David405 @jeremybeal11 when do you want to have the ceremony? Do you have five participants yet?

@David405
Copy link
Author

@JoshOrndorff the ceremony isn't so much of a problem, I am only waiting to use tomorrow's node release. The ceremony can be done in CoLab's node office hours on thursday, there we should get a good number of persons to participate.

@glenbraun
Copy link

Hello. I'm interested in this subject. Would you mind if I work on it with you?

@JoshOrndorff
Copy link

@David405 That's a great plan. I recommend you write an official plan like Kelly does for Tuesday sessions.

  • Where will you meet. Time? zoom?
  • How long will it take?
  • What node version? Post the version number, git hash, and download link.
  • What do participants need to have ready? Key pairs? Join colab discord? node already running?

Post that plan here on colab discord, and on public discord. Keep up the great work.

@glenbraun Welcome. Will you need any more information than what I asked for?

@glenbraun
Copy link

glenbraun commented Oct 16, 2018

@JoshOrndorff I've been using the instructions in the Google doc. I've made progress but I don't think I have a working system.

I'm getting: "APPROVAL: Received BlockApproval from untrusted validator." Which, from rnode code, it looks like this happens because the signedByTrustedValidator() is false. There are a number of keys to specify and other configuration. I'm trying the --known-validators file but not sure I've got the right keys and format.

My setup is two Oracle VirtualBox machines. One running the bootstrap, the other the first validator. I do get 1 peers and the warning that the block approval was unsigned indicates to me they are communicating.

My bootstrap start command is:
rnode --grpc-host 192.168.56.102 run --data_dir ./bootstrap --standalone -n --host 192.168.56.102 --port 40400 --deploy-timestamp 1539722021 --required-sigs 1 --bonds-file /home/picalc/rchain/bootstrap/genesis/bonds.txt --duration 15sec --interval 15sec --known-validators ./bootstrap/known-validators.txt

My validator start command is:
rnode --grpc-host 192.168.56.103 run --data_dir ./validator-a -n --host 192.168.56.103 --port 40400 --bootstrap "rnode://[email protected]?protocol=40400&discovery=40404" --bonds-file ./validator-a/bonds.txt --genesis-validator --validator-private-key 8ed1d8874404c36105c69ac7479ecd173e63b5af6e3ef7ea82337f7782185de3 --validator-public-key 4e0335bb337402f79ba2196c3ee1e14cba590dbe715b549b803f817f1afaccdf --deploy-timestamp 1539722021 --required-sigs 1

@glenbraun
Copy link

I had the validator-private-key and validator-public-key wrong. I was using a public key value in the private key configuration setting. I've fixed that (and updated the comment above) and I don't get the warning about the "untrusted validator" anymore.

I now get: "Making a transition to ApprovedBlockRecievedHandler state." which indicates the network is up and running. I'll try some deploy's and such.

I also do not have a wallets file yet. I don't know what practical effect that has. I think this is the file of balances that would be transferred from Ethereum? If so, I'm guessing having those empty is fine for this test.

@glenbraun
Copy link

@JoshOrndorff You suggested to me that this task could be "could be expanded to showing how to bond new validators in the shard". I have a network with nodes, one the bootstrap and one a validator. Adding another node would, I think, be straightforward. Run rnode similar to running the first validator but with a different pub/priv key. I don't see how this creates another shard, just more validators on the same shard.

I have other questions too. For example, where would "rewards/penaties" be placed? That is, how do I see fees that I've collected? If there were a slashing operation performed, how would the slash bond amounts be distributed? I mean, how would I see that I've received some of them? Is there a wallet/purse associated with each validator?

@glenbraun
Copy link

Probably many of the answers of the above questions can be found here: https://rchain.atlassian.net/wiki/spaces/CORE/pages/478445641/Shards+in+RChain

Though, it would be interesting to do a step by step guide with examples of the concepts.

@JoshOrndorff
Copy link

There are no rewards fees or slashing implemented yet. Bonding means adding a validator after genesis, so showing how to bond is different from running the genesis ceremony with one more validator. In node 0.6 there were no real wallets, so that file didn't mean much. If there are wallets in genesis at node 0.7 (I don't know) we should show that.

I'm not claiming to have perfect knowledge of this process. Part of the fun of county hunting is figuring such things out. :)

@dckc
Copy link
Contributor

dckc commented Oct 20, 2018

We're trying 0.7.1 now in #node-runners.

@dckc
Copy link
Contributor

dckc commented Oct 20, 2018

no joy. My last failure mode was Block bonds don't match expected..

: 15:12:13.831 [tl-dispatcher-38] WARN  c.r.c.u.comm.BlockApproverProtocol - Received unexpected candidate from rnode://[email protected]?protocol=40400&discovery=40404 because: Block bonds don't match expected.

I made a few comments in the google doc too.

@TrenchFloat
Copy link
Contributor

Just made a fine comb through the document and made suggestions. @David405 let me know once you've seen them and think it's ready for the blog, and I can give it a second look.

@David405
Copy link
Author

David405 commented Oct 25, 2018

@TrenchFloat I made several edits to the document, you can give it a second look, I also replied some of your comments, probably we can reach a consensus.

@David405
Copy link
Author

@TrenchFloat I have made the final edit and I believe the document is ready to be uploaded on RChain blog.

@JoshOrndorff
Copy link

JoshOrndorff commented Oct 27, 2018

made a couple little suggestions for you to consider (didn't read the whole doc yet).

Bigger question, the last I see about whether the ceremony was successful, is that it wasn't. We should not publish instructions until we know they work.

@TrenchFloat
Copy link
Contributor

Made a couple more small suggestions - but I agree with @joshy. Is this something we need to get together to test? Or can we test separately?

@jeremybeal11
Copy link

@TrenchFloat i was just in the process of spinning up some AWS nodes and test it on my computer. if you want to do one today we totally can. if you're on discord my username is germany

@David405
Copy link
Author

@JoshOrndorff @jeremybeal11 @TrenchFloat I believe the reason it wasn't successfully when I led the ceremony might be that @jimscarver was the only testnet validator. During the relaunch of the testnet, I asked Kelly and she said those who were not present at Berlin to launch the testnet would not be able to sign the genesis block.

Remember, when @JoshOrndorff led the ceremony (last month), it was successfully, since the required sigs was 2 and both @JoshOrndorff and @jimscarver were present at RCon3.

@jeremybeal11
Copy link

That could be the case David. I will resume the ceremony later today now i know the wallet.text file have to be in the genesis folder.

@David405
Copy link
Author

@jeremybeal11 who are the participants?

@JoshOrndorff
Copy link

Hey guys, You may have figured some of this out by now, but just in case.

@David405 Anyone can run a genesis ceremony without anybody's permission. The reason only RCon3 people could sign genesis block for testnet is because The bonds file we use had those keys in it. Whoever you put in your bonds file is able to participate and sign the genesis block.

@jeremybeal11 .rnode/genesis is the default location for the wallets file, but you can put it anywhere you want if you use the --wallets-file option.

To learn more about the settings you can change run rnode --help

@David405
Copy link
Author

David405 commented Nov 1, 2018

@JoshOrndorff, @jeremybeal11 @Valentine-Mario and I have succeeded with this and made accompanying changes to the document with @TrenchFloat doing the edits. Kindly review the document one more time and tell me what you think. https://docs.google.com/document/d/1Z5Of7OVVeMGl2Fw054xrwpRmDmKCC-nAoIxtIIHD-Tc/edit#

@TrenchFloat
Copy link
Contributor

I made one (maybe last?) round of edits.

I propose a budget of $500 for writing, editing, and testing. @JoshOrndorff, what do you think?

@David405
Copy link
Author

David405 commented Nov 5, 2018

@TrenchFloat @JoshOrndorff we had four sessions where we tested this and had successes on two occasions i.e got the genesis block signed.

The document looks good for publication, at least we are sure the procedure works and also have done a lot of editing.

I believe the work done is more than $500 @TrenchFloat and accept the $900 proposed earlier by @JoshOrndorff, since @jeremybeal11 @dckc @jimscarver are all on SoW, @David405 @TrenchFloat and @Valentine-Mario would claim rewards for this.

@jimscarver jimscarver added the colab issues handled in the cooperation laboratory label Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
colab issues handled in the cooperation laboratory developer-education guide: @JoshyOrndorff cf. #692 Sep 29
Projects
None yet
Development

No branches or pull requests

7 participants