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

Reject miniblocks which are not whitelisted #2021

Merged
merged 5 commits into from Jun 25, 2020

Conversation

SebastianMarian
Copy link
Contributor

  • Implemented a mechanism which will add only whitelisted miniblocks received in pool
  • Fixed an edge case in multidata interceptor related to a throttle mechanism

…received in pool

* Fixed an edge case in multidata interceptor related to a throttle mechanism
@SebastianMarian SebastianMarian self-assigned this Jun 25, 2020
@SebastianMarian SebastianMarian added the type:feature New feature or request label Jun 25, 2020
@sasurobert sasurobert self-requested a review June 25, 2020 13:10
sasurobert
sasurobert previously approved these changes Jun 25, 2020
Copy link
Contributor

@sasurobert sasurobert left a comment

Choose a reason for hiding this comment

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

super nice catch!

@iulianpascalau iulianpascalau self-requested a review June 25, 2020 14:25
iulianpascalau
iulianpascalau previously approved these changes Jun 25, 2020
@@ -109,6 +109,7 @@ func (mdi *MultiDataInterceptor) ProcessReceivedMessage(message p2p.MessageP2P,
message.SeqNo(),
)
if err != nil {
mdi.throttler.EndProcessing()
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -1503,6 +1503,31 @@ func (tpn *TestProcessorNode) BroadcastBlock(body data.BodyHandler, header data.
_ = tpn.BroadcastMessenger.BroadcastTransactions(transactions)
}

// WhiteListBody will whitelist all miniblocks from the given body for all the given nodes
func (tpn *TestProcessorNode) WhiteListBody(nodes []*TestProcessorNode, bodyHandler data.BodyHandler) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could have whitelisted from header

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 27ef327 into development Jun 25, 2020
@LucianMincu LucianMincu deleted the reject-miniblocks-from-me branch June 25, 2020 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants