-
Notifications
You must be signed in to change notification settings - Fork 100
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
Transaction size plugin #10
Transaction size plugin #10
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.
Why create a new project instead of merging it into SimplePolicy?
You're right, I'm gonna merge it with SimplePolicy. |
Please review this first: neo-project/neo#381 |
Can we set |
Do you think we need to increase to 400 free Tx? most of normal Tx fit in 200-300 bytes. |
Once two signatures are required, it is slightly above 300 bytes. I think it is pretty common and we use that quite a lot. |
Actually thinking about it, is there a point for |
@RavenXce I've increased The approach is:
Current values are not very restrictive, so they can be revised in the future if needed. I think the change can be merged if you agree @erikzhang. |
It seems that only requiring any fee for Users who want fast transactions will already be paying an appropriate amount of fees, and spammers can still increase the blockchain size with very little cost - so nothing much is improved within that size range. Also I'm concerned about putting out minimum gas fees in general without lots of warnings and announcements to developers and the NEO community. A policy for consensus nodes to not include certain transactions should be treated as non-backward compatible change. Some contracts may not have been built with fee payment in mind, and may not allow withdrawals with fees, for example: https://github.com/neo-ngd/CGAS-Contract/blob/master/NeoContract/CGAS.cs#L46 |
Agree with @RavenXce, we can remove |
@RavenXce I'm totally agree that any change should be put in knowledge of all parties involved. As your and @erikzhang suggestion, removed |
@jsolman Can we merge this PR now? |
@erikzhang I think this will cause some problems on Switcheo DEX contracts. I went through the transactions and now saw that txns with 2 inputs and 2 output can exceed 400 bytes. If we need to merge this into mainnet can we increase the https://neotracker.io/tx/e33587a7474386305877220168713f2cff9ff21eaea0cd74caf2083a4803b195 |
Do you think 512 is a good value for |
I think to be safe we can start with 2048 or 1024. We can then lower it further if spammers are abusing the allowed size. On Switcheo's end, the max inputs allowed will be limited. |
Hi, @erikzhang, return free.Take(Settings.Default.MaxTransactionsPerBlock - non_free.Count() - 1).Concat(non_free); This last part ensures more space for free transaction (when available). The trade-off is to let this space being used for transaction that are spam or not useful. Anyway.. |
Two small changes:
We can discuss later if allow free TXs to fill the block is a good idea, I agree with that, but is not the propose of this PR. If we all agree, It's ready to go. |
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 also agree, @belane, it is not the purpose of this PR.
Perhaps it can move forward.
@belane, one last thing that we could consider. Maybe it should be: But maybe it may become "quite complex" unnecessarily, because then comes another question about what is the part used for priority and what is the part used for size.... aeuahuehaea Edited: This was already discussed above: #10 (comment) I think are you all in a good line of reasoning, simple and direct. |
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.
good catch @belane
I would prefer to keep |
@erikzhang reverted |
@belane, let's create a variable in the .config for setting the desired policy. |
Waiting for Neo 2.9.2 |
State service more
Neofs improve
Plugin to filter Transactions by size. It does not allow large free Tx and requires a proportional fee for large Tx (current values are indicative).