Skip to content

[ETCM-841] Consume remaining data when extracting Hello in order#1019

Merged
dzajkowski merged 3 commits intodevelopfrom
bugfix/etcm-841-consume-remaining-data-in-order
Jun 21, 2021
Merged

[ETCM-841] Consume remaining data when extracting Hello in order#1019
dzajkowski merged 3 commits intodevelopfrom
bugfix/etcm-841-consume-remaining-data-in-order

Conversation

@dzajkowski
Copy link
Copy Markdown
Contributor

FrameCodec holds Secrets which is a mutable structure. The unfortunate reality is that it cannot identify that it is reading a message out of order. This goes exactly in opposite to how akka actors handle messages and can cause Frame deserialization to throw a "MAC mismatch" exception.

The fix is to cause the FrameCodec to read any available data immediately and not reschedule it to a mailbox.

@dzajkowski dzajkowski force-pushed the bugfix/etcm-841-consume-remaining-data-in-order branch from ea50d69 to b395772 Compare June 18, 2021 13:49
Comment thread src/main/scala/io/iohk/ethereum/network/rlpx/RLPxConnectionHandler.scala Outdated
@dzajkowski dzajkowski force-pushed the bugfix/etcm-841-consume-remaining-data-in-order branch from 687b785 to 4c300d4 Compare June 21, 2021 20:14
@dzajkowski dzajkowski merged commit c3abf45 into develop Jun 21, 2021
@dzajkowski dzajkowski deleted the bugfix/etcm-841-consume-remaining-data-in-order branch June 21, 2021 21:02
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