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

[Design] Add optimize strategy for message dispatching in network #50

Open
fbzhong opened this issue Jan 30, 2018 · 3 comments
Open

[Design] Add optimize strategy for message dispatching in network #50

fbzhong opened this issue Jan 30, 2018 · 3 comments
Assignees

Comments

@fbzhong
Copy link
Contributor

fbzhong commented Jan 30, 2018

In current implementation of go-nebulas, a network message, for example, a newtx message will broadcast to whole network, each network will also relay to peer nodes as well. That makes broadcast storm effect, which still has some impaction even if we implement receved_message strategy.

When a duplicated message are spread in network, they bring lots of computation pressure to blockchain core, especially newtx message during stress test.

To optimize that, I suppose to introduce a duplication message check in dispatcher.go module.

In function PutMessage(), check whether this message are dispatched. If so, ignore; otherwise escalate to upper level.

@fbzhong
Copy link
Contributor Author

fbzhong commented Jan 30, 2018

Update:

add metrics for duplicated messages in commit 4d843a0

@fbzhong
Copy link
Contributor Author

fbzhong commented Feb 3, 2018

So far, this strategy works, and the following commits are related to this change:
5adbb32 net: dispatcher.go. support enable & disable duplicate msg filter for…
d6cc4e4 core: block_pool.go. remove filter from downloaded block message.

The reason why we introduce this strategy is the broadcast storm, we should find new strategy to prevent that.

@fbzhong
Copy link
Contributor Author

fbzhong commented Feb 3, 2018

#56 seems a bug related to this strategy.

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

No branches or pull requests

1 participant