-
Notifications
You must be signed in to change notification settings - Fork 1k
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 transaction route #2116
Fix transaction route #2116
Conversation
We need a unified inventory message stream. If the original stream does not have a great impact on TPS, I think there is no need to modify it. |
@Qiao-Jin Do you have some benchmarks? |
@erikzhang @shargon Could you have a check about the result? |
I think they are not much different. |
Not so much but still significant optimization I think. Besides, the effect of this optimization is limited, as current bottom neck is Moreover the logic |
If the benchmarks was after the fix (12c333e) this PR it's good to me |
Ping |
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.
It's good for me, wait for @erikzhang
case Transaction[] transactions: | ||
// This message comes from a mempool's revalidation, already relayed | ||
foreach (var tx in transactions) OnTransaction(tx, false); | ||
foreach (var tx in transactions) OnNewTransaction(tx); |
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.
The policy changed. You need to re-verify the transactions. And if you revert this change, tps will be reduced to the same as before.
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.
I suppose Func OnNewTransaction
will call func VerifyStateDependent
and policy is checked there?
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.
Previously, if the policy was changed, the transactions needed to be completely re-verified, including VerifyStateIndependent
. I'm not sure if it is unnecessary now.
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.
VerifyStateIndependent
will check only the witness correctness now. Its price will be calculated in VerifyDependent
together with others like transfer output, etc. Besides I observed that func MaxVerificationGas
is untouched in #2045. Is this correct?
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.
Can you fix this in another pr?
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.
#2107 should have solved this problem
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.
#2107 moves TxRouter
to NeoSystem
too. Can you create a pr for fixing OnNewTransaction
only?
Close #2115