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

feat: blobs. #9302

Merged
merged 90 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
d2544a9
feat: first blobs commit - ts + nr only - overflow err
MirandaWood Sep 25, 2024
9cefc9a
feat: hash blob in chunks, force native sim for block-root
MirandaWood Sep 27, 2024
df93cf5
feat: add ts blob class, use real blob in rollup, more tests
MirandaWood Oct 2, 2024
c5539eb
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Oct 4, 2024
5e92023
feat: post merge fixes, add sponge to epoch prover, cleanup
MirandaWood Oct 4, 2024
1d17855
fix: more merge fixes + cleanup
MirandaWood Oct 4, 2024
aff5e35
feat: purge txseffectshash from nr and ts
MirandaWood Oct 7, 2024
dfe722b
feat: publish blobs to L1, verify, test, a lot of cleanup
MirandaWood Oct 11, 2024
bc0678c
chore: fmt, test refactors + fixes
MirandaWood Oct 21, 2024
ad090f6
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Oct 21, 2024
bf98bbc
fix: multiple post merge fixes, refactor err logging, prover-coord te…
MirandaWood Oct 24, 2024
2cd7570
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Oct 24, 2024
8a8dcab
feat: reinstate bignum code after fix, post merge fixes and fmt
MirandaWood Oct 24, 2024
cc01696
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Oct 24, 2024
6f92b1f
chore: revert e2e prover coord fix in favour of master
MirandaWood Oct 24, 2024
233d3fd
feat: added custom existing sponge absorber to save gates, fmt
MirandaWood Oct 25, 2024
7c1749d
feat: tightly pack blobs, encode and decode with prefixes
MirandaWood Oct 29, 2024
247a49d
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Oct 29, 2024
8f3d10f
chore: post merge fixes, formatting
MirandaWood Oct 31, 2024
20674cf
fix: apply fix for public processor state (PR9634)
MirandaWood Nov 1, 2024
38725f8
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 1, 2024
77dcf8e
chore: update fixtures + fmt
MirandaWood Nov 1, 2024
580b1b2
feat: add blob check override, simulate txs
MirandaWood Nov 4, 2024
2166780
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 4, 2024
99ac96e
feat: update bignum, fmt, comments, small fixes
MirandaWood Nov 5, 2024
43bb5f0
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 5, 2024
88733fe
chore: post merge fix
MirandaWood Nov 5, 2024
37f7af4
chore: fix viem kzg (ty Mike), cleanup
MirandaWood Nov 6, 2024
9bb2c21
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 6, 2024
c667c50
feat: added total len to encoding, comments, tests, fmt
MirandaWood Nov 6, 2024
3a7a997
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 6, 2024
225ba00
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 6, 2024
27d839e
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 6, 2024
f241744
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 6, 2024
9c4c4da
chore: remove unused body calldata variable name
MirandaWood Nov 6, 2024
6cbab7e
chore: update hardcoded test val
MirandaWood Nov 6, 2024
deeb044
Update ci.yml
ludamad Nov 6, 2024
afe79e0
chore: cleanup, fmt
MirandaWood Nov 7, 2024
38796a0
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 7, 2024
e80ff6e
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 7, 2024
4c2477f
feat: address some comments
MirandaWood Nov 7, 2024
5dbd06c
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 7, 2024
899eea0
chore: post merge fixes, fmt
MirandaWood Nov 8, 2024
a662fe4
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 8, 2024
5b80e50
chore: post merge fixes, fmt
MirandaWood Nov 8, 2024
079aef8
feat: add blob hash to header
MirandaWood Nov 8, 2024
23092c6
chore: cleanup, remove unused tat
MirandaWood Nov 8, 2024
ad7bb09
refactor: block builders now add all txs at once
MirandaWood Nov 8, 2024
fd6b875
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 8, 2024
a367e6f
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 11, 2024
5e506ce
chore: post merge fixes, fmt, fixtures
MirandaWood Nov 11, 2024
a418c58
feat: delete neg_roots constants, calc instead, small runtime gains
MirandaWood Nov 11, 2024
c06c2ef
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 11, 2024
46d2b3d
feat: save some gates in sponge absorbing
MirandaWood Nov 12, 2024
3969035
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 12, 2024
f4267c5
chore: post merge fixes, fmt, fxitures
MirandaWood Nov 12, 2024
0e9b2c8
feat: save more gates
MirandaWood Nov 12, 2024
96157d0
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 12, 2024
fcbc6ce
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 13, 2024
bcf452e
chore: update constants post merge
MirandaWood Nov 13, 2024
9a67624
chore: rename tofields -> toBlobFields, remove unused code
MirandaWood Nov 13, 2024
76ccac1
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 14, 2024
526b4c6
chore: include contract class logs in blob, some renaming
MirandaWood Nov 14, 2024
862b1b2
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 15, 2024
3d46ec1
Merge remote-tracking branch 'origin' into mw/blob-circuit
MirandaWood Nov 16, 2024
f7cd700
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 18, 2024
512d1b0
feat: 1 blob -> 3 blobs (#10014)
MirandaWood Nov 19, 2024
222b5ae
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 19, 2024
1301c39
chore: make skipBlobCheck shared in sol tests
MirandaWood Nov 19, 2024
03cc903
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 19, 2024
2f7bfd6
chore: remove unec. conversion
MirandaWood Nov 19, 2024
3da7258
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 19, 2024
081f351
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 19, 2024
574f363
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 20, 2024
a7f4080
chore: post merge fixes + fmt
MirandaWood Nov 20, 2024
8b0c9c4
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 20, 2024
16e86b5
chore: post merge fixes, replay base rollup changes
MirandaWood Nov 20, 2024
b2d563d
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 20, 2024
b3b769a
fix: replace c-kzg so browser works (temp sol)
MirandaWood Nov 21, 2024
b6cac9f
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 21, 2024
21d23f3
chore: increase timeouts + fmt
MirandaWood Nov 21, 2024
893f1ec
feat: add back c-kzg (otherwise v slow), remove fns for browser
MirandaWood Nov 21, 2024
02abb31
chore: revert some timeouts, re add test
MirandaWood Nov 22, 2024
c78d8ec
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 22, 2024
20ef3c1
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 22, 2024
20e44cc
feat: address comments, renaming etc
MirandaWood Nov 22, 2024
e66454d
feat: remove txsdecoder
MirandaWood Nov 22, 2024
6b82d25
Merge remote-tracking branch 'origin/master' into mw/blob-circuit
MirandaWood Nov 22, 2024
b787de6
chore: post merge fix w/ sequencer changes
MirandaWood Nov 22, 2024
f76eaf6
chore: disable e2e_epoch due to teardown timeout
MirandaWood Nov 25, 2024
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
129 changes: 57 additions & 72 deletions l1-contracts/src/core/Rollup.sol

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions l1-contracts/src/core/interfaces/IRollup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ interface IRollup {
) external;

function submitEpochRootProof(
uint256 _epochSize,
bytes32[7] calldata _args,
bytes32[] calldata _fees,
bytes calldata _blobPublicInputsAndAggregationObject,
DataStructures.SubmitProofArgs calldata _submitArgs,
bytes calldata _aggregationObject,
bytes calldata _proof
) external;

Expand All @@ -63,7 +61,7 @@ interface IRollup {
SignatureLib.Signature[] memory _signatures,
bytes32 _digest,
Timestamp _currentTime,
bytes32 _blobHash,
bytes32 _blobsHash,
DataStructures.ExecutionFlags memory _flags
) external view;

Expand Down Expand Up @@ -107,10 +105,8 @@ interface IRollup {
) external view;
function getEpochForBlock(uint256 _blockNumber) external view returns (Epoch);
function getEpochProofPublicInputs(
uint256 _epochSize,
bytes32[7] calldata _args,
bytes32[] calldata _fees,
bytes calldata _blobPublicInputsAndAggregationObject
DataStructures.SubmitProofArgs calldata _submitArgs,
bytes calldata _aggregationObject
) external view returns (bytes32[] memory);
function computeTxsEffectsHash(bytes calldata _body) external pure returns (bytes32);
}
14 changes: 14 additions & 0 deletions l1-contracts/src/core/libraries/DataStructures.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,18 @@ library DataStructures {
address bondProvider;
address proposerClaimant;
}

/**
* @notice Struct for submitting the Epoch Proof
* @param epochSize - The size of the epoch (to be promoted to a constant)
* @param args - Array of public inputs to the proof (previousArchive, endArchive, previousBlockHash, endBlockHash, endTimestamp, outHash, proverId)
* @param fees - Array of recipient-value pairs with fees to be distributed for the epoch
* @param blobPublicInputs- The blob PIs for the proof
*/
struct SubmitProofArgs {
uint256 epochSize;
bytes32[7] args;
bytes32[] fees;
bytes blobPublicInputs;
}
}
6 changes: 3 additions & 3 deletions l1-contracts/src/core/libraries/HeaderLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {Errors} from "@aztec/core/libraries/Errors.sol";
* | 0x0020 | 0x04 | lastArchive.nextAvailableLeafIndex
* | | | ContentCommitment {
* | 0x0024 | 0x20 | numTxs
* | 0x0044 | 0x20 | blobHash
* | 0x0044 | 0x20 | blobsHash
* | 0x0064 | 0x20 | inHash
* | 0x0084 | 0x20 | outHash
* | | | StateReference {
Expand Down Expand Up @@ -91,7 +91,7 @@ library HeaderLib {

struct ContentCommitment {
uint256 numTxs;
bytes32 blobHash;
bytes32 blobsHash;
bytes32 inHash;
bytes32 outHash;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ library HeaderLib {

// Reading ContentCommitment
header.contentCommitment.numTxs = uint256(bytes32(_header[0x0024:0x0044]));
header.contentCommitment.blobHash = bytes32(_header[0x0044:0x0064]);
header.contentCommitment.blobsHash = bytes32(_header[0x0044:0x0064]);
header.contentCommitment.inHash = bytes32(_header[0x0064:0x0084]);
header.contentCommitment.outHash = bytes32(_header[0x0084:0x00a4]);

Expand Down
11 changes: 8 additions & 3 deletions l1-contracts/test/Rollup.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1255,12 +1255,17 @@ contract RollupTest is DecoderBase, TimeFns {
fees[0] = bytes32(uint256(uint160(_feeRecipient)));
fees[1] = bytes32(_feeAmount);

DataStructures.SubmitProofArgs memory submitArgs = DataStructures.SubmitProofArgs({
epochSize: _epochSize,
args: args,
fees: fees,
blobPublicInputs: _blobPublicInputs
});

bytes memory aggregationObject = "";
bytes memory proof = "";

_rollup.submitEpochRootProof(
_epochSize, args, fees, abi.encodePacked(_blobPublicInputs, aggregationObject), proof
);
_rollup.submitEpochRootProof(submitArgs, aggregationObject, proof);
}

function _quoteToSignedQuote(EpochProofQuoteLib.EpochProofQuote memory _quote)
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/test/decoders/Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ contract DecoderBase is TestBase {
}

struct ContentCommitment {
bytes32 blobHash;
bytes32 blobsHash;
bytes32 inHash;
uint256 numTxs;
bytes32 outHash;
Expand Down
4 changes: 3 additions & 1 deletion l1-contracts/test/decoders/Decoders.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ contract DecodersTest is DecoderBase {
DecoderBase.ContentCommitment memory contentCommitment = referenceHeader.contentCommitment;

assertEq(header.contentCommitment.numTxs, contentCommitment.numTxs, "Invalid txTreeSize");
assertEq(header.contentCommitment.blobHash, contentCommitment.blobHash, "Invalid blobHash");
assertEq(
header.contentCommitment.blobsHash, contentCommitment.blobsHash, "Invalid blobHash"
);
assertEq(header.contentCommitment.inHash, contentCommitment.inHash, "Invalid inHash");
assertEq(header.contentCommitment.outHash, contentCommitment.outHash, "Invalid outHash");
}
Expand Down
18 changes: 9 additions & 9 deletions l1-contracts/test/fixtures/empty_block_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"l2ToL1Messages": []
},
"block": {
"archive": "0x0608b59639f4b6e991f2192041a0a1a18fdb25c3a9a0da8334a344d4a2d95d25",
"blockHash": "0x23dbfcca3effdce13442bff627b1d1c372380fd4eb58beb596bd43239d8a7bfc",
"archive": "0x192b47a3a12bb20ef6b467f094b0c0f546d81736d60cef42402dea60c8c0d525",
"blockHash": "0x13f42a72624ae6b4bf3ae1fdb26f3e2d06d3417b60af4f365df13706fd4783a4",
"body": "0x00000000",
"decodedHeader": {
"contentCommitment": {
"blobHash": "0x001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d9",
"blobsHash": "0x001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d9",
"inHash": "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c",
"outHash": "0x00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb",
"numTxs": 2
Expand All @@ -22,10 +22,10 @@
"blockNumber": 1,
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000012",
"chainId": 31337,
"timestamp": 1731775446,
"timestamp": 1732285514,
"version": 1,
"coinbase": "0x8dce642ee912e07e7686a2c7d8d15a12006bc0ce",
"feeRecipient": "0x14eec7ed2c57101c4f1b2fb7f16fa98b0c509b82c7d1da46e51f56bfc181a319",
"coinbase": "0xf7cb80e18216bac01baa25aaa61decd9784c4d73",
"feeRecipient": "0x2861cd68fd33e3acc2f56271a629d5b2a61c027b2a4cbd2a98f44c8a56d25453",
"gasFees": {
"feePerDaGas": 0,
"feePerL2Gas": 0
Expand All @@ -50,14 +50,14 @@
"root": "0x0c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d639073"
},
"publicDataTree": {
"nextAvailableLeafIndex": 256,
"nextAvailableLeafIndex": 128,
"root": "0x23c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9"
}
}
}
},
"header": "0x2a05cb8aeefe9b9797f90650eae072f5ab7437807e62f9724ce1900467779860000000010000000000000000000000000000000000000000000000000000000000000002001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d900089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6000000101fd848aa69e1633722fe249a5b7f53b094f1c9cef9f5c694b073fd1cc5850dfb000000800c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d6390730000010023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001000000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000006738cbd68dce642ee912e07e7686a2c7d8d15a12006bc0ce14eec7ed2c57101c4f1b2fb7f16fa98b0c509b82c7d1da46e51f56bfc181a319000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x008cf42fa316df70efb2c53dbbd265613be250b38603c51a36cdd1de30b61272",
"header": "0x2a05cb8aeefe9b9797f90650eae072f5ab7437807e62f9724ce1900467779860000000010000000000000000000000000000000000000000000000000000000000000002001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d900089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6000000101fd848aa69e1633722fe249a5b7f53b094f1c9cef9f5c694b073fd1cc5850dfb000000800c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d6390730000010023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000000800000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000006740944af7cb80e18216bac01baa25aaa61decd9784c4d732861cd68fd33e3acc2f56271a629d5b2a61c027b2a4cbd2a98f44c8a56d25453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x00e98d4e431913fb9e1054e86564a761cfd983765b07a557b7b3201b8ddaecba",
"blobInputs": "0x01010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440140ac4f3ee53aedc4865073ae7fb664e7401d10eadbe3bbcc266c35059f14826bb0000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"numTxs": 0
}
Expand Down
20 changes: 10 additions & 10 deletions l1-contracts/test/fixtures/empty_block_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"l2ToL1Messages": []
},
"block": {
"archive": "0x142d6054dfd797a35b57dc84fd98867584d75e96a7399b7c27f4636e969fd61b",
"blockHash": "0x2db000b1a872480487023e4e8171c608d36f0a7e4e2caad67796e65b520122ca",
"archive": "0x1584dbcbe9d5e96b07bd5a2d9477b1f76d1670528644f240c86cafda613ce22c",
"blockHash": "0x303a5cd1113d57baebccadd3496491821599e7f1458bdbb0675ce9d71e7404d1",
"body": "0x00000000",
"decodedHeader": {
"contentCommitment": {
"blobHash": "0x001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d9",
"blobsHash": "0x001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d9",
"inHash": "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c",
"outHash": "0x00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb",
"numTxs": 2
Expand All @@ -22,18 +22,18 @@
"blockNumber": 2,
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000013",
"chainId": 31337,
"timestamp": 1731775470,
"timestamp": 1732285538,
"version": 1,
"coinbase": "0x8dce642ee912e07e7686a2c7d8d15a12006bc0ce",
"feeRecipient": "0x14eec7ed2c57101c4f1b2fb7f16fa98b0c509b82c7d1da46e51f56bfc181a319",
"coinbase": "0xf7cb80e18216bac01baa25aaa61decd9784c4d73",
"feeRecipient": "0x2861cd68fd33e3acc2f56271a629d5b2a61c027b2a4cbd2a98f44c8a56d25453",
"gasFees": {
"feePerDaGas": 0,
"feePerL2Gas": 0
}
},
"lastArchive": {
"nextAvailableLeafIndex": 2,
"root": "0x0608b59639f4b6e991f2192041a0a1a18fdb25c3a9a0da8334a344d4a2d95d25"
"root": "0x192b47a3a12bb20ef6b467f094b0c0f546d81736d60cef42402dea60c8c0d525"
},
"stateReference": {
"l1ToL2MessageTree": {
Expand All @@ -50,14 +50,14 @@
"root": "0x0c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d639073"
},
"publicDataTree": {
"nextAvailableLeafIndex": 384,
"nextAvailableLeafIndex": 128,
"root": "0x23c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9"
}
}
}
},
"header": "0x0608b59639f4b6e991f2192041a0a1a18fdb25c3a9a0da8334a344d4a2d95d25000000020000000000000000000000000000000000000000000000000000000000000002001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d900089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6000000201fd848aa69e1633722fe249a5b7f53b094f1c9cef9f5c694b073fd1cc5850dfb000001000c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d6390730000018023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001800000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000006738cbee8dce642ee912e07e7686a2c7d8d15a12006bc0ce14eec7ed2c57101c4f1b2fb7f16fa98b0c509b82c7d1da46e51f56bfc181a319000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x002f52b85580ed695df034d3a102c017c8e9a2f7e817e94aa5ebf12763fd5b96",
"header": "0x192b47a3a12bb20ef6b467f094b0c0f546d81736d60cef42402dea60c8c0d525000000020000000000000000000000000000000000000000000000000000000000000002001cedbd7ea5309ef9d1d159209835409bf41b6b1802597a52fa70cc82e934d900089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6000000201fd848aa69e1633722fe249a5b7f53b094f1c9cef9f5c694b073fd1cc5850dfb000001000c499b373a1f0fe1b510a63563546d2d39e206895056a5af0143c5f30d6390730000018023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000000800000000000000000000000000000000000000000000000000000000000007a690000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000130000000000000000000000000000000000000000000000000000000067409462f7cb80e18216bac01baa25aaa61decd9784c4d732861cd68fd33e3acc2f56271a629d5b2a61c027b2a4cbd2a98f44c8a56d25453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x008280aabced37627bae259d76bd9a83189c8523f77f4f712cfd024fad4935b0",
"blobInputs": "0x01010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440140ac4f3ee53aedc4865073ae7fb664e7401d10eadbe3bbcc266c35059f14826bb0000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"numTxs": 0
}
Expand Down
20 changes: 10 additions & 10 deletions l1-contracts/test/fixtures/mixed_block_1.json

Large diffs are not rendered by default.

64 changes: 16 additions & 48 deletions l1-contracts/test/fixtures/mixed_block_2.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions yarn-project/archiver/src/archiver/data_retrieval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export async function retrieveL2ProofsFromRollup(
export type SubmitBlockProof = {
archiveRoot: Fr;
proverId: Fr;
blobPublicInputsAndAggregationObject: Buffer;
aggregationObject: Buffer;
proof: Proof;
};

Expand All @@ -318,14 +318,14 @@ export async function getProofFromSubmitProofTx(

let proverId: Fr;
let archiveRoot: Fr;
let blobPublicInputsAndAggregationObject: Buffer;
let aggregationObject: Buffer;
let proof: Proof;

if (functionName === 'submitEpochRootProof') {
const [_epochSize, nestedArgs, _fees, aggregationObjectHex, proofHex] = args!;
blobPublicInputsAndAggregationObject = Buffer.from(hexToBytes(aggregationObjectHex));
proverId = Fr.fromString(nestedArgs[6]);
archiveRoot = Fr.fromString(nestedArgs[1]);
const [submitArgs, aggregationObjectHex, proofHex] = args!;
aggregationObject = Buffer.from(hexToBytes(aggregationObjectHex));
proverId = Fr.fromString(submitArgs.args[6]);
archiveRoot = Fr.fromString(submitArgs.args[1]);
proof = Proof.fromBuffer(Buffer.from(hexToBytes(proofHex)));
} else {
throw new Error(`Unexpected proof method called ${functionName}`);
Expand All @@ -337,7 +337,7 @@ export async function getProofFromSubmitProofTx(

return {
proverId,
blobPublicInputsAndAggregationObject,
aggregationObject,
archiveRoot,
proof,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe('L1Publisher integration', () => {
body: `0x${block.body.toBuffer().toString('hex')}`,
decodedHeader: {
contentCommitment: {
blobHash: `0x${block.header.contentCommitment.blobsHash.toString('hex').padStart(64, '0')}`,
blobsHash: `0x${block.header.contentCommitment.blobsHash.toString('hex').padStart(64, '0')}`,
inHash: `0x${block.header.contentCommitment.inHash.toString('hex').padStart(64, '0')}`,
outHash: `0x${block.header.contentCommitment.outHash.toString('hex').padStart(64, '0')}`,
numTxs: Number(block.header.contentCommitment.numTxs),
Expand Down
41 changes: 22 additions & 19 deletions yarn-project/sequencer-client/src/publisher/l1-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,25 +780,28 @@ export class L1Publisher {
proof: Proof;
}) {
return [
BigInt(args.toBlock - args.fromBlock + 1),
[
args.publicInputs.previousArchive.root.toString(),
args.publicInputs.endArchive.root.toString(),
args.publicInputs.previousBlockHash.toString(),
args.publicInputs.endBlockHash.toString(),
args.publicInputs.endTimestamp.toString(),
args.publicInputs.outHash.toString(),
args.publicInputs.proverId.toString(),
],
makeTuple(AZTEC_MAX_EPOCH_DURATION * 2, i =>
i % 2 === 0
? args.publicInputs.fees[i / 2].recipient.toField().toString()
: args.publicInputs.fees[(i - 1) / 2].value.toString(),
),
`0x${args.publicInputs.blobPublicInputs
.filter((_, i) => i < args.toBlock - args.fromBlock + 1)
.map(b => b.toString())
.join(``)}${serializeToBuffer(args.proof.extractAggregationObject()).toString('hex')}`,
{
epochSize: BigInt(args.toBlock - args.fromBlock + 1),
args: [
args.publicInputs.previousArchive.root.toString(),
args.publicInputs.endArchive.root.toString(),
args.publicInputs.previousBlockHash.toString(),
args.publicInputs.endBlockHash.toString(),
args.publicInputs.endTimestamp.toString(),
args.publicInputs.outHash.toString(),
args.publicInputs.proverId.toString(),
],
fees: makeTuple(AZTEC_MAX_EPOCH_DURATION * 2, i =>
i % 2 === 0
? args.publicInputs.fees[i / 2].recipient.toField().toString()
: args.publicInputs.fees[(i - 1) / 2].value.toString(),
),
blobPublicInputs: `0x${args.publicInputs.blobPublicInputs
.filter((_, i) => i < args.toBlock - args.fromBlock + 1)
.map(b => b.toString())
.join(``)}`,
},
`0x${serializeToBuffer(args.proof.extractAggregationObject()).toString('hex')}`,
] as const;
}

Expand Down