Skip to content
/ AVID-go Public

Asynchronous verifiable information dispersal with libp2p in golang

License

Notifications You must be signed in to change notification settings

Xm0onh/AVID-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

855ddbf · May 30, 2024

History

46 Commits
May 30, 2024
May 26, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 28, 2024
May 26, 2024
May 28, 2024
May 30, 2024
May 25, 2024
May 30, 2024
May 28, 2024
May 30, 2024
May 30, 2024
May 30, 2024
May 28, 2024
May 28, 2024

Repository files navigation

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
)

About

Asynchronous verifiable information dispersal with libp2p in golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published