Skip to content

Commit

Permalink
add salt onchain
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0aa0 committed Jan 21, 2025
1 parent a6dd724 commit d9ab619
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions contracts/src/interfaces/IEigenDAStructs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct BlobHeaderV2 {
bytes quorumNumbers;
BlobCommitment commitment;
bytes32 paymentHeaderHash;
uint32 salt;
}

struct BlobCommitment {
Expand Down
3 changes: 2 additions & 1 deletion contracts/src/libraries/EigenDAHasher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ library EigenDAHasher {
abi.encode(
blobHeader.version,
blobHeader.quorumNumbers,
blobHeader.commitment
blobHeader.commitment,
blobHeader.salt
)
),
blobHeader.paymentHeaderHash
Expand Down
3 changes: 2 additions & 1 deletion contracts/test/unit/EigenDABlobVerifierV2Unit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ contract EigenDABlobVerifierV2Unit is MockEigenDADeployer {
lengthProof: BN254.G2Point(lengthProofX, lengthProofY),
dataLength: uint32(uint256(keccak256(abi.encode(psuedoRandomNumber, "blobHeader.dataLength"))))
}),
paymentHeaderHash: keccak256(abi.encode(psuedoRandomNumber, "blobHeader.paymentHeaderHash"))
paymentHeaderHash: keccak256(abi.encode(psuedoRandomNumber, "blobHeader.paymentHeaderHash")),
salt: uint32(uint256(keccak256(abi.encode(psuedoRandomNumber, "blobHeader.salt"))))
});

return blobHeader;
Expand Down

0 comments on commit d9ab619

Please sign in to comment.