Git Product home page Git Product logo

private-blockchains's Introduction

Blockchain

introImage

A repository of private blockchains with different consensus algorithms and developed with the Go Ethereum implementation.

Index

How a Blockchain Works

What is a Blockchain

Source: Bitpanda

Features

Network

Each network (blockchain) has had a genesis block generated and is fully functioning (transactions have been made successfully during testing). The relevant network Id, network name, and other specifications can be found in the appropriate 'Keys, etc....txt' file or on the networkname.json file (substituting networkname for the actual name of the network).

Network Files

The networkname.json file will look something like this:

Network info

Below this 'network summary', you'll find the prefunded and precompiled accounts' public keys. The public keys for the nodes will be all the way at the bottom of this list.

So far, two different networks have been added with different consensus protocols (for more information on consensus protocols please refer to the CP notes).

Nodes

Each Blockchain contains two node files. These are full nodes that have already been initialized on the network- for more information on node creation and initialization, please refer to the node guide.

The first and second nodes have been conveniently-named firstNode and secondNode, respectively. Each of these nodes had a personal account created at the same time they were generated. The key pair for accessing the nodes' wallets (in the appropriate network) can be found in the relevant Keys, etc....txt file. Likewise, when using MyCrypto, one can also use the keystore file located in each of the nodes' folders.

Keys,etc... Node Files

For more information on the MyCrypto app, please refer to the installation guide

The commands for starting each of the nodes are also included in the Keys, etc....txt file. The only element that may change when hosting the blockchain on another local host is the enode- if so, simply copy and paste the first node's new enode:// address in the second node's start command.

firstEnodeSS secondEnodeSS

Links to more detailed explanations of these in the How to Use section below.

How to use

Note: Geth should already be installed prior to booting up and using the network. Please refer to the install guide

Starting the nodes, ports, and connections:

For particular commands and/or a more comprehensive, step-by-step guide regarding startup of nodes on Blockchains with a particular consensus, please refer to the individual README.md inside each network's folder:

The start commands for the nodes are included in the Keys, etc....txt file and should be run from inside the /Geth folder.

Adding the Custom Network to MyCrypto:

With both nodes up and running, the blockchain can be added to MyCrypto for testing.

  • Open up MyCrypto, then click Change Network at the bottom left:

change network

  • Click "Add Custom Node", then add the custom network information that you set in the genesis.

  • Make sure that you scroll down to choose Custom in the "Network" column to reveal more options like Chain ID:

custom network

  • Type ETH in the Currency box.

  • The chain ID must match what you came up with earlier.

  • The URL is pointing to the default RPC port on your local machine. Use http://127.0.0.1:8545.

  • Once you save and use the network, double-check that it is selected and is connected.

Now that you are connected to your blockchain, you will need to load a private key that you created and funded on the network.

  • If you are logged in to another wallet, you'll need to click Change Wallet on the top right, but make sure you are connected to your custom network.

  • When you log into a pre-funded wallet, you will see the balance that was allocated to this account in the genesis configuration; however, these are just for testing purposes.

prefunded account

Resources

-Useful links
-Blockchain FAQs
-Terminology Cheatsheet
-Installation Guides
-Notes on Consensus Algorithms
-Additional guides on node creation, genesis block creation, and transactions on the blockchain can also be found in the References section of the repo.

private-blockchains's People

Contributors

santiago-pedemonte avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.