Skip to content

Commit

Permalink
chore: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
allnil committed Nov 13, 2024
1 parent 7501219 commit 90370e0
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions store/generated_key/eigenda/eigenda.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,51 +173,3 @@ func (e Store) Verify(ctx context.Context, key []byte, value []byte) error {
// verify DA certificate against EigenDA's batch metadata that's bridged to Ethereum
return e.verifier.VerifyCert(ctx, &cert)
}

// GetWvmTxHashByCommitment uses commitment to get wvm tx hash from the internal map(temprorary hack)
// and returns it to the caller

/* TODO: make it nice
func (e EigenDAStore) GetWvmTxHashByCommitment(ctx context.Context, key []byte) (string, error) {
e.log.Info("try get wvm tx hash using provided commitment")
var cert verify.Certificate
err := rlp.DecodeBytes(key, &cert)
if err != nil {
return "", fmt.Errorf("failed to decode DA cert to RLP format: %w", err)
}
wvmTxHash, err := e.wvmClient.GetWvmTxHashByCommitment(ctx, &cert)
if err != nil {
return "", err
}
return wvmTxHash, nil
}
func (e EigenDAStore) GetBlobFromWvm(ctx context.Context, key []byte) ([]byte, error) {
var cert verify.Certificate
err := rlp.DecodeBytes(key, &cert)
if err != nil {
return nil, fmt.Errorf("failed to decode DA cert to RLP format: %w", err)
}
wvmTxHash, err := e.wvmClient.GetWvmTxHashByCommitment(ctx, &cert)
if err != nil {
return nil, err
}
e.log.Info("found wvm tx hash using provided commitment", "provided key", commitmentKey(cert.BlobVerificationProof.BatchId, cert.BlobVerificationProof.BlobIndex))
wvmDecodedBlob, err := e.wvmClient.GetBlobFromWvm(ctx, wvmTxHash)
if err != nil {
return nil, fmt.Errorf("failed to get eigenda blob from wvm: %w", err)
}
decodedData, err := e.client.Codec.DecodeBlob(wvmDecodedBlob)
if err != nil {
return nil, fmt.Errorf("error decoding eigen blob: %w", err)
}
return decodedData, nil
}
*/

0 comments on commit 90370e0

Please sign in to comment.