-
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
NEO Virtual Machine Dynamic Gas Fee Charging Proposal #3510
Comments
Makes sense in general, the difference in execution time is huge depending on number of elements involved (#1875 (comment)). |
Related to neo-project/neo-vm#245 |
exactly |
Flexible Opcode Fees for Compound Types and BufferIntroductionBackgroundCurrently, Neo employs a fixed-price model for opcode fees, regardless of the complexity or size of the data being processed. This approach, while simple, can lead to inefficiencies and potential vulnerabilities, particularly when dealing with compound types and Buffers of varying sizes. Problem DefinitionThe current fixed-price model for opcode fees presents several challenges:
Purpose of the ProposalWe propose implementing a flexible fee structure for opcodes related to compound types and Buffers, denoted as
This flexible fee approach offers several key advantages:
By implementing this flexible fee mechanism, Neo can offer a more efficient, secure, and developer-friendly platform, further solidifying its position as a leading blockchain for smart contract execution. Implementation StrategyTechnical ArchitectureOverviewWe propose modifying the current Key Components:
Design Considerations
ConclusionBy implementing this flexible fee mechanism with precise mathematical models, Neo can offer a more efficient, secure, and developer-friendly platform. The proposed equations provide a clear and professional framework for understanding and implementing the new fee structure, ensuring fairness, optimizing resource allocation, and encouraging the development of efficient smart contracts. |
We already have one and it's sufficient to me. Otherwise we need more details for opcodes, as long as we don't do neo-project/neo-vm#245 it should be OK. I'd also try concentrating on elements first ( |
BTW, variations in #1875 (comment) are based on tests that are still available in https://github.com/nspcc-dev/neo-go/blob/0968c3a81fb034ffe95ede7667d4deb4954b4021/pkg/vm/opcodebench_test.go#L163, consider those for some of edge cases as well. |
Summary or problem description
Propose a dynamic charging mechanism for Neo virtual machine when executing transactions, specifically for operations on types such as Buffer, Array, Struct, and Map. The charges should be based on the size (quantity) of data elements within these types, rather than a fixed fee.
Do you have any solution you want to propose?
Implement a dynamic charging mechanism as follows:
Expected outcomes:
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: