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

Fix MaxBlockSystemFee #774

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/DBFTPlugin/DBFTPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Akka.Actor;
using Neo.ConsoleService;
using Neo.Network.P2P;
using Neo.Network.P2P.Payloads;
using Neo.Plugins;
using Neo.Wallets;

Expand Down Expand Up @@ -87,7 +88,12 @@ public void Start(Wallet wallet)
private bool RemoteNode_MessageReceived(NeoSystem system, Message message)
{
if (message.Command == MessageCommand.Transaction)
consensus?.Tell(message.Payload);
{
Transaction tx = (Transaction)message.Payload;
if (tx.SystemFee > settings.MaxBlockSystemFee)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it change anything at all? Consensus process only cares about a specific list of transactions when it expects them in a particular stage of the process. CheckPrepareResponse does the overall check anyway for the consensus process. Then non-consensus nodes won't notice this change at all and could still have such a transaction in their mempools.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see this setting (MaxBlockSystemFee) is only in the dBFT plugin now in C# implementation, so ordinary nodes can't do anything wrt this limit.

return false;
consensus?.Tell(tx);
}
return true;
}
}
Expand Down