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
- Host: GitHub
- URL: https://github.com/application-research/fastcommp
- Owner: application-research
- License: mit
- Created: 2023-03-29T03:18:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T16:32:25.000Z (about 3 years ago)
- Last Synced: 2025-01-25T04:11:13.230Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
* benchmarks run on optimized AMD hardware with ~1TB available memory