@@ -42,6 +42,7 @@ export class HintsBuilder {
42
42
readRequests ,
43
43
MAX_NOTE_HASH_READ_REQUESTS_PER_TX ,
44
44
NOTE_HASH_TREE_HEIGHT ,
45
+ MerkleTreeId . NOTE_HASH_TREE ,
45
46
) ;
46
47
}
47
48
@@ -74,6 +75,7 @@ export class HintsBuilder {
74
75
readRequests ,
75
76
MAX_L1_TO_L2_MSG_READ_REQUESTS_PER_TX ,
76
77
L1_TO_L2_MSG_TREE_HEIGHT ,
78
+ MerkleTreeId . L1_TO_L2_MESSAGE_TREE ,
77
79
) ;
78
80
}
79
81
@@ -161,17 +163,15 @@ export class HintsBuilder {
161
163
private async getTreeLeafReadRequestsHints < N extends number , TREE_HEIGHT extends number > (
162
164
readRequests : Tuple < TreeLeafReadRequest , N > ,
163
165
size : N ,
164
- height : TREE_HEIGHT ,
166
+ treeHeight : TREE_HEIGHT ,
167
+ treeId : MerkleTreeId ,
165
168
) : Promise < Tuple < TreeLeafReadRequestHint < TREE_HEIGHT > , N > > {
166
- const hints = makeTuple ( size , ( ) => TreeLeafReadRequestHint . empty ( height ) ) ;
169
+ const hints = makeTuple ( size , ( ) => TreeLeafReadRequestHint . empty ( treeHeight ) ) ;
167
170
for ( let i = 0 ; i < readRequests . length ; i ++ ) {
168
171
const request = readRequests [ i ] ;
169
172
if ( ! request . isEmpty ( ) ) {
170
- const siblingPath = await this . db . getSiblingPath < typeof height > (
171
- MerkleTreeId . NOTE_HASH_TREE ,
172
- request . leafIndex . toBigInt ( ) ,
173
- ) ;
174
- hints [ i ] = new TreeLeafReadRequestHint ( height , siblingPath . toTuple ( ) ) ;
173
+ const siblingPath = await this . db . getSiblingPath < typeof treeHeight > ( treeId , request . leafIndex . toBigInt ( ) ) ;
174
+ hints [ i ] = new TreeLeafReadRequestHint ( treeHeight , siblingPath . toTuple ( ) ) ;
175
175
}
176
176
}
177
177
return hints ;
0 commit comments