Giter Club home page Giter Club logo

go-leopard's Introduction

go-leopard's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

go-leopard's Issues

Decide on future of (go-)leopard

leopard is unmaintained and we did some (minor) modifications to the C++ code already.

There are several paths we could go with this library:

  1. maintain and improve the C++ library and continue using it via cgo (like this repository does)
  2. re-implement the algorithm in golang
  3. re-implement the performance-critical parts in assembly and package it directly with the go-code (e.g. like On the long run, we should consider to implement parts of leopard in assembly (seriously) and integrate it directly in go-code (like e.g. sha2 in golang's crypto lib: https://golang.org/src/crypto/sha256/)

I think 3. would be the cleanest and probably also the most performant solution (but it also is the most time-consuming). Some tools might help us generate the assembly from the c code, e.g. https://github.com/minio/c2goasm#a-simple-example but they require more investigation: we'd first need to clarify which functions from leopard e.g. using AVX2 intrinsic we'd really need and also if there are still up to date (@adlerjohn reported benchmarks seem slower on a bleeding-edge AMD machine ๐Ÿค” ), then we could generate assembly for those few functions and write the remaining code plain golang.

Cannot repair codes with 2 chunks in them

goos: linux
goarch: amd64
pkg: github.com/celestiaorg/rsmt2d
cpu: 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz
BenchmarkRepair/RSGF8_1x1x256_ODS-16         	   98379	     12215 ns/op
BenchmarkRepair/LeopardFF8_1x1x256_ODS-16    	panic: runtime error: index out of range [1] with length 1

goroutine 53 [running]:
github.com/celestiaorg/go-leopard.Decode({0xc000108990?, 0x1, 0x0?}, {0xc0001089a8?, 0x1, 0xc00006dcc8?})
	/home/mus/go/pkg/mod/github.com/celestiaorg/[email protected]/wrapper.go:171 +0x14a
github.com/celestiaorg/rsmt2d.leoRSFF8Codec.Decode({}, {0xc000108990?, 0x30?, 0x0?})
	/home/mus/Code/rsmt2d/leopard.go:26 +0x54
github.com/celestiaorg/rsmt2d.(*ExtendedDataSquare).rebuildShares(0xc0003c8000, 0x0, {0xc000108990?, 0x2, 0x2})
	/home/mus/Code/rsmt2d/extendeddatacrossword.go:234 +0x58
github.com/celestiaorg/rsmt2d.(*ExtendedDataSquare).solveCrosswordRow(0xc0003c8000, 0x0, {0xc0004216e0, 0x2, 0x2}, {0xc000421710, 0x2, 0x2})
	/home/mus/Code/rsmt2d/extendeddatacrossword.go:131 +0x1d4
github.com/celestiaorg/rsmt2d.(*ExtendedDataSquare).solveCrossword(0xc0003c8000, {0xc0004216e0, 0x2, 0x2}, {0xc000421710, 0x2, 0x2})
	/home/mus/Code/rsmt2d/extendeddatacrossword.go:83 +0xd6
github.com/celestiaorg/rsmt2d.(*ExtendedDataSquare).Repair(0xc00014ad80?, {0xc0004216e0, 0x2, 0x2}, {0xc000421710, 0x2, 0x2})
	/home/mus/Code/rsmt2d/extendeddatacrossword.go:66 +0x7a
github.com/celestiaorg/rsmt2d.BenchmarkRepair.func1(0xc00014ad80)
	/home/mus/Code/rsmt2d/extendeddatacrossword_test.go:209 +0x21c
testing.(*B).runN(0xc00014ad80, 0x1)
	/usr/local/go/src/testing/benchmark.go:193 +0x102
testing.(*B).run1.func1()
	/usr/local/go/src/testing/benchmark.go:233 +0x59
created by testing.(*B).run1
	/usr/local/go/src/testing/benchmark.go:226 +0x9c
exit status 2
FAIL	github.com/celestiaorg/rsmt2d	2.837s

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.