Skip to content
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

✅ Test: Add 100% test coverage to tevm/blockchain package #1319

Conversation

roninjin10
Copy link
Collaborator

@roninjin10 roninjin10 commented Jul 16, 2024

Description

Concise description of proposed changes

Testing

Explain the quality checks that have been done on the code changes

Additional Information

Your ENS/address:

Summary by CodeRabbit

  • New Features

    • Introduced new test cases for various blockchain functions, enhancing test coverage.
    • Added the isTevmBlockTag utility to validate Tevm block tags.
  • Bug Fixes

    • Fixed async method behavior to consistently return rejected promises instead of throwing errors.
    • Resolved an issue with block header parent hash absence on optimism-based chains.
  • Documentation

    • Updated documentation links and return type signatures to reflect recent changes.
    • Added new documentation entries for isTevmBlockTag.

Copy link

vercel bot commented Jul 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tevm-monorepo-tevm ❌ Failed (Inspect) Jul 16, 2024 7:32am

Copy link

changeset-bot bot commented Jul 16, 2024

🦋 Changeset detected

Latest commit: 8dab74b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@tevm/blockchain Patch
@tevm/actions Patch
@tevm/base-client Patch
@tevm/evm Patch
@tevm/procedures Patch
@tevm/receipt-manager Patch
@tevm/txpool Patch
@tevm/vm Patch
tevm Patch
@tevm/viem Patch
@tevm/decorators Patch
@tevm/memory-client Patch
@tevm/server Patch
@tevm/ethers Patch
@tevm/precompiles Patch
@tevm/http-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jul 16, 2024

Walkthrough

The recent updates introduce significant enhancements to the blockchain module, including new functions, test suites, and error-handling improvements. Key additions are the deepCopy function and its corresponding tests. Functions like delBlock, getBlock, and getBlockFromRpc have undergone refactoring to improve their reliability and error management. Enhanced test cases ensure robust validation of blockchain operations, and new utility functions streamline block processing and validation.

Changes

File/Path Change Summary
packages/blockchain/src/actions/deepCopy.spec.ts Introduced test suite for deepCopy function, verifying deep copying of blockchain chains.
packages/blockchain/src/actions/delBlock.js Updated delBlock to fetch blocks asynchronously and handle block deletion and metadata properly.
packages/blockchain/src/actions/getBlock.js Refactored error handling and block retrieval logic using new imports and methods.
packages/blockchain/src/actions/getBlockByTag.js Modified getBlockByTag to handle RPC results and set blockId and block based on conditions.
packages/blockchain/src/actions/getBlock.spec.ts Introduced test cases for getBlock function covering various block retrieval scenarios.
packages/blockchain/src/actions/getCanonicalHeadBlock.js Changed error type thrown to InternalError for missing canonical head.
packages/blockchain/src/actions/putBlock.js Changed block storage to use block.hash() instead of block.header.hash().
packages/blockchain/src/actions/validateHeader.spec.ts Added test cases for validateHeader function, validating headers based on multiple criteria.
packages/blockchain/src/createBaseChain.spec.ts Introduced tests for createBaseChain function, validating block configurations and genesis creation.
packages/blockchain/src/createChain.spec.ts Added test cases for createChain function, covering chain creation and block operations.
packages/blockchain/src/index.ts Exported isTevmBlockTag utility function.
packages/blockchain/src/test/getBlocks.ts Added getMockBlocks function to retrieve mock blocks using RPC calls.
packages/blockchain/src/utils/getBlockFromRpc.js Refactored getBlockFromRpc to handle block tags and transactions differently.
packages/blockchain/src/utils/getBlockFromRpc.spec.ts Updated tests for getBlockFromRpc to handle new logic and error scenarios.
packages/blockchain/src/utils/isTevmBlockTag.ts Introduced function to validate Tevm block tags.
packages/blockchain/src/utils/warnOnce.spec.ts Added tests for warnOnce function, ensuring warnings are logged once per transaction type.
.changeset/olive-maps-design.md Fixed async method bug to ensure consistent promise rejections.
.changeset/warm-dancers-glow.md Fixed bug related to block header parent hash on optimism-based chains.
docs/src/.../functions/delBlock.md Updated line number reference for delBlock function.
docs/src/.../functions/getBlock.md Updated line number reference for getBlock function.
docs/src/.../functions/getBlockFromRpc.md Updated return type signature for getBlockFromRpc function.
docs/src/.../functions/getCanonicalHeadBlock.md Updated line number reference for getCanonicalHeadBlock function.
docs/src/.../functions/getIteratorHead.md Updated line number reference for getIteratorHead function.
docs/src/.../functions/isTevmBlockTag.md Introduced documentation for isTevmBlockTag function.
docs/src/.../globals.md Added reference to isTevmBlockTag function.

Poem

In the land of chains and blocks,
New functions rise as the rabbit talks. 🐇
DelBlocks and GetBlocks, errors no more,
Copy deep or validate, they're better than before.
With tests in place, the future's bright,
Blockchain's journey takes flight tonight. ✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@roninjin10 roninjin10 marked this pull request as ready for review July 16, 2024 04:27
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @roninjin10 and the rest of your teammates on Graphite Graphite

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Outside diff range, codebase verification and nitpick comments (3)
packages/blockchain/src/actions/delBlock.js (1)

12-26: Well-implemented function with robust error handling.

The function delBlock is well-structured and includes comprehensive error handling for cases like attempting to delete a forked block or the latest block. The use of asynchronous functions and promises is correctly implemented.

Consider adding more detailed logging or comments explaining the logic, especially around the conditions that determine block deletion rules. This could improve maintainability for other developers.

packages/blockchain/src/actions/putBlock.spec.ts (1)

8-30: Comprehensive test suite for putBlock.

The test cases are well-structured and cover important scenarios for the putBlock function. Each test is isolated and checks specific conditions, ensuring that the function behaves as expected under different circumstances.

To enhance the clarity and maintainability of the tests, consider adding comments within the test cases to explain the rationale behind each assertion, especially in complex scenarios like handling the latest block logic.

packages/blockchain/src/actions/deepCopy.spec.ts (1)

10-34: Robust test for deepCopy functionality.

The test for deepCopy is comprehensive, covering multiple block insertions and validating the integrity of the copied chain. The use of expect().toEqual() ensures that the copied objects match the originals exactly, which is crucial for a deep copy operation.

The test could benefit from additional comments explaining each step, particularly why certain blocks are checked and others are not, to aid understanding for future maintainers.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 45950f7 and 362ae4a.

Files ignored due to path filters (2)
  • packages/blockchain/src/__snapshots__/createChain.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/actions/__snapshots__/validateHeader.spec.ts.snap is excluded by !**/*.snap
Files selected for processing (16)
  • packages/blockchain/src/actions/deepCopy.spec.ts (1 hunks)
  • packages/blockchain/src/actions/delBlock.js (1 hunks)
  • packages/blockchain/src/actions/delBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getBlock.js (3 hunks)
  • packages/blockchain/src/actions/getBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getBlockByTag.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getCanonicalHeadBlock.js (1 hunks)
  • packages/blockchain/src/actions/getCanonicalHeadBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getIteratorHead.spec.ts (1 hunks)
  • packages/blockchain/src/actions/putBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/setIteratorHead.spec.ts (1 hunks)
  • packages/blockchain/src/actions/shallowCopy.spec.ts (1 hunks)
  • packages/blockchain/src/actions/validateHeader.spec.ts (1 hunks)
  • packages/blockchain/src/createBaseChain.spec.ts (1 hunks)
  • packages/blockchain/src/createChain.spec.ts (1 hunks)
  • packages/blockchain/src/test/getBlocks.ts (1 hunks)
Additional context used
Biome
packages/blockchain/src/actions/getCanonicalHeadBlock.spec.ts

[error] 19-19: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

packages/blockchain/src/actions/setIteratorHead.spec.ts

[error] 20-20: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

packages/blockchain/src/actions/getIteratorHead.spec.ts

[error] 37-37: Do not use template literals if interpolation and special-character handling are not needed.

Unsafe fix: Replace with string literal

(lint/style/noUnusedTemplateLiteral)


[error] 27-27: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)


[error] 35-35: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

Additional comments not posted (16)
packages/blockchain/src/actions/shallowCopy.spec.ts (1)

1-14: Well-structured test for shallowCopy.

The test suite for shallowCopy is well-organized and effectively validates the functionality of creating a shallow copy of a blockchain chain. The use of optimism.copy() ensures that each test case runs with a fresh configuration, which is a good practice for reliable and isolated testing.

packages/blockchain/src/actions/getIteratorHead.spec.ts (1)

8-39: Comprehensive test coverage for getIteratorHead.

The test cases cover a variety of scenarios including default and specific tag retrieval, and error handling for non-existent tags. This aligns well with the PR's objective to increase test coverage.

Tools
Biome

[error] 37-37: Do not use template literals if interpolation and special-character handling are not needed.

Unsafe fix: Replace with string literal

(lint/style/noUnusedTemplateLiteral)


[error] 27-27: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)


[error] 35-35: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

packages/blockchain/src/actions/getBlock.js (1)

4-5: Improved error handling and modular imports.

The introduction of UnknownBlockError and getCanonicalHeadBlock enhances the specificity and clarity of error handling in the getBlock function. This is a positive change towards better modularity and maintainability of the code.

packages/blockchain/src/createBaseChain.spec.ts (3)

9-23: Comprehensive Test for Genesis Block Creation

The test case for creating a base chain with a genesis block is well-structured and covers essential assertions such as the correctness of the common object, the size of the blocks, and the tags associated with the blocks. This test ensures that the base chain is initialized correctly with a single genesis block.


24-44: Detailed Test for Forked Block Creation

This test case effectively checks the creation of a base chain with a forked block from RPC. It uses mock blocks to simulate the environment and checks various properties of the chain after initialization. The use of getMockBlocks and the transports.optimism transport is a good practice for simulating real-world scenarios in tests.


46-71: Test Coverage for Provided Genesis Block

This test validates the creation of a base chain with a specific genesis block provided in the options. The test is thorough, checking the properties of the chain and ensuring that the 'latest' tag points to the provided genesis block. This is crucial for scenarios where the genesis block is predefined rather than generated.

packages/blockchain/src/actions/validateHeader.spec.ts (4)

8-17: Validation of Correct Headers

This test case ensures that a valid header does not throw any errors, which is a fundamental requirement for blockchain operations. The use of putBlock to set up the scenario is appropriate, and the test is clear and concise.


19-27: Error Handling for Invalid Block Number

The test case for an invalid block number is crucial as it ensures that the blockchain does not accept headers that could lead to incorrect chain states. The use of a snapshot for the error ensures that the error message remains consistent, which is important for debugging and user feedback.


29-37: Timestamp Validation Test

This test checks for errors when the timestamp does not change between blocks, which is a critical validation for preventing certain types of blockchain attacks. The snapshot usage is again a good practice here.


39-53: Consensus Type and Timestamp Difference Tests

These tests are vital for ensuring that the blockchain correctly handles consensus rules and timing requirements, which are central to the security and functionality of the blockchain. The detailed setup and error handling in these tests are well-executed.

packages/blockchain/src/actions/getBlock.spec.ts (3)

10-40: Comprehensive Testing of Block Retrieval and Error Handling

The tests for getting blocks by hash and number, and handling errors when blocks do not exist, are well-crafted. They cover essential functionality and error scenarios, ensuring that the blockchain behaves as expected in normal and edge cases.


42-66: Block Fetching and Caching from RPC

These tests validate the functionality of fetching and caching blocks from an RPC source when they do not exist locally. This is a critical feature for blockchain nodes that need to synchronize with the network or recover missing data. The tests are detailed and cover the necessary assertions.


68-80: Error Handling for Newer Blocks than Forked Block

This test ensures that errors are thrown correctly when attempting to fetch blocks that are newer than the forked block, which is important for maintaining the integrity of the forked chain state. The use of snapshots for the error messages is appropriate for consistency.

packages/blockchain/src/createChain.spec.ts (3)

6-23: Testing Method Availability and Functionality

This test confirms that all expected methods are available on the chain object, which is crucial for ensuring that the chain can perform all required operations. The test is comprehensive and covers all methods listed in the function's documentation.


45-91: Block Operations, Header Validation, and Error Handling

The tests for getting and putting blocks, validating block headers, and deleting blocks are essential for ensuring the blockchain's integrity and operability. The tests are well-structured and provide good coverage of these critical functionalities.


93-114: Iterator and Canonical Head Block Tests

These tests check the functionality related to iterators and retrieving the canonical head block, which are important for blockchain navigation and consensus operations. The tests are thorough and effectively validate these aspects.


it('should throw an error if the iterator head block does not exist', async () => {
const chain = createBaseChain({ common: optimism.copy() })
let error = await getIteratorHead(chain)('nonExistentTag').catch((e) => e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use const for variables that are not reassigned.

The variables error are never reassigned and should be declared with const instead of let to reflect their immutable nature after assignment.

- let error = await getIteratorHead(chain)('nonExistentTag').catch((e) => e)
+ const error = await getIteratorHead(chain)('nonExistentTag').catch((e) => e)

Also applies to: 35-35

Tools
Biome

[error] 27-27: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

chain.blocksByTag.set('someTag' as any, blocks[0])
let error = await getIteratorHead(chain)('nonExistentTag').catch((e) => e)
expect(error).toBeInstanceOf(Error)
expect(error.message).toBe(`No block with tag nonExistentTag exists. Current tags include someTag`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid unnecessary template literals.

The error message does not require a template literal as it does not perform any interpolation.

- expect(error.message).toBe(`No block with tag nonExistentTag exists. Current tags include someTag`)
+ expect(error.message).toBe('No block with tag nonExistentTag exists. Current tags include someTag')
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expect(error.message).toBe(`No block with tag nonExistentTag exists. Current tags include someTag`)
expect(error.message).toBe('No block with tag nonExistentTag exists. Current tags include someTag')
Tools
Biome

[error] 37-37: Do not use template literals if interpolation and special-character handling are not needed.

Unsafe fix: Replace with string literal

(lint/style/noUnusedTemplateLiteral)


it('should throw an error if the block does not exist', async () => {
const chain = createBaseChain({ common: optimism.copy() })
let error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use const for immutable variable declaration.

The variable error is never reassigned and should be declared with const for better code clarity and to prevent accidental reassignment.

- let error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
+ const error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
const error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
Tools
Biome

[error] 20-20: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

Comment on lines 8 to 26
describe(setIteratorHead.name, async () => {
const blocks = await getMockBlocks()

it('should set the iterator head for a given tag', async () => {
const chain = createBaseChain({ common: optimism.copy() })
await putBlock(chain)(blocks[0])
await setIteratorHead(chain)('myTag', blocks[0].header.hash())
expect(chain.blocksByTag.get('myTag' as any)).toBe(blocks[0])
})

it('should throw an error if the block does not exist', async () => {
const chain = createBaseChain({ common: optimism.copy() })
let error = await setIteratorHead(chain)('nonExistentTag', new Uint8Array(32)).catch((e) => e)
expect(error).toBeInstanceOf(Error)
expect(error.message).toBe(
'Block with hash 0000000000000000000000000000000000000000000000000000000000000000 not found',
)
})
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive and well-structured test cases for setIteratorHead.

The tests are well-organized and cover both successful operation and error handling scenarios. Using await inside the describe block is unusual and might be flagged by some linters or runtime environments as it can lead to unexpected behavior in some testing frameworks. It's typically better to place asynchronous setup code inside beforeEach or directly within it blocks.

- describe(setIteratorHead.name, async () => {
+ describe(setIteratorHead.name, () => {
  const blocks = await getMockBlocks()

Move the await getMockBlocks() inside each it block or a beforeEach to ensure proper handling of asynchronous operations.

The test descriptions are clear, but using a consistent format or style for test names could improve readability and maintainability.

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 20-20: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

@@ -1,11 +1,13 @@
import { InternalError } from '@tevm/errors'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of InternalError enhances error specificity.

The introduction of InternalError for non-existent canonical head blocks is a good practice, enhancing the clarity and manageability of errors. However, there's a small typo in the error message.

- throw new InternalError('No cannonical head exists on blockchain')
+ throw new InternalError('No canonical head exists on blockchain')

Also applies to: 10-10

Comment on lines 1 to 21
import { optimism } from '@tevm/common'
import { Block } from '@tevm/block'
import { transports } from '@tevm/test-utils'
import { getBlockFromRpc } from '../utils/getBlockFromRpc.js'
import { createLogger } from '@tevm/logger'

let blocks: [Block, Block, Block, Block] | undefined = undefined
export const getMockBlocks = async (): Promise<[Block, Block, Block, Block]> => {
blocks =
blocks ??
((await Promise.all(
[122750000n, 122750001n, 122750002n, 122750003n].map((blockTag) =>
getBlockFromRpc(
{ logger: createLogger({ name: 'test', level: 'warn' }) } as any,
{ transport: transports.optimism, blockTag },
optimism,
),
),
)) as [Block, Block, Block, Block])
return blocks
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Efficient use of caching in getMockBlocks, but improve type safety.

The getMockBlocks function efficiently uses caching to avoid unnecessary RPC calls, which is commendable. However, the use of as any could obscure potential type mismatches and errors.

- { logger: createLogger({ name: 'test', level: 'warn' }) } as any,
+ { logger: createLogger({ name: 'test', level: 'warn' }) },

If further type adjustments are necessary, it's better to define a proper interface or use more specific casting to enhance maintainability and type safety.

Committable suggestion was skipped due to low confidence.

Comment on lines 1 to 23
import { describe, expect, it } from 'bun:test'
import { getCanonicalHeadBlock } from './getCanonicalHeadBlock.js'
import { createBaseChain } from '../createBaseChain.js'
import { putBlock } from './putBlock.js'
import { getMockBlocks } from '../test/getBlocks.js'
import { optimism } from '@tevm/common'
import { InternalError } from '@tevm/errors'

describe(getCanonicalHeadBlock.name, async () => {
const blocks = await getMockBlocks()
it('should get the canonical head block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
await putBlock(chain)(blocks[0])
expect(await getCanonicalHeadBlock(chain)()).toBe(blocks[0])
})
it('should throw an error if not cannonical block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
chain.blocksByTag.set('latest', undefined)
let error = await getCanonicalHeadBlock(chain)().catch((e) => e)
expect(error).toBeInstanceOf(InternalError)
expect(error).toMatchSnapshot()
})
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive tests for getCanonicalHeadBlock, minor improvement suggested.

The test suite comprehensively covers the functionality of getCanonicalHeadBlock, including both successful retrieval and error handling scenarios. The use of snapshot testing for error messages is a good practice to ensure consistency. However, there's a minor improvement suggested by static analysis tools that should be implemented.

- let error = await getCanonicalHeadBlock(chain)().catch((e) => e)
+ const error = await getCanonicalHeadBlock(chain)().catch((e) => e)

This change ensures adherence to best practices in variable declaration.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { describe, expect, it } from 'bun:test'
import { getCanonicalHeadBlock } from './getCanonicalHeadBlock.js'
import { createBaseChain } from '../createBaseChain.js'
import { putBlock } from './putBlock.js'
import { getMockBlocks } from '../test/getBlocks.js'
import { optimism } from '@tevm/common'
import { InternalError } from '@tevm/errors'
describe(getCanonicalHeadBlock.name, async () => {
const blocks = await getMockBlocks()
it('should get the canonical head block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
await putBlock(chain)(blocks[0])
expect(await getCanonicalHeadBlock(chain)()).toBe(blocks[0])
})
it('should throw an error if not cannonical block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
chain.blocksByTag.set('latest', undefined)
let error = await getCanonicalHeadBlock(chain)().catch((e) => e)
expect(error).toBeInstanceOf(InternalError)
expect(error).toMatchSnapshot()
})
})
import { describe, expect, it } from 'bun:test'
import { getCanonicalHeadBlock } from './getCanonicalHeadBlock.js'
import { createBaseChain } from '../createBaseChain.js'
import { putBlock } from './putBlock.js'
import { getMockBlocks } from '../test/getBlocks.js'
import { optimism } from '@tevm/common'
import { InternalError } from '@tevm/errors'
describe(getCanonicalHeadBlock.name, async () => {
const blocks = await getMockBlocks()
it('should get the canonical head block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
await putBlock(chain)(blocks[0])
expect(await getCanonicalHeadBlock(chain)()).toBe(blocks[0])
})
it('should throw an error if not cannonical block', async () => {
const chain = createBaseChain({ common: optimism.copy() })
chain.blocksByTag.set('latest', undefined)
const error = await getCanonicalHeadBlock(chain)().catch((e) => e)
expect(error).toBeInstanceOf(InternalError)
expect(error).toMatchSnapshot()
})
})
Tools
Biome

[error] 19-19: This let declares a variable that is only assigned once.

'error' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (2)
packages/blockchain/src/actions/getBlockByTag.js (1)

Issue Found: Inconsistent Handling of Multiple Return Values in getBlockByTag

The new implementation of getBlockByTag returns two values (block and jsonRpcBlock), but the existing usages only handle a single return value. This inconsistency needs to be addressed to ensure proper functionality.

  • Files with inconsistent usage:
    • packages/actions/src/GetAccount/getAccountHandler.js
    • packages/actions/src/DumpState/dumpStateHandler.js
    • packages/actions/src/eth/getStorageAtHandler.js
    • packages/blockchain/src/createChain.js

Please update these usages to handle the new multiple return values.

Analysis chain

Line range hint 21-34: Approved: Updated logic for retrieving and storing blocks.
The modifications to getBlockByTag to handle multiple return values and update the storage logic based on these values are logical. It's important to verify that this new approach is consistent with the rest of the system and that it handles edge cases correctly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the integration of the new logic in `getBlockByTag` with the rest of the system.

# Test: Search for usages of `getBlockByTag`. Expect: Consistent handling of the new multiple return values.
rg --type javascript -A 10 $'getBlockByTag'

Length of output: 77


Script:

#!/bin/bash
# Description: Verify the integration of the new logic in `getBlockByTag` with the rest of the system.

# Test: Search for usages of `getBlockByTag`. Expect: Consistent handling of the new multiple return values.
rg --glob '*.js' -A 10 'getBlockByTag'

Length of output: 6070


Script:

#!/bin/bash
# Description: Verify the integration of the new logic in `getBlockByTag` with the rest of the system.

# Test: Search for usages of `getBlockByTag` and extract more lines around them to verify handling of multiple return values.
rg --glob '*.js' -A 20 -B 5 'getBlockByTag'

Length of output: 11143

packages/blockchain/src/utils/getBlockFromRpc.spec.ts (1)

33-33: Inconsistent usage of block hash retrieval methods.

The search results indicate that both block.hash() and block.header.hash() are still being used in the codebase. This inconsistency needs to be addressed to ensure uniformity in how block hashes are retrieved.

  • Files using block.header.hash():
    • packages/vm/src/actions/validateRunTx.spec.ts
    • packages/memory-client/src/test/viem/waitForTransactionReceipt.spec.ts
    • packages/memory-client/src/test/viem/getTransaction.spec.ts

Please update these instances to use block.hash() for consistency.

Analysis chain

Changes to hash function calls.

The change from block.header.hash() to block.hash() suggests a simplification or modification in how block hashes are retrieved. Confirm that this change is consistent across all relevant parts of the codebase.

Also applies to: 42-42

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the consistent usage of `block.hash()` across the codebase.

# Test: Search for the function usage. Expect: Only occurances of the new method.
rg --type python -A 5 $'block.hash()'

Length of output: 69


Script:

#!/bin/bash
# Description: Verify the consistent usage of `block.hash()` across the codebase.

# Test: Search for the function usage. Expect: Only occurrences of the new method.
rg --type typescript -A 5 $'block.hash()'

# Test: Search for the old method usage. Expect: No occurrences of the old method.
rg --type typescript -A 5 $'block.header.hash()'

Length of output: 162


Script:

#!/bin/bash
# Description: Verify the consistent usage of `block.hash()` across the codebase.

# Test: Search for the function usage. Expect: Only occurrences of the new method.
rg 'block.hash()' --glob '*.ts' -A 5

# Test: Search for the old method usage. Expect: No occurrences of the old method.
rg 'block.header.hash()' --glob '*.ts' -A 5

Length of output: 46103

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 362ae4a and 9e0cdab.

Files ignored due to path filters (6)
  • packages/blockchain/src/actions/__snapshots__/delBlock.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/actions/__snapshots__/getBlock.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/actions/__snapshots__/getBlockByTag.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/actions/__snapshots__/getCanonicalHeadBlock.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/actions/__snapshots__/getIteratorHead.spec.ts.snap is excluded by !**/*.snap
  • packages/blockchain/src/utils/__snapshots__/getBlockFromRpc.spec.ts.snap is excluded by !**/*.snap
Files selected for processing (26)
  • packages/blockchain/src/actions/deepCopy.spec.ts (1 hunks)
  • packages/blockchain/src/actions/delBlock.js (1 hunks)
  • packages/blockchain/src/actions/delBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getBlock.js (4 hunks)
  • packages/blockchain/src/actions/getBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getBlockByTag.js (2 hunks)
  • packages/blockchain/src/actions/getBlockByTag.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getCanonicalHeadBlock.js (1 hunks)
  • packages/blockchain/src/actions/getCanonicalHeadBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/getIteratorHead.js (2 hunks)
  • packages/blockchain/src/actions/getIteratorHead.spec.ts (1 hunks)
  • packages/blockchain/src/actions/putBlock.js (1 hunks)
  • packages/blockchain/src/actions/putBlock.spec.ts (1 hunks)
  • packages/blockchain/src/actions/setIteratorHead.spec.ts (1 hunks)
  • packages/blockchain/src/actions/shallowCopy.spec.ts (1 hunks)
  • packages/blockchain/src/actions/validateHeader.spec.ts (1 hunks)
  • packages/blockchain/src/createBaseChain.js (1 hunks)
  • packages/blockchain/src/createBaseChain.spec.ts (1 hunks)
  • packages/blockchain/src/createChain.spec.ts (1 hunks)
  • packages/blockchain/src/index.ts (1 hunks)
  • packages/blockchain/src/test/getBlocks.ts (1 hunks)
  • packages/blockchain/src/utils/getBlockFromRpc.js (4 hunks)
  • packages/blockchain/src/utils/getBlockFromRpc.spec.ts (7 hunks)
  • packages/blockchain/src/utils/isTevmBlockTag.spec.ts (1 hunks)
  • packages/blockchain/src/utils/isTevmBlockTag.ts (1 hunks)
  • packages/blockchain/src/utils/warnOnce.spec.ts (1 hunks)
Files skipped from review as they are similar to previous changes (12)
  • packages/blockchain/src/actions/deepCopy.spec.ts
  • packages/blockchain/src/actions/delBlock.js
  • packages/blockchain/src/actions/delBlock.spec.ts
  • packages/blockchain/src/actions/getBlock.spec.ts
  • packages/blockchain/src/actions/getBlockByTag.spec.ts
  • packages/blockchain/src/actions/getCanonicalHeadBlock.spec.ts
  • packages/blockchain/src/actions/getIteratorHead.spec.ts
  • packages/blockchain/src/actions/putBlock.spec.ts
  • packages/blockchain/src/actions/setIteratorHead.spec.ts
  • packages/blockchain/src/actions/validateHeader.spec.ts
  • packages/blockchain/src/createChain.spec.ts
  • packages/blockchain/src/test/getBlocks.ts
Additional comments not posted (20)
packages/blockchain/src/actions/getCanonicalHeadBlock.js (1)

1-1: Use of InternalError enhances error specificity.

The introduction of InternalError for non-existent canonical head blocks is a good practice, enhancing the clarity and manageability of errors. However, there's a small typo in the error message.

- throw new InternalError('No cannonical head exists on blockchain')
+ throw new InternalError('No canonical head exists on blockchain')

Also applies to: 11-11

packages/blockchain/src/index.ts (1)

15-15: Export of isTevmBlockTag is approved.

Ensure that isTevmBlockTag is accompanied by appropriate documentation and tests, especially since it is now part of the public API.

packages/blockchain/src/actions/shallowCopy.spec.ts (1)

6-14: Test for shallowCopy function looks good.

The current test validates that the options of the original and copied chains are the same. Consider adding more comprehensive tests to cover other aspects of the chain to ensure the shallowCopy function works as intended across different scenarios.

packages/blockchain/src/actions/getIteratorHead.js (1)

1-1: Use of InvalidBlockError enhances error specificity and provides detailed information.

Replacing Error with InvalidBlockError is a good practice as it provides more specific error categorization. The detailed error message is helpful for debugging and understanding the context of the error.

Also applies to: 12-15

packages/blockchain/src/utils/isTevmBlockTag.ts (3)

1-1: Approved: Constant array of block tags.
The array tevmBlockTags is well-defined and uses as const to ensure TypeScript treats it as a tuple of literal types, which is good for type safety.


6-6: Approved: TypeScript type definition for block tags.
The type definition TevmBlockTag is correctly derived from the tevmBlockTags array, ensuring that only valid strings can be assigned to variables of this type.


13-14: Approved: Function to check block tag validity.
The function isTevmBlockTag correctly checks if the input is a string and if it is included in the defined block tags. This ensures that the function will accurately identify valid block tags.

packages/blockchain/src/actions/putBlock.js (1)

13-13: Approved: Updated block storage logic.
The line of code that sets the block in baseChain.blocks using bytesToHex(block.hash()) is a logical change assuming block.hash() is a more direct or correct way to obtain the block's hash compared to block.header.hash(). This should be verified across the system to ensure consistency.

Verification successful

Approved: Updated block storage logic.
The transition from block.header.hash() to block.hash() is consistent across the implementation files. However, there are still references to block.header.hash() in some test files. It is recommended to update these references for complete consistency.

  • packages/memory-client/src/test/viem/waitForTransactionReceipt.spec.ts
  • packages/memory-client/src/test/viem/getTransaction.spec.ts
  • packages/vm/src/actions/validateRunTx.spec.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of block.hash() across the system to ensure consistency.

# Test: Search for other usages of block.header.hash(). Expect: No other usages that conflict with the new method.
rg --type javascript -A 5 $'block.header.hash()'

Length of output: 84


Script:

#!/bin/bash
# Description: Verify the usage of block.hash() across the system to ensure consistency.

# Find all JavaScript files and search for block.header.hash() within those files
fd -e js -e jsx -e ts -e tsx | xargs rg 'block.header.hash()'

Length of output: 405


Script:

#!/bin/bash
# Description: Verify the usage of block.hash() across the system to ensure consistency.

# Find all JavaScript files and search for block.hash() within those files
fd -e js -e jsx -e ts -e tsx | xargs rg 'block.hash()'

Length of output: 13144

packages/blockchain/src/utils/isTevmBlockTag.spec.ts (1)

4-34: Approved: Comprehensive test cases for block tag validation.
The test suite for isTevmBlockTag includes checks for valid tags, invalid tags, and non-string inputs, which is comprehensive. The use of TypeScript's type assertions in the tests also helps ensure that the type definitions are correct.

packages/blockchain/src/utils/warnOnce.spec.ts (2)

8-32: Well-structured test for logging behavior.

This test case effectively checks that the warnOnce function logs a warning only once for the same transaction type, even if called multiple times. The use of mocking and assertions is appropriate and well implemented.


34-53: Effective test for repeated warning suppression.

This test case correctly ensures that the warnOnce function does not log additional warnings when called multiple times with the same transaction. It extends the first test case by increasing the number of function calls, which is a good practice to confirm the robustness of the warning suppression.

packages/blockchain/src/createBaseChain.js (1)

71-77: Proper handling of blocks fetched from RPC.

The changes correctly handle the scenario where blocks are fetched from RPC and need to be added to the blockchain's internal storage. The condition checking jsonRpcBlock.hash before adding it to chain.blocks ensures that only valid blocks are stored, which is crucial for maintaining the integrity of the blockchain.

packages/blockchain/src/createBaseChain.spec.ts (1)

9-79: Comprehensive test suite for createBaseChain.

The test cases provided cover a wide range of scenarios including state initialization, genesis block creation, and handling forked blocks from RPC. Each test case is well-structured and effectively tests the intended functionality of the createBaseChain function.

packages/blockchain/src/actions/getBlock.js (1)

Line range hint 27-68: Enhanced error handling and block retrieval logic.

The refactoring of error handling using InvalidBlockError and UnknownBlockError improves the clarity and specificity of error messages. The introduction of getCanonicalHeadBlock and the logic to store the block hash twice are important for ensuring the integrity and consistency of the blockchain, especially in scenarios where transactions are filtered.

packages/blockchain/src/utils/getBlockFromRpc.js (3)

6-6: Import of isTevmBlockTag.

This change is crucial as it replaces the removed isBlockTag function. Ensure that isTevmBlockTag is adequately tested and its behavior aligns with the expected use cases in getBlockFromRpc.

Verification successful

Import of isTevmBlockTag.

The isTevmBlockTag function is correctly implemented, imported, and tested. The changes align with the intended functionality enhancements.

  • packages/blockchain/src/utils/isTevmBlockTag.ts: Implementation of isTevmBlockTag.
  • packages/blockchain/src/utils/isTevmBlockTag.spec.ts: Tests for isTevmBlockTag.
  • packages/blockchain/src/utils/getBlockFromRpc.js: Import and usage of isTevmBlockTag.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation and usage of `isTevmBlockTag`.

# Test: Search for the function implementation and usage.
ast-grep --lang javascript --pattern $'import { isTevmBlockTag } from "./isTevmBlockTag.js"'

Length of output: 93


Script:

#!/bin/bash
# Description: Verify the implementation and usage of `isTevmBlockTag`.

# Search for the implementation of `isTevmBlockTag`.
ast-grep --lang javascript --pattern $'export function isTevmBlockTag($_) { $$$ }'

# Search for all occurrences of `isTevmBlockTag` in the codebase to verify its usage.
rg 'isTevmBlockTag'

Length of output: 1110


20-43: Updated function signature and logic in asEthjsBlock.

The function now returns a tuple, which suggests a change in how the results are handled by the callers. The logic inside filters out specific transaction types, which might affect how blocks are processed. This change should be reflected in all parts of the codebase that use this function.

- @param {import('viem').RpcBlock<'latest', true>} rpcBlock
- @returns {Block}
+ @param {import('viem').RpcBlock<import('viem').BlockTag, true>} rpcBlock
+ @returns {[Block, import('viem').RpcBlock<import('viem').BlockTag, true>]}

Ensure that all callers of asEthjsBlock are updated to handle the tuple response.


83-83: Condition change in getBlockFromRpc.

The change from isBlockTag to isTevmBlockTag must be validated to ensure that it does not break existing functionality or expectations.

packages/blockchain/src/utils/getBlockFromRpc.spec.ts (3)

16-16: Adjustments to function calls in test cases.

The destructuring of the result from getBlockFromRpc into an array aligns with the updated return type of the function. Ensure that all test cases correctly handle the tuple returned by the function.

All changes to test cases correctly reflect the updated function signature.

Also applies to: 30-30, 42-42


62-76: Expanded error handling test cases.

The new test cases for handling fetch errors and non-existing block tags are essential for ensuring robustness. It's good to see these scenarios being tested.

The addition of these test cases improves the test coverage and robustness of the blockchain functionality.

Also applies to: 101-113


6-6: Updated imports in test file.

The addition of custom from viem suggests new testing scenarios involving custom transport behaviors. Ensure that the usage of custom is correctly implemented in the test cases.

Verification successful

Updated imports in test file.

The addition of custom from viem is correctly implemented in the test cases to create custom transport behaviors.

  • packages/blockchain/src/utils/getBlockFromRpc.spec.ts: Verified usage of custom function.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correct usage of `custom` in test cases.

# Test: Search for the function usage in test cases.
rg --type python -A 5 $'custom'

Length of output: 61


Script:

#!/bin/bash
# Description: Verify the correct usage of `custom` in test cases.

# Test: Search for the function usage in test cases.
rg --type typescript -A 5 $'custom'

Length of output: 69


Script:

#!/bin/bash
# Description: Verify the correct usage of `custom` in test cases.

# Test: Search for the function usage in test cases.
rg --glob '*.ts' -A 5 $'custom'

Length of output: 178636

@@ -62,6 +57,7 @@ export const getBlockFromRpc = async (baseChain, { transport, blockTag = 'latest
})
)
if (error) {
// TODO we should handle this error code better
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling TODO comments.

While the TODO comments indicate an intention to improve error handling, it would be beneficial to implement these improvements as part of this PR to align with the goal of enhancing robustness.

Consider implementing the suggested error handling improvements now rather than leaving them as TODOs.

Also applies to: 83-83

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (5)
.changeset/olive-maps-design.md (1)

5-5: Typographical correction needed in the description.

The word "syncronously" should be corrected to "synchronously" to maintain professionalism and accuracy in documentation.

- Fixed bug where async methods would sometimes syncronously throw rather than returning a rejected promise
+ Fixed bug where async methods would sometimes synchronously throw rather than returning a rejected promise
.changeset/warm-dancers-glow.md (1)

5-5: Clarify the workaround in the description.

The description of the workaround involving optimism based chains could be expanded for clarity. Specifically, it would be helpful to explain how the workaround operates and its implications.

- Fixed bug where on optimism based chains block.header.parentHash would falsely not exist. This is because deposit transactions are filtered out at this time thus the block hashes are changed. As a workaround until optimism deposit transactions are supported getBlock(realHash) will still return the intended block
+ Fixed a bug where, on optimism-based chains, block.header.parentHash would falsely appear as non-existent. This occurs because deposit transactions are currently filtered out, altering the block hashes. As a temporary workaround, until optimism deposit transactions are fully supported, calling getBlock(realHash) will still return the intended block.
docs/src/content/docs/reference/@tevm/blockchain/functions/isTevmBlockTag.md (1)

8-8: Possible punctuation issue.

According to static analysis tools, a punctuation mark might be missing after the function declaration. This could improve readability.

- > **isTevmBlockTag**(`blockTag`): blockTag is "latest" \| "earliest" \| "pending" \| "safe" \| "finalized" \| "forked"
+ > **isTevmBlockTag**(`blockTag`): blockTag is "latest" \| "earliest" \| "pending" \| "safe" \| "finalized" \| "forked".
Tools
LanguageTool

[uncategorized] ~8-~8: A punctuation mark might be missing here.
Context: ...TevmBlockTag" --- > isTevmBlockTag(blockTag): blockTag is "latest" | "earliest" |...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

packages/blockchain/docs/functions/isTevmBlockTag.md (1)

9-9: Consider adding a colon for clarity.

The static analysis tool suggests that a punctuation mark might be missing. Adding a colon after the function name could improve readability and clarity, especially since the function's purpose and parameters are immediately described.

- > **isTevmBlockTag**(`blockTag`): blockTag is "latest" \| "earliest" \| "pending" \| "safe" \| "finalized" \| "forked"
+ > **isTevmBlockTag**(`blockTag`): blockTag is "latest" \| "earliest" \| "pending" \| "safe" \| "finalized" \| "forked":
Tools
LanguageTool

[uncategorized] ~9-~9: A punctuation mark might be missing here.
Context: ... isTevmBlockTag() > isTevmBlockTag(blockTag): blockTag is "latest" | "earliest" |...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

tevm/docs/blockchain/functions/getBlockFromRpc.md (1)

9-9: Documentation update approved; minor punctuation fix needed.

The function signature update to include RpcBlock is correctly documented. This change aligns with the new function behavior as described.

However, consider adding a comma after __namedParameters for better readability.

- > **getBlockFromRpc**(`baseChain`, `__namedParameters`, `common`): `Promise`\<[[`Block`](../../block/classes/Block.md), `RpcBlock`]\>
+ > **getBlockFromRpc**(`baseChain`, `__namedParameters`, `common`,): `Promise`\<[[`Block`](../../block/classes/Block.md), `RpcBlock`]\>

Also applies to: 27-27

Tools
LanguageTool

[uncategorized] ~9-~9: A punctuation mark might be missing here.
Context: ...amedParameters, common): Promise\<[[Block](../../block/classes/Block.md), RpcBlock`]...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9e0cdab and 8dab74b.

Files ignored due to path filters (5)
  • packages/actions/src/Call/__snapshots__/callHandler.spec.ts.snap is excluded by !**/*.snap
  • packages/actions/src/Call/__snapshots__/callHandlerOpts.spec.ts.snap is excluded by !**/*.snap
  • packages/actions/src/Call/__snapshots__/validateCallParams.spec.ts.snap is excluded by !**/*.snap
  • packages/actions/src/GetAccount/__snapshots__/validateGetAccountParams.spec.ts.snap is excluded by !**/*.snap
  • packages/actions/src/Mine/__snapshots__/mineHandler.spec.ts.snap is excluded by !**/*.snap
Files selected for processing (21)
  • .changeset/olive-maps-design.md (1 hunks)
  • .changeset/warm-dancers-glow.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/delBlock.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/getBlock.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/getBlockFromRpc.md (2 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/getCanonicalHeadBlock.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/getIteratorHead.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/functions/isTevmBlockTag.md (1 hunks)
  • docs/src/content/docs/reference/@tevm/blockchain/globals.md (1 hunks)
  • packages/blockchain/docs/functions/delBlock.md (1 hunks)
  • packages/blockchain/docs/functions/getBlock.md (1 hunks)
  • packages/blockchain/docs/functions/getBlockFromRpc.md (2 hunks)
  • packages/blockchain/docs/functions/getCanonicalHeadBlock.md (1 hunks)
  • packages/blockchain/docs/functions/getIteratorHead.md (1 hunks)
  • packages/blockchain/docs/functions/isTevmBlockTag.md (1 hunks)
  • packages/blockchain/docs/globals.md (1 hunks)
  • packages/procedures/src/utils/blockToJsonRpcBlock.spec.ts (1 hunks)
  • packages/procedures/src/utils/txToJsonRpcTx.spec.ts (1 hunks)
  • tevm/docs/blockchain/README.md (1 hunks)
  • tevm/docs/blockchain/functions/getBlockFromRpc.md (2 hunks)
  • tevm/docs/blockchain/functions/isTevmBlockTag.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/src/content/docs/reference/@tevm/blockchain/globals.md
Additional context used
LanguageTool
docs/src/content/docs/reference/@tevm/blockchain/functions/isTevmBlockTag.md

[uncategorized] ~8-~8: A punctuation mark might be missing here.
Context: ...TevmBlockTag" --- > isTevmBlockTag(blockTag): blockTag is "latest" | "earliest" |...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

packages/blockchain/docs/functions/isTevmBlockTag.md

[uncategorized] ~9-~9: A punctuation mark might be missing here.
Context: ... isTevmBlockTag() > isTevmBlockTag(blockTag): blockTag is "latest" | "earliest" |...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

tevm/docs/blockchain/functions/getBlockFromRpc.md

[uncategorized] ~9-~9: A punctuation mark might be missing here.
Context: ...amedParameters, common): Promise\<[[Block](../../block/classes/Block.md), RpcBlock`]...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

Additional comments not posted (15)
packages/blockchain/docs/functions/getBlock.md (1)

31-31: Updated link to function definition.

The link to the function definition has been updated correctly to reflect the new line number in the source code. This ensures that the documentation remains accurate and up-to-date.

packages/blockchain/docs/functions/getCanonicalHeadBlock.md (1)

27-27: Updated link to function definition.

The link to the function definition has been updated correctly to reflect the new line number in the source code. This ensures that the documentation remains accurate and up-to-date.

docs/src/content/docs/reference/@tevm/blockchain/functions/getCanonicalHeadBlock.md (1)

26-26: Approve the link update.

The documentation update to reflect the new line number in the link is correct.

However, verify that the link correctly points to the getCanonicalHeadBlock function definition.

Verification successful

Approve the link update.

The documentation update to reflect the new line number in the link is correct. The link correctly points to the getCanonicalHeadBlock function definition.

  • packages/blockchain/src/actions/getCanonicalHeadBlock.js:7 contains the definition of getCanonicalHeadBlock.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getCanonicalHeadBlock.js`.

# Test: Fetch the specified line from the file and check if it contains the function definition.
rg --type js --line-number 'function getCanonicalHeadBlock' packages/blockchain/src/actions/getCanonicalHeadBlock.js

Length of output: 118


Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getCanonicalHeadBlock.js`.

# Search for any function definitions in the specified file.
rg --type js --line-number 'function ' packages/blockchain/src/actions/getCanonicalHeadBlock.js

# Search for any usage of 'getCanonicalHeadBlock' in the specified file to determine if it is defined differently.
rg --type js --line-number 'getCanonicalHeadBlock' packages/blockchain/src/actions/getCanonicalHeadBlock.js

Length of output: 342

docs/src/content/docs/reference/@tevm/blockchain/functions/getBlock.md (1)

30-30: Approve the link update.

The documentation update to reflect the new line number in the link is correct.

However, verify that the link correctly points to the getBlock function definition.

Verification successful

The link correctly points to the getBlock function definition.

The documentation update to reflect the new line number in the link is accurate.

  • packages/blockchain/src/actions/getBlock.js at line 13 contains the getBlock function definition.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getBlock.js`.

# Test: Fetch the specified line from the file and check if it contains the function definition.
rg --type js --line-number 'function getBlock' packages/blockchain/src/actions/getBlock.js

Length of output: 92


Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getBlock.js`.

# Search for the `getBlock` function definition in the entire codebase.
ast-grep --lang javascript --pattern 'function getBlock($_, $_) { $$$ }'

Length of output: 6130


Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getBlock.js`.

# Search for the `getBlock` string in the `packages/blockchain/src/actions` directory.
rg --type js --line-number 'getBlock' packages/blockchain/src/actions

Length of output: 1991

packages/blockchain/docs/functions/getIteratorHead.md (1)

33-33: Approve the link update.

The documentation update to reflect the new line number in the link is correct.

However, verify that the link correctly points to the getIteratorHead function definition.

Verification successful

The link in the documentation correctly points to the getIteratorHead function definition.

  • The function getIteratorHead is defined at line 7 in packages/blockchain/src/actions/getIteratorHead.js.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getIteratorHead.js`.

# Test: Fetch the specified line from the file and check if it contains the function definition.
rg --type js --line-number 'function getIteratorHead' packages/blockchain/src/actions/getIteratorHead.js

Length of output: 106


Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `getIteratorHead.js`.

# Test: Fetch all possible forms of the `getIteratorHead` function definition from the file.
rg --type js --line-number 'getIteratorHead' packages/blockchain/src/actions/getIteratorHead.js -A 3

Length of output: 332

docs/src/content/docs/reference/@tevm/blockchain/functions/delBlock.md (1)

33-33: Approve the link update.

The documentation update to reflect the new line number in the link is correct.

However, verify that the link correctly points to the delBlock function definition.

Verification successful

Approve the link update.

The documentation update to reflect the new line number in the link is correct. The link correctly points to the delBlock function definition.

  • The delBlock function is defined as an exported constant on line 12 in packages/blockchain/src/actions/delBlock.js.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the link points to the correct line in `delBlock.js`.

# Test: Fetch the specified line from the file and check if it contains the function definition.
rg --type js --line-number 'function delBlock' packages/blockchain/src/actions/delBlock.js

Length of output: 92


Script:

#!/bin/bash
# Description: Search for any function definitions or exports related to `delBlock` in the file.

# Search for function definitions, including arrow functions and methods.
rg --type js --line-number 'delBlock' packages/blockchain/src/actions/delBlock.js -A 5

# Search for export statements related to `delBlock`.
rg --type js --line-number 'export' packages/blockchain/src/actions/delBlock.js

Length of output: 649

docs/src/content/docs/reference/@tevm/blockchain/functions/getIteratorHead.md (1)

32-32: Line number update reviewed.

The line number in the link has been updated to reflect the correct location of the function in the source code. This ensures that the documentation remains accurate and useful for developers.

tevm/docs/blockchain/functions/isTevmBlockTag.md (1)

9-9: Ensure documentation consistency.

This file and the previous isTevmBlockTag.md file should be consistent in content and formatting as they describe the same function. Ensure that any changes made to one are reflected in the other to maintain uniformity across documentation.

packages/blockchain/docs/functions/delBlock.md (1)

34-34: Line number update reviewed.

The line number in the link has been updated to reflect the correct location of the function in the source code. This ensures that the documentation remains accurate and useful for developers.

packages/blockchain/docs/globals.md (1)

22-22: Addition of isTevmBlockTag function to documentation.

The isTevmBlockTag function has been correctly added to the list of functions. This ensures that the documentation remains up-to-date with the codebase.

tevm/docs/blockchain/README.md (1)

26-26: Addition of isTevmBlockTag function to README.

The isTevmBlockTag function has been correctly added to the list of functions in the README. This helps users find the function's documentation more easily.

packages/blockchain/docs/functions/getBlockFromRpc.md (1)

9-9: Updated documentation for getBlockFromRpc.

The documentation for getBlockFromRpc has been updated to reflect the new return type, which includes a tuple of types. This change is accurately documented, and the link to the function's definition is correct.

Also applies to: 27-27, 31-31

packages/procedures/src/utils/blockToJsonRpcBlock.spec.ts (1)

11-11: Destructuring change approved.

The update to destructure the block variable from the result of getBlockFromRpc is correctly implemented. This aligns with the updated function signature and ensures the test cases are using the correct part of the returned tuple.

docs/src/content/docs/reference/@tevm/blockchain/functions/getBlockFromRpc.md (1)

8-8: Documentation update approved.

The expanded return type signature in the documentation correctly reflects the new function behavior. The inclusion of RpcBlock with additional nested structures is well-documented.

Also applies to: 26-26, 30-30

packages/procedures/src/utils/txToJsonRpcTx.spec.ts (1)

29-29: Destructuring change approved.

The update to destructure the block variable from the result of getBlockFromRpc is correctly implemented. This aligns with the updated function signature and ensures the test cases are using the correct part of the returned tuple.

@roninjin10 roninjin10 merged commit fb42620 into main Jul 16, 2024
9 of 10 checks passed
@roninjin10 roninjin10 deleted the 07-15-_white_check_mark_test_add_100_test_coverage_to_tevm_blockchain_package branch July 16, 2024 07:41
roninjin10 pushed a commit that referenced this pull request Jul 17, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @tevm/[email protected]

### Minor Changes

- [#1314](#1314)
[`419b19f`](419b19f)
Thanks [@roninjin10](https://github.com/roninjin10)! - Added pending
block tag support to eth_getStorageAt eth_getLogs tevm_getAccount
eth_getBalance eth_getCode and tevm_dumpState. All these methods also
support historical blocck tags in a more robust way now too

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- [#1318](#1318)
[`45950f7`](45950f7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Updated json-rpc
methods to bubble up errors from failing to build a pending client

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- [#1319](#1319)
[`fb42620`](fb42620)
Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug where
async methods would sometimes syncronously throw rather than returning a
rejected promise

- [#1317](#1317)
[`1028d01`](1028d01)
Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed mispelling
in console.warn

- [#1319](#1319)
[`fb42620`](fb42620)
Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug where
on optimism based chains block.header.parentHash would falsely not
exist. This is because deposit transactions are filtered out at this
time thus the block hashes are changed. As a workaround until optimism
deposit transactions are supported getBlock(realHash) will still return
the intended block

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`45950f7`](45950f7),
[`419b19f`](419b19f)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`45950f7`](45950f7),
[`419b19f`](419b19f)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`45950f7`](45950f7),
[`fb42620`](fb42620),
[`419b19f`](419b19f),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- [#1322](#1322)
[`6407be7`](6407be7)
Thanks [@roninjin10](https://github.com/roninjin10)! - Migrated to
vitest for better coverage reporting

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- Updated dependencies
\[[`6407be7`](6407be7),
[`fb42620`](fb42620),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## @tevm/[email protected]

### Patch Changes

- Updated dependencies
\[[`6407be7`](6407be7)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]

## [email protected]

### Patch Changes

- Updated dependencies
\[[`6407be7`](6407be7),
[`45950f7`](45950f7),
[`fb42620`](fb42620),
[`419b19f`](419b19f),
[`1028d01`](1028d01),
[`fb42620`](fb42620)]:
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]
    -   @tevm/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant