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

refactor: Reject BlockMessages eagerly #4606

Merged

Conversation

dima74
Copy link
Contributor

@dima74 dima74 commented May 16, 2024

Description

Currently we may ignore BlockMessage::BlockCreated if it's view change index is less then view change index of control message received in same invocation of receive_network_packet function. E.g. currently we have such behaviour:

function receive_network_packet invoked
received block message with vc#1
received control message with vc#2
=> ignored block message with vc#1

This PR extends this behaviour to support more cases, e.g.:

function receive_network_packet invoked
received control message with vc#2

function receive_network_packet invoked
received block message with vc#1
=> ignored block message with vc#1

Linked issue

Closes #4223

Benefits

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

@mversic mversic assigned DCNick3 and 0x009922 and unassigned DCNick3 May 20, 2024
@0x009922 0x009922 force-pushed the diralik/reject-block-message-eagerly branch from 25f5862 to 79d3905 Compare May 20, 2024 22:21
@0x009922
Copy link
Contributor

Rebased branch on main to update the PR to get it ready to be merged, but it broke DCO...

Sorry, I should had probably not done that.

@dima74 dima74 force-pushed the diralik/reject-block-message-eagerly branch from 79d3905 to 41cfe09 Compare May 21, 2024 08:09
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
@dima74 dima74 force-pushed the diralik/reject-block-message-eagerly branch from 41cfe09 to 00b779b Compare May 21, 2024 09:00
@dima74 dima74 merged commit 529f2ec into hyperledger-iroha:main May 21, 2024
8 of 10 checks passed
@dima74 dima74 deleted the diralik/reject-block-message-eagerly branch May 21, 2024 09:01
@dima74
Copy link
Contributor Author

dima74 commented May 21, 2024

Rebased branch on main to update the PR to get it ready to be merged, but it broke DCO...

I think something was changed in DCO, previously rebasing doesn't broke it

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.

Reject BlockMessages eagerly
4 participants