-
Notifications
You must be signed in to change notification settings - Fork 615
feat!: improve L2ToL1MessageWitness API #21231
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
Changes from 4 commits
982f9eb
aa264da
b8fe8d6
47e7144
04853d1
25e45e6
1281163
c5ad28c
55d444a
483721e
e392442
74d3288
7ad0fd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ import { | |
| serializeValidateCheckpointResult, | ||
| } from '@aztec/stdlib/block'; | ||
| import { type CheckpointData, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint'; | ||
| import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers'; | ||
| import { type L1RollupConstants, getEpochAtSlot } from '@aztec/stdlib/epoch-helpers'; | ||
| import { CheckpointHeader } from '@aztec/stdlib/rollup'; | ||
| import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees'; | ||
| import { | ||
|
|
@@ -880,10 +880,11 @@ export class BlockStore { | |
| const blockNumber = BlockNumber(txEffect.l2BlockNumber); | ||
|
|
||
| // Use existing archiver methods to determine finalization level | ||
| const [provenBlockNumber, checkpointedBlockNumber, finalizedBlockNumber] = await Promise.all([ | ||
| const [provenBlockNumber, checkpointedBlockNumber, finalizedBlockNumber, block] = await Promise.all([ | ||
| this.getProvenBlockNumber(), | ||
| this.getCheckpointedL2BlockNumber(), | ||
| this.getFinalizedL2BlockNumber(), | ||
| this.getBlock(blockNumber), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This call is expensive, since it deserializes all txs in a block. I'd prefer if we could instead store the Alternatively, we can use |
||
| ]); | ||
|
|
||
| let status: TxStatus; | ||
|
|
@@ -897,6 +898,8 @@ export class BlockStore { | |
| status = TxStatus.PROPOSED; | ||
| } | ||
|
|
||
| const epochNumber = block ? getEpochAtSlot(block.slot, this.l1Constants) : undefined; | ||
|
|
||
| return new TxReceipt( | ||
| txHash, | ||
| status, | ||
|
|
@@ -905,6 +908,7 @@ export class BlockStore { | |
| txEffect.data.transactionFee.toBigInt(), | ||
| txEffect.l2BlockHash, | ||
| blockNumber, | ||
| epochNumber, | ||
| ); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.