-
Notifications
You must be signed in to change notification settings - Fork 305
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
refactor: from < genesis allowed in getBlocks #2816
refactor: from < genesis allowed in getBlocks #2816
Conversation
c7eba4c
to
6ee827d
Compare
Benchmark resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
|
@@ -209,7 +208,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource | |||
// ********** Events that are processed per block ********** | |||
|
|||
// Read all data from chain and then write to our stores at the end | |||
const nextExpectedL2BlockNum = BigInt(this.store.getBlocksLength() + INITIAL_L2_BLOCK_NUM); | |||
const nextExpectedL2BlockNum = BigInt((await this.store.getBlockNumber()) + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break if we restart the archiver? Say L2 is at block 30. Say archiver restarts. So nextExpectedL2BlockNum
would be 1. But I suppose we don't care about re-syncing until testnet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have been one in the first instance too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems correct to me because when we start archiver the next expected L2 block num is 1 because that's the first block.
} | ||
if (from < INITIAL_L2_BLOCK_NUM || from > this.l2BlockContexts.length) { | ||
|
||
const fromIndex = Math.max(from - INITIAL_L2_BLOCK_NUM, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use INITIAL_L2_BLOCK_NUM
here but not in the archiver? Is that an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was being used in an overloaded context in the archiver. ( incrementing to next block / getting the first block number )
@@ -87,7 +87,7 @@ export class L2BlockDownloader { | |||
* @param timeout - optional timeout value to prevent permanent blocking | |||
* @returns The next batch of blocks from the queue. | |||
*/ | |||
public async getL2Blocks(timeout?: number) { | |||
public async getBlocks(timeout?: number): Promise<L2Block[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should L2Block just be renamed to block? To keep with this naming trend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is some value in having the "L2" in the block type name because it clarifies that it's an L2 block and not an L1 block. I didn't like the getL2Blocks name simply because everywhere else in codebase it's getBlocks.
@@ -209,7 +208,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource | |||
// ********** Events that are processed per block ********** | |||
|
|||
// Read all data from chain and then write to our stores at the end | |||
const nextExpectedL2BlockNum = BigInt(this.store.getBlocksLength() + INITIAL_L2_BLOCK_NUM); | |||
const nextExpectedL2BlockNum = BigInt((await this.store.getBlockNumber()) + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have been one in the first instance too?
} | ||
if (from < INITIAL_L2_BLOCK_NUM || from > this.l2BlockContexts.length) { | ||
|
||
const fromIndex = Math.max(from - INITIAL_L2_BLOCK_NUM, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was being used in an overloaded context in the archiver. ( incrementing to next block / getting the first block number )
9a8b028
to
df1a603
Compare
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.8.11</summary> ## [0.8.11](aztec-packages-v0.8.10...aztec-packages-v0.8.11) (2023-10-13) ### Features * **archiver:** Use registry to fetch searchStartBlock ([#2830](#2830)) ([e5bc067](e5bc067)) * Configure sandbox for network ([#2818](#2818)) ([d393a59](d393a59)) * **docker-sandbox:** Allow forks in sandbox ([#2831](#2831)) ([ed8431c](ed8431c)), closes [#2726](#2726) * Goblin Translator Decomposition relation (Goblin Translator part 4) ([#2802](#2802)) ([3c3cd9f](3c3cd9f)) * Goblin Translator GenPermSort relation (Goblin Translator part 3) ([#2795](#2795)) ([b36fdc4](b36fdc4)) * Goblin translator opcode constraint and accumulator transfer relations (Goblin Translator part 5) ([#2805](#2805)) ([b3d1f28](b3d1f28)) * Goblin Translator Permutation relation (Goblin Translator part 2) ([#2790](#2790)) ([9a354c9](9a354c9)) * Integrate ZeroMorph into Honk ([#2774](#2774)) ([ea86869](ea86869)) * Purge non native token + reorder params in token portal ([#2723](#2723)) ([447dade](447dade)) * Throw compile error if read/write public state from private ([#2804](#2804)) ([a3649df](a3649df)) * Unencrypted log filtering ([#2600](#2600)) ([7ae554a](7ae554a)), closes [#1498](#1498) [#1500](#1500) * Update goblin translator circuit builder (Goblin Translator part 1) ([#2764](#2764)) ([32c69ae](32c69ae)) ### Bug Fixes * Outdated `noir:clean` ([#2821](#2821)) ([2ea199f](2ea199f)) ### Miscellaneous * Benchmark tx sizes in p2p pool ([#2810](#2810)) ([f63219c](f63219c)) * Change acir_tests branch to point to master ([#2815](#2815)) ([73f229d](73f229d)) * Fix typo ([#2839](#2839)) ([5afdf91](5afdf91)) * From < genesis allowed in getBlocks ([#2816](#2816)) ([5622b50](5622b50)) * Remove Ultra Grumpkin flavor ([#2825](#2825)) ([bde77b8](bde77b8)) * Remove work queue from honk ([#2814](#2814)) ([bca7d12](bca7d12)) * Spell check ([#2817](#2817)) ([4777a11](4777a11)) ### Documentation * Slight changes to update portal page ([#2799](#2799)) ([eb65819](eb65819)) * Update aztec_connect_sunset.mdx ([#2808](#2808)) ([5f659a7](5f659a7)) </details> <details><summary>barretenberg.js: 0.8.11</summary> ## [0.8.11](barretenberg.js-v0.8.10...barretenberg.js-v0.8.11) (2023-10-13) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>barretenberg: 0.8.11</summary> ## [0.8.11](barretenberg-v0.8.10...barretenberg-v0.8.11) (2023-10-13) ### Features * Goblin Translator Decomposition relation (Goblin Translator part 4) ([#2802](#2802)) ([3c3cd9f](3c3cd9f)) * Goblin Translator GenPermSort relation (Goblin Translator part 3) ([#2795](#2795)) ([b36fdc4](b36fdc4)) * Goblin translator opcode constraint and accumulator transfer relations (Goblin Translator part 5) ([#2805](#2805)) ([b3d1f28](b3d1f28)) * Goblin Translator Permutation relation (Goblin Translator part 2) ([#2790](#2790)) ([9a354c9](9a354c9)) * Integrate ZeroMorph into Honk ([#2774](#2774)) ([ea86869](ea86869)) * Update goblin translator circuit builder (Goblin Translator part 1) ([#2764](#2764)) ([32c69ae](32c69ae)) ### Miscellaneous * Change acir_tests branch to point to master ([#2815](#2815)) ([73f229d](73f229d)) * Remove Ultra Grumpkin flavor ([#2825](#2825)) ([bde77b8](bde77b8)) * Remove work queue from honk ([#2814](#2814)) ([bca7d12](bca7d12)) * Spell check ([#2817](#2817)) ([4777a11](4777a11)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.8.11</summary> ## [0.8.11](AztecProtocol/aztec-packages@aztec-packages-v0.8.10...aztec-packages-v0.8.11) (2023-10-13) ### Features * **archiver:** Use registry to fetch searchStartBlock ([#2830](AztecProtocol/aztec-packages#2830)) ([e5bc067](AztecProtocol/aztec-packages@e5bc067)) * Configure sandbox for network ([#2818](AztecProtocol/aztec-packages#2818)) ([d393a59](AztecProtocol/aztec-packages@d393a59)) * **docker-sandbox:** Allow forks in sandbox ([#2831](AztecProtocol/aztec-packages#2831)) ([ed8431c](AztecProtocol/aztec-packages@ed8431c)), closes [#2726](AztecProtocol/aztec-packages#2726) * Goblin Translator Decomposition relation (Goblin Translator part 4) ([#2802](AztecProtocol/aztec-packages#2802)) ([3c3cd9f](AztecProtocol/aztec-packages@3c3cd9f)) * Goblin Translator GenPermSort relation (Goblin Translator part 3) ([#2795](AztecProtocol/aztec-packages#2795)) ([b36fdc4](AztecProtocol/aztec-packages@b36fdc4)) * Goblin translator opcode constraint and accumulator transfer relations (Goblin Translator part 5) ([#2805](AztecProtocol/aztec-packages#2805)) ([b3d1f28](AztecProtocol/aztec-packages@b3d1f28)) * Goblin Translator Permutation relation (Goblin Translator part 2) ([#2790](AztecProtocol/aztec-packages#2790)) ([9a354c9](AztecProtocol/aztec-packages@9a354c9)) * Integrate ZeroMorph into Honk ([#2774](AztecProtocol/aztec-packages#2774)) ([ea86869](AztecProtocol/aztec-packages@ea86869)) * Purge non native token + reorder params in token portal ([#2723](AztecProtocol/aztec-packages#2723)) ([447dade](AztecProtocol/aztec-packages@447dade)) * Throw compile error if read/write public state from private ([#2804](AztecProtocol/aztec-packages#2804)) ([a3649df](AztecProtocol/aztec-packages@a3649df)) * Unencrypted log filtering ([#2600](AztecProtocol/aztec-packages#2600)) ([7ae554a](AztecProtocol/aztec-packages@7ae554a)), closes [#1498](AztecProtocol/aztec-packages#1498) [#1500](AztecProtocol/aztec-packages#1500) * Update goblin translator circuit builder (Goblin Translator part 1) ([#2764](AztecProtocol/aztec-packages#2764)) ([32c69ae](AztecProtocol/aztec-packages@32c69ae)) ### Bug Fixes * Outdated `noir:clean` ([#2821](AztecProtocol/aztec-packages#2821)) ([2ea199f](AztecProtocol/aztec-packages@2ea199f)) ### Miscellaneous * Benchmark tx sizes in p2p pool ([#2810](AztecProtocol/aztec-packages#2810)) ([f63219c](AztecProtocol/aztec-packages@f63219c)) * Change acir_tests branch to point to master ([#2815](AztecProtocol/aztec-packages#2815)) ([73f229d](AztecProtocol/aztec-packages@73f229d)) * Fix typo ([#2839](AztecProtocol/aztec-packages#2839)) ([5afdf91](AztecProtocol/aztec-packages@5afdf91)) * From < genesis allowed in getBlocks ([#2816](AztecProtocol/aztec-packages#2816)) ([5622b50](AztecProtocol/aztec-packages@5622b50)) * Remove Ultra Grumpkin flavor ([#2825](AztecProtocol/aztec-packages#2825)) ([bde77b8](AztecProtocol/aztec-packages@bde77b8)) * Remove work queue from honk ([#2814](AztecProtocol/aztec-packages#2814)) ([bca7d12](AztecProtocol/aztec-packages@bca7d12)) * Spell check ([#2817](AztecProtocol/aztec-packages#2817)) ([4777a11](AztecProtocol/aztec-packages@4777a11)) ### Documentation * Slight changes to update portal page ([#2799](AztecProtocol/aztec-packages#2799)) ([eb65819](AztecProtocol/aztec-packages@eb65819)) * Update aztec_connect_sunset.mdx ([#2808](AztecProtocol/aztec-packages#2808)) ([5f659a7](AztecProtocol/aztec-packages@5f659a7)) </details> <details><summary>barretenberg.js: 0.8.11</summary> ## [0.8.11](AztecProtocol/aztec-packages@barretenberg.js-v0.8.10...barretenberg.js-v0.8.11) (2023-10-13) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>barretenberg: 0.8.11</summary> ## [0.8.11](AztecProtocol/aztec-packages@barretenberg-v0.8.10...barretenberg-v0.8.11) (2023-10-13) ### Features * Goblin Translator Decomposition relation (Goblin Translator part 4) ([#2802](AztecProtocol/aztec-packages#2802)) ([3c3cd9f](AztecProtocol/aztec-packages@3c3cd9f)) * Goblin Translator GenPermSort relation (Goblin Translator part 3) ([#2795](AztecProtocol/aztec-packages#2795)) ([b36fdc4](AztecProtocol/aztec-packages@b36fdc4)) * Goblin translator opcode constraint and accumulator transfer relations (Goblin Translator part 5) ([#2805](AztecProtocol/aztec-packages#2805)) ([b3d1f28](AztecProtocol/aztec-packages@b3d1f28)) * Goblin Translator Permutation relation (Goblin Translator part 2) ([#2790](AztecProtocol/aztec-packages#2790)) ([9a354c9](AztecProtocol/aztec-packages@9a354c9)) * Integrate ZeroMorph into Honk ([#2774](AztecProtocol/aztec-packages#2774)) ([ea86869](AztecProtocol/aztec-packages@ea86869)) * Update goblin translator circuit builder (Goblin Translator part 1) ([#2764](AztecProtocol/aztec-packages#2764)) ([32c69ae](AztecProtocol/aztec-packages@32c69ae)) ### Miscellaneous * Change acir_tests branch to point to master ([#2815](AztecProtocol/aztec-packages#2815)) ([73f229d](AztecProtocol/aztec-packages@73f229d)) * Remove Ultra Grumpkin flavor ([#2825](AztecProtocol/aztec-packages#2825)) ([bde77b8](AztecProtocol/aztec-packages@bde77b8)) * Remove work queue from honk ([#2814](AztecProtocol/aztec-packages#2814)) ([bca7d12](AztecProtocol/aztec-packages@bca7d12)) * Spell check ([#2817](AztecProtocol/aztec-packages#2817)) ([4777a11](AztecProtocol/aztec-packages@4777a11)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes #411
AztecNode
interface.getBlocksLength
function from archiver interface. It's redundant becausegetBlockNumber
can be used instead.Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.