An open API service indexing awesome lists of open source software.

https://github.com/application-research/fastcommp

Filecoin fast piece commitment summation tool
https://github.com/application-research/fastcommp

Last synced: 10 months ago
JSON representation

Filecoin fast piece commitment summation tool

Awesome Lists containing this project

README

          

# fastcommp

Filecoin fast piece commitment summation tool.

# usage

```go
package main

import (
"fmt"
"github.com/application-research/fastcommp"
)

func main() {
fast := new(fastcommp.CommpWriter)
fast.Write(data)
sum, err := fast.Sum()
if err != nil {
panic(err)
}
fmt.Printf("commP: %s\n", sum.PieceCID.String())
}
```

# build

`make build`

# execute

`./fastcommp `

## optional: create car dummy data

1. create an 8 GiB test file

`
dd if=/dev/urandom of=8G-payload.bin bs=1M count=8192
`

2. car it up with `https://github.com/ipld/go-car` (install with `go install github.com/ipld/go-car/cmd/car@latest`)

`
car c --version 1 -f 8G-payload.bin.car 8G-payload.bin
`
# benchmarks

Screenshot 2023-04-25 at 4 41 58 PM
* benchmarks run on optimized AMD hardware with ~1TB available memory