Skip to content

Conversation

@blishko
Copy link
Collaborator

@blishko blishko commented Nov 3, 2025

Description

The main proposed change in RPC is that we do not require a session if no RPC info is provided.
No RPC info should be interpreted as "unknown address contains unknown contract".
No RPC call should be made in such case and so no session is required here.

We also remove the definition of RpcInfo as a Semigroup.
I don't think it makes mathematical sense to say this is a semigroup.
Instead we make an explicit function that represents "no RPC info".

Checklist

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

@blishko blishko force-pushed the rpc-refactor branch 2 times, most recently from 7f3c7c1 to 2afa42f Compare November 3, 2025 13:42
@blishko blishko requested a review from msooseth November 3, 2025 14:33
When RPC info is not provided, we should treat access to an address as
accessing unknown contract. This is a valid behaviour and there is no
need to warn about it.
If RPC info is now provided, we should just respond with unknown
contract for each request. We do not need session for that.
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.

This is great! The fetch.hs is sooo much cleaner! I would just like to ask for 1-2 tests for stderr to contain some of the errors that you wrote. I want to make sure we basically encode in our tests what the expected behaviour is. You removed some tests, which is fine, but at least 1-2 tests about the RPC missing internal error would be nice.

@blishko
Copy link
Collaborator Author

blishko commented Nov 15, 2025

Hmm. I only removed the tests that were testing the presence (or absence) of a Warning message that is being removed. We agreed that it should be removed, because the scenario that triggered it is actually a perfectly valid scenario.

I did not add any new errors. I am not sure what kind of tests I should add.

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.

Fair enough :) Approving!

@msooseth msooseth merged commit 71c8753 into main Nov 16, 2025
7 checks passed
@msooseth msooseth deleted the rpc-refactor branch November 16, 2025 01:46
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.

3 participants