|
|
@ -1088,7 +1088,8 @@ func TestFillBlobTransaction(t *testing.T) { |
|
|
|
Config: params.MergedTestChainConfig, |
|
|
|
Config: params.MergedTestChainConfig, |
|
|
|
Alloc: types.GenesisAlloc{}, |
|
|
|
Alloc: types.GenesisAlloc{}, |
|
|
|
} |
|
|
|
} |
|
|
|
emptyBlob = kzg4844.Blob{} |
|
|
|
emptyBlob = new(kzg4844.Blob) |
|
|
|
|
|
|
|
emptyBlobs = []kzg4844.Blob{*emptyBlob} |
|
|
|
emptyBlobCommit, _ = kzg4844.BlobToCommitment(emptyBlob) |
|
|
|
emptyBlobCommit, _ = kzg4844.BlobToCommitment(emptyBlob) |
|
|
|
emptyBlobProof, _ = kzg4844.ComputeBlobProof(emptyBlob, emptyBlobCommit) |
|
|
|
emptyBlobProof, _ = kzg4844.ComputeBlobProof(emptyBlob, emptyBlobCommit) |
|
|
|
emptyBlobHash common.Hash = kzg4844.CalcBlobHashV1(sha256.New(), &emptyBlobCommit) |
|
|
|
emptyBlobHash common.Hash = kzg4844.CalcBlobHashV1(sha256.New(), &emptyBlobCommit) |
|
|
@ -1171,14 +1172,14 @@ func TestFillBlobTransaction(t *testing.T) { |
|
|
|
From: &b.acc.Address, |
|
|
|
From: &b.acc.Address, |
|
|
|
To: &to, |
|
|
|
To: &to, |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
want: &result{ |
|
|
|
want: &result{ |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1191,14 +1192,14 @@ func TestFillBlobTransaction(t *testing.T) { |
|
|
|
To: &to, |
|
|
|
To: &to, |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
BlobHashes: []common.Hash{emptyBlobHash}, |
|
|
|
BlobHashes: []common.Hash{emptyBlobHash}, |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
want: &result{ |
|
|
|
want: &result{ |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1211,7 +1212,7 @@ func TestFillBlobTransaction(t *testing.T) { |
|
|
|
To: &to, |
|
|
|
To: &to, |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
BlobHashes: []common.Hash{{0x01, 0x22}}, |
|
|
|
BlobHashes: []common.Hash{{0x01, 0x22}}, |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1223,12 +1224,12 @@ func TestFillBlobTransaction(t *testing.T) { |
|
|
|
From: &b.acc.Address, |
|
|
|
From: &b.acc.Address, |
|
|
|
To: &to, |
|
|
|
To: &to, |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Value: (*hexutil.Big)(big.NewInt(1)), |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
}, |
|
|
|
}, |
|
|
|
want: &result{ |
|
|
|
want: &result{ |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Hashes: []common.Hash{emptyBlobHash}, |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Sidecar: &types.BlobTxSidecar{ |
|
|
|
Blobs: []kzg4844.Blob{emptyBlob}, |
|
|
|
Blobs: emptyBlobs, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Commitments: []kzg4844.Commitment{emptyBlobCommit}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
Proofs: []kzg4844.Proof{emptyBlobProof}, |
|
|
|
}, |
|
|
|
}, |
|
|
|