Skip to content

Commit

Permalink
simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 31, 2024
1 parent 600236d commit d11e55a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,6 @@ export class SoloBlockBuilder implements BlockBuilder {
return new MembershipWitness(height, index, assertLength(path.toFieldArray(), height));
}

protected getHistoricalTreesMembershipWitnessFor(tx: ProcessedTx) {
const blockHash = tx.data.constants.historicalHeader.hash()
return this.getMembershipWitnessFor(blockHash, MerkleTreeId.ARCHIVE, ARCHIVE_HEIGHT);
}

protected async getConstantRollupData(globalVariables: GlobalVariables): Promise<ConstantRollupData> {
return ConstantRollupData.from({
baseRollupVkHash: DELETE_FR,
Expand Down Expand Up @@ -688,6 +683,13 @@ export class SoloBlockBuilder implements BlockBuilder {
publicDataSiblingPath,
});

const blockHash = tx.data.constants.historicalHeader.hash();
const archiveRootMembershipWitness = await this.getMembershipWitnessFor(
blockHash,
MerkleTreeId.ARCHIVE,
ARCHIVE_HEIGHT,
);

return BaseRollupInputs.from({
kernelData: this.getKernelDataFor(tx),
start,
Expand All @@ -700,7 +702,7 @@ export class SoloBlockBuilder implements BlockBuilder {
publicDataReadsPreimages: txPublicDataReadsInfo.newPublicDataReadsPreimages,
publicDataReadsMembershipWitnesses: txPublicDataReadsInfo.newPublicDataReadsWitnesses,

archiveRootMembershipWitness: await this.getHistoricalTreesMembershipWitnessFor(tx),
archiveRootMembershipWitness,

constants,
});
Expand Down

0 comments on commit d11e55a

Please sign in to comment.