-
Notifications
You must be signed in to change notification settings - Fork 461
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 tx filters #3626
Refactor tx filters #3626
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have both ITxFilter and IIncomingTxFilter, we should unify and simplify. Then delete the obsolete one. That would probably make TxFilterAdapter obsolete too.
This is good first step but not enough for proper refactor.
src/Nethermind/Nethermind.Consensus/Transactions/NullTxFilter.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, but few details and improvements can be still done
src/Nethermind/Nethermind.TxPool/Filters/TooExpensiveTxFilter.cs
Outdated
Show resolved
Hide resolved
{ | ||
args.Set(TxAction.Skip, txFilterResult.Reason); | ||
args.Set(TxAction.Skip, txFilterResult.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should use AcceptTxResult further down the line instead of ToString() here? Not sure.
src/Nethermind/Nethermind.Baseline.Test/BaselineTreeTracker_ReorganizationTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Baseline.Test/BaselineTreeTracker_ReorganizationTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could rename "result" to "accepted" or "allowed" in many places now so it would be more readable with those if's.
This PR broke Chainlink integration. A partial fix that Chainlink needed on our side is here: smartcontractkit/chainlink#7989 @marcindsobczak in future, please keep this in mind, and possibly, could you notify Chainlink before changing error response strings? |
Thank you @prashantkumar1982 for a message. We highly appreciate such a feedback, although we don't have a knowledge how your setup works, so it would be hard to catch which changes can possibly affect it. Possible solution could be to add integration tests which we can run on our CI. Could you please provide us such a tests? We would love to add it to our codebase and then it will be easy to remember to ping you every time when we change something and tests start failing |
Hey @marcindsobczak , thanks for the suggestions. We'll discuss this internally and let you know. For reference, here (https://github.com/smartcontractkit/chainlink/blob/develop/core/chains/evm/client/errors.go#L170) you can find the regexes we use to match Nethermind's RPC responses. Depending on each response, we make a different decision on how to handle our pending transactions. As @prashantkumar1982 mentioned, if the regexes change this means that our Nodes will not be able to handle some of the responses, thus affecting our pending transactions. |
Resolves #3623
Changes:
Changing ITxFilter to be like IIncomingTxFilter (returns AddTxResult? instead of string).
Types of changes
Testing
Requires testing