Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] rename 2 functions in Go API using KZG -> Kzg #395

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions constantine-go/constantine.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (ctx EthKzgContext) Delete() {
C.ctt_eth_trusted_setup_delete(ctx.cCtx)
}

func (ctx EthKzgContext) BlobToKZGCommitment(blob EthBlob) (commitment EthKzgCommitment, err error) {
func (ctx EthKzgContext) BlobToKzgCommitment(blob EthBlob) (commitment EthKzgCommitment, err error) {
status := C.ctt_eth_kzg_blob_to_kzg_commitment(
ctx.cCtx,
(*C.ctt_eth_kzg_commitment)(unsafe.Pointer(&commitment)),
Expand Down Expand Up @@ -189,9 +189,9 @@ func (ctx EthKzgContext) VerifyBlobKzgProofBatch(blobs []EthBlob, commitments []
// Ethereum EIP-4844 KZG API - Parallel
// -----------------------------------------------------

func (ctx EthKzgContext) BlobToKZGCommitmentParallel(blob EthBlob) (commitment EthKzgCommitment, err error) {
func (ctx EthKzgContext) BlobToKzgCommitmentParallel(blob EthBlob) (commitment EthKzgCommitment, err error) {
if ctx.threadpool.ctx == nil {
return commitment, errors.New("BlobToKZGCommitmentParallel: The threadpool is not configured.")
return commitment, errors.New("BlobToKzgCommitmentParallel: The threadpool is not configured.")
}
status := C.ctt_eth_kzg_blob_to_kzg_commitment_parallel(
ctx.threadpool.ctx, ctx.cCtx,
Expand Down
8 changes: 4 additions & 4 deletions constantine-go/constantine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (dst *EthKzgEvalAtChallenge) UnmarshalText(input []byte) error {
return fromHexImpl(dst[:], input)
}

func TestBlobToKZGCommitment(t *testing.T) {
func TestBlobToKzgCommitment(t *testing.T) {
type Test struct {
Input struct {
Blob string `yaml:"blob"`
Expand Down Expand Up @@ -117,7 +117,7 @@ func TestBlobToKZGCommitment(t *testing.T) {
return
}

commitment, err := ctx.BlobToKZGCommitment(blob)
commitment, err := ctx.BlobToKzgCommitment(blob)
if err == nil {
require.NotNil(t, test.Output)
require.Equal(t, test.Output[:], commitment[:])
Expand Down Expand Up @@ -462,7 +462,7 @@ func createTestThreadpool(t *testing.T) Threadpool {
return tp
}

func TestBlobToKZGCommitmentParallel(t *testing.T) {
func TestBlobToKzgCommitmentParallel(t *testing.T) {
type Test struct {
Input struct {
Blob string `yaml:"blob"`
Expand Down Expand Up @@ -497,7 +497,7 @@ func TestBlobToKZGCommitmentParallel(t *testing.T) {
continue
}

commitment, err := ctx.BlobToKZGCommitmentParallel(blob)
commitment, err := ctx.BlobToKzgCommitmentParallel(blob)
if err == nil {
require.NotNil(t, test.Output)
require.Equal(t, test.Output[:], commitment[:])
Expand Down
Loading