@@ -32,39 +32,41 @@ import {Hash} from "./Hash.sol";
32
32
* | 0x00c4 | 0x04 | startNullifierTreeSnapshot.nextAvailableLeafIndex
33
33
* | 0x00c8 | 0x20 | startContractTreeSnapshot.root
34
34
* | 0x00e8 | 0x04 | startContractTreeSnapshot.nextAvailableLeafIndex
35
- * | 0x00ec | 0x20 | startPublicDataTreeRoot
36
- * | 0x010c | 0x20 | startL1ToL2MessageTreeSnapshot.root
37
- * | 0x012c | 0x04 | startL1ToL2MessageTreeSnapshot.nextAvailableLeafIndex
38
- * | 0x0130 | 0x20 | startArchiveSnapshot.root
39
- * | 0x0150 | 0x04 | startArchiveSnapshot.nextAvailableLeafIndex
40
- * | 0x0154 | 0x20 | endNoteHashTreeSnapshot.root
41
- * | 0x0174 | 0x04 | endNoteHashTreeSnapshot.nextAvailableLeafIndex
42
- * | 0x0178 | 0x20 | endNullifierTreeSnapshot.root
43
- * | 0x0198 | 0x04 | endNullifierTreeSnapshot.nextAvailableLeafIndex
44
- * | 0x019c | 0x20 | endContractTreeSnapshot.root
45
- * | 0x01bc | 0x04 | endContractTreeSnapshot.nextAvailableLeafIndex
46
- * | 0x01c0 | 0x20 | endPublicDataTreeRoot
47
- * | 0x01e0 | 0x20 | endL1ToL2MessageTreeSnapshot.root
48
- * | 0x0200 | 0x04 | endL1ToL2MessageTreeSnapshot.nextAvailableLeafIndex
49
- * | 0x0204 | 0x20 | endArchiveSnapshot.root
50
- * | 0x0224 | 0x04 | endArchiveSnapshot.nextAvailableLeafIndex
51
- * | 0x0228 | 0x04 | len(newCommitments) (denoted a)
52
- * | 0x022c | a * 0x20 | newCommitments
53
- * | 0x022c + a * 0x20 | 0x04 | len(newNullifiers) (denoted b)
54
- * | 0x0230 + a * 0x20 | b * 0x20 | newNullifiers
55
- * | 0x0230 + a * 0x20 + b * 0x20 | 0x04 | len(newPublicDataWrites) (denoted c)
56
- * | 0x0234 + a * 0x20 + b * 0x20 | c * 0x40 | newPublicDataWrites
57
- * | 0x0234 + a * 0x20 + b * 0x20 + c * 0x40 | 0x04 | len(newL2ToL1Msgs) (denoted d)
58
- * | 0x0238 + a * 0x20 + b * 0x20 + c * 0x40 | d * 0x20 | newL2ToL1Msgs
59
- * | 0x0238 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 | 0x04 | len(contracts) (denoted e)
60
- * | 0x023c + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 | e * 0x20 | newContracts
61
- * | 0x023c + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x20 | e * 0x34 | newContractsData
62
- * | 0x023c + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 | 0x04 | len(newL1ToL2Msgs) (denoted f)
63
- * | 0x0240 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 | f * 0x20 | newL1ToL2Msgs
64
- * | 0x0240 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 | 0x04 | byteLen(newEncryptedLogs) (denoted g)
65
- * | 0x0244 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 | g | newEncryptedLogs
66
- * | 0x0244 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 + g | 0x04 | byteLen(newUnencryptedLogs) (denoted h)
67
- * | 0x0248 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 + g | h | newUnencryptedLogs
35
+ * | 0x00ec | 0x20 | startPublicDataTreeSnapshot.root
36
+ * | 0x010c | 0x04 | startPublicDataTreeSnapshot.nextAvailableLeafIndex
37
+ * | 0x0110 | 0x20 | startL1ToL2MessageTreeSnapshot.root
38
+ * | 0x0130 | 0x04 | startL1ToL2MessageTreeSnapshot.nextAvailableLeafIndex
39
+ * | 0x0134 | 0x20 | startArchiveSnapshot.root
40
+ * | 0x0154 | 0x04 | startArchiveSnapshot.nextAvailableLeafIndex
41
+ * | 0x0158 | 0x20 | endNoteHashTreeSnapshot.root
42
+ * | 0x0178 | 0x04 | endNoteHashTreeSnapshot.nextAvailableLeafIndex
43
+ * | 0x017c | 0x20 | endNullifierTreeSnapshot.root
44
+ * | 0x019c | 0x04 | endNullifierTreeSnapshot.nextAvailableLeafIndex
45
+ * | 0x01a0 | 0x20 | endContractTreeSnapshot.root
46
+ * | 0x01c0 | 0x04 | endContractTreeSnapshot.nextAvailableLeafIndex
47
+ * | 0x01c4 | 0x20 | endPublicDataTreeSnapshot.root
48
+ * | 0x01e4 | 0x04 | endPublicDataTreeSnapshot.nextAvailableLeafIndex
49
+ * | 0x01e8 | 0x20 | endL1ToL2MessageTreeSnapshot.root
50
+ * | 0x0208 | 0x04 | endL1ToL2MessageTreeSnapshot.nextAvailableLeafIndex
51
+ * | 0x020c | 0x20 | endArchiveSnapshot.root
52
+ * | 0x022c | 0x04 | endArchiveSnapshot.nextAvailableLeafIndex
53
+ * | 0x0230 | 0x04 | len(newCommitments) (denoted a)
54
+ * | 0x0234 | a * 0x20 | newCommitments
55
+ * | 0x0234 + a * 0x20 | 0x04 | len(newNullifiers) (denoted b)
56
+ * | 0x0238 + a * 0x20 | b * 0x20 | newNullifiers
57
+ * | 0x0238 + a * 0x20 + b * 0x20 | 0x04 | len(newPublicDataWrites) (denoted c)
58
+ * | 0x023c + a * 0x20 + b * 0x20 | c * 0x40 | newPublicDataWrites
59
+ * | 0x023c + a * 0x20 + b * 0x20 + c * 0x40 | 0x04 | len(newL2ToL1Msgs) (denoted d)
60
+ * | 0x0240 + a * 0x20 + b * 0x20 + c * 0x40 | d * 0x20 | newL2ToL1Msgs
61
+ * | 0x0240 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 | 0x04 | len(contracts) (denoted e)
62
+ * | 0x0244 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 | e * 0x20 | newContracts
63
+ * | 0x0244 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x20 | e * 0x34 | newContractsData
64
+ * | 0x0244 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 | 0x04 | len(newL1ToL2Msgs) (denoted f)
65
+ * | 0x0248 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 | f * 0x20 | newL1ToL2Msgs
66
+ * | 0x0248 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 | 0x04 | byteLen(newEncryptedLogs) (denoted g)
67
+ * | 0x024c + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 | g | newEncryptedLogs
68
+ * | 0x024c + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 + g | 0x04 | byteLen(newUnencryptedLogs) (denoted h)
69
+ * | 0x0250 + a * 0x20 + b * 0x20 + c * 0x40 + d * 0x20 + e * 0x54 + f * 0x20 + g | h | newUnencryptedLogs
68
70
* | --- | --- | ---
69
71
*/
70
72
library Decoder {
@@ -97,7 +99,7 @@ library Decoder {
97
99
uint256 private constant START_TREES_BLOCK_HEADER_OFFSET = 0x80 ;
98
100
99
101
// The size of the block header elements
100
- uint256 private constant TREES_BLOCK_HEADER_SIZE = 0xd4 ;
102
+ uint256 private constant TREES_BLOCK_HEADER_SIZE = 0xd8 ;
101
103
102
104
// Where the end of trees metadata begins in the block
103
105
uint256 private constant END_TREES_BLOCK_HEADER_OFFSET =
0 commit comments