-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1472d69
commit 3c66c99
Showing
62 changed files
with
1,225 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package encoding | ||
|
||
import ( | ||
"bytes" | ||
"encoding/gob" | ||
|
||
"github.com/Layr-Labs/eigenda/pkg/kzg/bn254" | ||
) | ||
|
||
// Proof is the multireveal proof | ||
// Coeffs is identical to input data converted into Fr element | ||
type Frame struct { | ||
Proof bn254.G1Point | ||
Coeffs []bn254.Fr | ||
} | ||
|
||
func (f *Frame) Encode() ([]byte, error) { | ||
var buf bytes.Buffer | ||
enc := gob.NewEncoder(&buf) | ||
err := enc.Encode(f) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return buf.Bytes(), nil | ||
} | ||
|
||
func Decode(b []byte) (Frame, error) { | ||
var f Frame | ||
buf := bytes.NewBuffer(b) | ||
dec := gob.NewDecoder(buf) | ||
err := dec.Decode(&f) | ||
if err != nil { | ||
return Frame{}, err | ||
} | ||
return f, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package kzgrs | ||
|
||
type KzgConfig struct { | ||
G1Path string | ||
G2Path string | ||
G1PowerOf2Path string | ||
G2PowerOf2Path string | ||
CacheDir string | ||
NumWorker uint64 | ||
SRSOrder uint64 // Order is the total size of SRS | ||
SRSNumberToLoad uint64 // Number of points to be loaded from the begining | ||
Verbose bool | ||
PreloadEncoder bool | ||
} |
Oops, something went wrong.