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

bugfix: include new line delimiter in messages sent over IPC #3537

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Nov 22, 2024

What was wrong?

  • IPCProvider and AsyncIPCProvider should use a delimiter to separate messages when writing to the socket.

How was it fixed?

  • Add b"\n" at the end of the encoded message when sending messages via IPC. Tests passed before because Geth accounts for this. However, when testing against Nethermind, all calls will hang without these changes.
  • Add tests to make sure we don't accidentally remove this at some point.

Todo:

Cute Animal Picture

        ,--._______,-.
       ,','  ,    .  ,_`-.
      / /  ,' , _` ``. |  )       `-..
     (,';'""`/ '"`-._ ` \/ ______    \\
       : ,o.-`- ,o.  )\` -'      `---.))
       : , d8b ^-.   '|   `.      `    `.
       |/ __:_     `. |  ,  `       `    \
       | ( ,-.`-.    ;'  ;   `       :    ;
       | |  ,   `.      /     ;      :    \
       ;-'`:::._,`.__),'             :     ;
      / ,  `-   `--                  ;     |
     /  \                   `       ,      |
    (    `     :              :    ,\      |
     \   `.    :     :        :  ,'  \    :
      \    `|-- `     \ ,'    ,-'     :-.-';
      :     |`--.______;     |        :    :
       :    /           |    |         |   \
       |    ;           ;    ;        /     ;
     _/--' |           :`-- /         \_:_:_|
   ,',','  |           |___ \           

- ``AsyncIPCProvider`` should use a delimiter to separate
  messages when writing to the socket.
@fselmo fselmo requested review from pacrob, kclowes and reedsa November 22, 2024 23:04
Copy link
Contributor

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

🐑

Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

LGTM! Approving, but is there a good way to test this?

@fselmo
Copy link
Collaborator Author

fselmo commented Nov 25, 2024

LGTM! Approving, but is there a good way to test this?

Yes! I was thinking to add at least a simple test before merging. I will do this before I merge to make sure the messages we send end in b"\n".

@fselmo fselmo force-pushed the bugfix-async-ipc-writer branch from 410e0f9 to 4ca7b70 Compare November 25, 2024 21:49
@fselmo fselmo changed the title bugfix: include delimiter in async ipc socket writes. bugfix: include delimiter in messages sent over IPC Nov 25, 2024
@fselmo fselmo changed the title bugfix: include delimiter in messages sent over IPC bugfix: include new line delimiter in messages sent over IPC Nov 25, 2024
@fselmo fselmo merged commit 973678f into ethereum:main Nov 25, 2024
84 of 85 checks passed
@fselmo fselmo deleted the bugfix-async-ipc-writer branch November 25, 2024 22:01
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