GithubHelp home page GithubHelp logo

kalrashubham49 / flow-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onflow/flow-go

0.0 1.0 0.0 262.71 MB

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.

License: GNU Affero General Public License v3.0

Shell 0.09% Perl 0.05% C 0.77% Go 98.32% Assembly 0.34% Makefile 0.39% Dockerfile 0.04%

flow-go's Introduction

Flow GoDoc

Flow is a fast, secure, and developer-friendly blockchain built to support the next generation of games, apps and the digital assets that power them. Read more about it here.

Table of Contents

Getting started

Documentation

You can find an overview of the Flow architecture on the documentation website.

Development on Flow is divided into work streams. Each work stream has a home directory containing high-level documentation for the stream, as well as links to documentation for relevant components used by that work stream.

The following table lists all work streams and links to their home directory and documentation:

Work Stream Home directory
Access Node /cmd/access
Collection Node /cmd/collection
Consensus Node /cmd/consensus
Execution Node /cmd/execution
Verification Node /cmd/verification
HotStuff /consensus/hotstuff
Storage /storage
Ledger /ledger
Networking /network
Cryptography /crypto

Installation

Clone Repository

  • Clone this repository

  • Clone this repository's submodules:

    git submodule update --init --recursive

Install Dependencies

  • Install Go (Flow supports Go 1.16 and later)

  • Install CMake, which is used for building the crypto library

  • Install Docker, which is used for running a local network and integration tests

  • Make sure the GOPATH and GOBIN environment variables are set, and GOBIN is added to your path:

    export GOPATH=$(go env GOPATH)
    export GOBIN=$GOPATH/bin
    export PATH=$PATH:$GOBIN

    Add these to your shell profile to persist them for future runs.

  • Then, run the following command:

    make install-tools

At this point, you should be ready to build, test, and run Flow! ๐ŸŽ‰

Note: if there is error about "relic" or "crypto", trying force removing the relic build and reinstall the tools again:

rm -rf crypto/relic
make install-tools

Development Workflow

Testing

Flow has a unit test suite and an integration test suite. Unit tests for a module live within the module they are testing. Integration tests live in integration/tests.

Run the unit test suite:

make test

Run the integration test suite:

make integration-test

Building

The recommended way to build and run Flow for local development is using Docker.

Build a Docker image for all nodes:

make docker-build-flow

Build a Docker image for a particular node role (replace $ROLE with collection, consensus, etc.):

make docker-build-$ROLE

Local Network

A local version of the network can be run for manual testing and integration. See the Local Network Guide for instructions.

Code Generation

Generated code is kept up to date in the repository, so should be committed whenever it changes.

Run all code generators:

make generate

Generate protobuf stubs:

make generate-proto

Generate OpenAPI schema models:

make generate-openapi

Generate mocks used for unit tests:

make generate-mocks

flow-go's People

Contributors

jordanschalm avatar turbolent avatar psiemens avatar synzhu avatar tarakby avatar m4ksio avatar ramtinms avatar yhassanzadeh13 avatar kay-zee avatar zhangchiqing avatar durkmurder avatar janezpodhostnik avatar kc1116 avatar vishalchangrani avatar arrivets avatar philipstanislaus avatar danuio avatar mrbrianhobo avatar bors[bot] avatar supuns avatar huitseeker avatar gomisha avatar pazams avatar fxamacker avatar gitferry avatar vishalchangraniaxiom-old avatar dsainati1 avatar dwightguth avatar peterargue avatar simonhf avatar

Watchers

James Cloos 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.