Skip to content

Commit

Permalink
feat: returning non-nullified messages only
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 18, 2024
1 parent 1348fdc commit d877fd6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl RootRollupInputs {
components::assert_equal_constants(left, right);
components::assert_prev_rollups_follow_on_from_each_other(left, right);

// Insert subtree into the l1 to l2 data tree
// Insert subtree into the l1 to l2 message tree
let empty_l1_to_l2_subtree_root = calculate_empty_tree_root(L1_TO_L2_MSG_SUBTREE_HEIGHT);
let new_l1_to_l2_message_tree_snapshot = append_only_tree::insert_subtree_to_snapshot_tree(
self.start_l1_to_l2_message_tree_snapshot,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-node/src/aztec-node/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class AztecNodeService implements AztecNode {
}

/**
* Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
* Returns the index and a sibling path for a leaf in the committed l1 to l2 message tree.
* @param blockNumber - The block number at which to get the data.
* @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
* @throws If the message is not found.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/circuit-types/src/interfaces/aztec-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface AztecNode {
): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;

/**
* Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
* Returns the index and a sibling path for a leaf in the committed l1 to l2 message tree.
* @param blockNumber - The block number at which to get the data.
* @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
* @throws If the message is not found.
Expand Down
8 changes: 2 additions & 6 deletions yarn-project/circuit-types/src/messaging/l1_to_l2_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ export class L1ToL2Message {
* The hash of the spending secret.
*/
public readonly secretHash: Fr,
/**
* The entry key for the message - optional.
*/
public readonly entryKey?: Fr,
) {}

/**
Expand Down Expand Up @@ -70,7 +66,7 @@ export class L1ToL2Message {
return new L1ToL2Message(L1Actor.empty(), L2Actor.empty(), Fr.ZERO, Fr.ZERO);
}

static random(entryKey?: Fr): L1ToL2Message {
return new L1ToL2Message(L1Actor.random(), L2Actor.random(), Fr.random(), Fr.random(), entryKey);
static random(): L1ToL2Message {
return new L1ToL2Message(L1Actor.random(), L2Actor.random(), Fr.random(), Fr.random());
}
}

0 comments on commit d877fd6

Please sign in to comment.