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

Ensure nef file fit in vm #2939

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Ensure nef file fit in vm #2939

merged 1 commit into from
Nov 3, 2023

Conversation

shargon
Copy link
Member

@shargon shargon commented Oct 24, 2023

Following the line of neo-project/neo-vm#514

Copy link
Member Author

@shargon shargon left a comment

Choose a reason for hiding this comment

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

@Liaojinghui maybe we can just remove the constant and do this check in neo-devpack, otherwise, if it's not serialized/deserialized it won't happened. What do you think?

@Jim8y
Copy link
Contributor

Jim8y commented Oct 28, 2023

@Liaojinghui maybe we can just remove the constant and do this check in neo-devpack, otherwise, if it's not serialized/deserialized it won't happened. What do you think?

I dont think it matters, but you can do it and i will support you.

@AnnaShaleva
Copy link
Member

AnnaShaleva commented Oct 28, 2023

@Liaojinghui maybe we can just remove the constant and do this check in neo-devpack, otherwise, if it's not serialized/deserialized it won't happened.

@shargon, could you, please, clarify the constant name you're talking about? If it's the ExecutionEngineLimits.Default.MaxItemSize, then I don't think we need to remove this check from the core library, because native Management contract uses this deserialisation code on contract deploy/update, and without this check presented in the core library we can still create an unwantedly large contract.

@shargon
Copy link
Member Author

shargon commented Oct 28, 2023

@Liaojinghui maybe we can just remove the constant and do this check in neo-devpack, otherwise, if it's not serialized/deserialized it won't happened.

@shargon, could you, please, clarify the constant name you're talking about? If it's the ExecutionEngineLimits.Default.MaxItemSize, then I don't think we need to remove this check from the core library, because native Management contract uses this deserialisation code on contract deploy/update, and without this check presented in the core library we can still create an unwantedly large contract.

MaxScriptSize

@AnnaShaleva
Copy link
Member

maybe we can just remove the constant and do this check in neo-devpack

@shargon, I think it's a good idea to check the generated NEF file in the compiler against the size restrictions. I've implemented it in NeoGo, please, check the last two commits of https://github.com/nspcc-dev/neo-go/pull/3186/commits. If you're proposing something like this, then I support.

@AnnaShaleva AnnaShaleva mentioned this pull request Nov 2, 2023
@shargon
Copy link
Member Author

shargon commented Nov 3, 2023

maybe we can just remove the constant and do this check in neo-devpack

@shargon, I think it's a good idea to check the generated NEF file in the compiler against the size restrictions. I've implemented it in NeoGo, please, check the last two commits of https://github.com/nspcc-dev/neo-go/pull/3186/commits. If you're proposing something like this, then I support.

Yes, is like this

@shargon shargon merged commit efa8659 into master Nov 3, 2023
1 check passed
@shargon shargon deleted the fix-nef-file branch November 3, 2023 07:20
AnnaShaleva added a commit to nspcc-dev/neo-go that referenced this pull request Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants