Skip to content

Conversation

@blishko
Copy link
Collaborator

@blishko blishko commented Oct 23, 2025

Description

Due to the changes in RPC cache, parsing of contracts in blockchain
tests was failing.
The solution here is to use a dedicated type, RPCContract for
serializing and deserializing contracts.
To fix the blockchain tests, we bring back the JSON parsing code that
was used there before.

As a next step, we could refactor also how contracts are handled in
these tests.

Fixes #907.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@blishko blishko force-pushed the fix-blockchain-tests branch 2 times, most recently from b74b47d to 5d2b8b0 Compare October 23, 2025 16:20
@blishko blishko marked this pull request as ready for review October 23, 2025 16:24
@blishko blishko requested a review from msooseth October 23, 2025 16:24
Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

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

My only concern is the cache JSON being removed. Now we don't check the JSON cache? Maybe it'd need a separate PR? What do you think? Otherwise, this is great, thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't there be a cache JSON so it can be loaded for the test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think @msooseth is correct, this file only needs a small modification and it should work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file is not being removed. Only external fields are removed.

@blishko
Copy link
Collaborator Author

blishko commented Oct 23, 2025

My only concern is the cache JSON being removed. Now we don't check the JSON cache? Maybe it'd need a separate PR? What do you think? Otherwise, this is great, thanks!

I think GitHub's UI is giving you a false impression.
Only two lines are being deleted from the cache file.

Due to the changes in RPC cache, parsing of contracts in blockchain
tests was failing.
The solution here is to use a dedicated type, `RPCContract` for
serializing and deserializing contracts.
To fix the blockchain tests, we bring back the JSON parsing code that
was used there before.

As a next step, we could refactor also how contracts are handled in
these tests.
@blishko blishko force-pushed the fix-blockchain-tests branch from 5d2b8b0 to 1fa1411 Compare October 23, 2025 19:43
Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

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

OK, tested and it works as expected! Thanks!

@blishko blishko merged commit 118a860 into main Oct 27, 2025
6 of 7 checks passed
@blishko blishko deleted the fix-blockchain-tests branch October 27, 2025 09:15
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.

Ethereum tests are not working due to JSON parsing error

4 participants