-
Notifications
You must be signed in to change notification settings - Fork 145
Conversation
Please @superboyiii could you check that there are no conflicts with any non FAULTED tx? |
Just to reiterate some things from our conversation. There is a limit for NEF script (which is the main part of it): https://github.com/neo-project/neo/blob/f5e257c11c514e47cdc1da6116e475a7324ba1ac/src/Neo/SmartContract/NefFile.cs#L77 But it's way off and deploying such a NEF wouldn't be trivial. There is also a limit for manifest (somewhat more reasonable): https://github.com/neo-project/neo/blob/f5e257c11c514e47cdc1da6116e475a7324ba1ac/src/Neo/SmartContract/Manifest/ContractManifest.cs#L32 |
Can we put all these limitations into one file where we can easily check them? In another pr i mean. |
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.
Reasonable.
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 am not sure if transaction need to be turned to success for an attack to succeed.
Maybe the logic inside it can just change state if is check limits inside it and handle the exception properly.
This falls in that same kind of possible attacks.
@vang1ong7ang @dusmart
No way we can make any progress right now if we stuck in there. Though i uderstand your concern, we can not do anything about it before we have a solid version system. A desperate situation. This patch neo-project/neo-modules#835 should be able to alleviate the issue, but i dont like resync solutions and no idea when it can be merged. |
Thanks for inviting.
I misunderstood this PR's intention before. BTW. The name IIRC, the only way to make an item larger is using the |
@vncoelho @Liaojinghui yes it will cause fork but it can be purposely ignored. sometimes stack items are expanded during the execution -> make sense to have a bigger item than 64kb |
neovm is like a well-equipped tesla electric car, and we keep it safe by limiting its battery capacity to 3000mAh |
@superboyiii could you check if there are any conflict? |
No, is not required. |
So, this check is not enough that you previously mentioned. I think that check now is not enough to ensure safety of mainnet. We need to use the available versioning system or create a new one. |
We reduce from 2Gb to 250 Mb the maximun of memory allowed per execution. |
Sure |
IMO, this will also alleviate the harm introduced in neo-project/neo#2723. |
@shargon Due to the test result, no compatibility issue on mainnet. I will try testnet tomorrow. |
@shargon No storage incompatible either on mainnet or testnet. |
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.
Here we go?
To prevent possible DoS. Port the neo-project/neo-vm#514, close #3170. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
To prevent possible DoS. Port the neo-project/neo-vm#514, close #3170. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
As conversed with @roman-khimov
Alternative to fix #512
Max transaction script size is 64Kb, has no sense to have a bigger item, the longest one should be a nef file, and it should be limited to the transaction script size (now is not)