Coder Social home page Coder Social logo

avid-go's Introduction

AVID With LT - RS erasure coding algorithm

Asynchronous verifiable information dispersal with libp2p in golang

Manual running - Bootstrap Nodes:

go run ./cmd/main.go -node=<BootstrapNode$id> -bootstrap=true -port=<PORT> -ip=<IP> -coding=<RS/LT>

Manual running - Dispersal Node:

go run ./cmd/main.go -node=Node1 -port=<PORT> -ip=<IP> -coding=<RS/LT>

Manual running - Retriever Node:

go run ./cmd/main.go -node=<Node$id> -port=<PORT> -ip=<IP> -coding=<RS/LT>

Automatic running (Prefered):

./StartNodes.sh

Stop all the nodes:

ps aux | grep go | grep -v grep | awk '{print $2}' | xargs kill -9

Config:

const (
	ExpectedChunks = 6
)

// Reed-Solomon parameters
const (
	DataShards   = 5
	ParityShards = 3
)

// Luby-Transform parameters
const (
	LTSourceBlocks      = 5
	LTEncodedBlockCount = 7
	RandomSeed          = 42
)

var (
	NodeID         string
	CodingMethod   string
	Nodes          = 10
	ReceivedChunks = sync.Map{}
	SentChunks     = sync.Map{}
	NodeMutex      = sync.Mutex{}
	ConnectedPeers []peer.AddrInfo
	Node1ID        peer.ID
	ReceivedFrom   = sync.Map{}
	Counter        = 0
	// Must be changed to the coding method
	// if LT then it should be LTEncodedBlockCount
	// if RS then it should be DataShards + ParityShards
	ChunksRecByNode = make([][]byte, DataShards+ParityShards)
	ReadyCounter    = 0
	StartTime       time.Time
	OriginalLength  = 29283680
)

avid-go's People

Contributors

xm0onh avatar

Watchers

 avatar

avid-go's Issues

Dispersal node must be dynamic

Basically, right now the first node is the dispersal node. However, in the proper setup, other peers must detect the dispersal node form a handshake message.

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.