GithubHelp home page GithubHelp logo

Comments (9)

erikzhang avatar erikzhang commented on June 12, 2024 1

The most direct advantage is that after removing PushOnly, we can use the instructions such as NEWARRAY, NEWSTRUCT, PACK to create parameters in Neo.Core.Witness::InvocationScript. And there's no reason to limit it now.

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024 1

Currently, it is for Verification only.

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024 1

@shargon Do you think it's ok to remove PushOnly?

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024

I think we can remove PushOnly. Can you evaluate the security if we remove PushOnly and allow all the instructions in Neo.Core.Witness::InvocationScript? @shargon

from neo-vm.

shargon avatar shargon commented on June 12, 2024

I do not really like the idea of removing PushOnly because it could cause them to execute any code without the need for a smartContract. I think that you can not eliminate PushOnly, What benefits could it bring?

I Asked by RET to avoid fattening the script with unnecessary code type

PUSH ORIGINAL_PARAMETERS
RET
PUSHBYTES...
PUSHBYTES...
PUSHBYTES...
PUSHBYTES...
PUSHBYTES...

And the execution is still valid, but it would make the chain fatter

from neo-vm.

shargon avatar shargon commented on June 12, 2024

All these instructions are executed in a different ExecutionContext, so there is not possible to change storages of the contract. But it could be used to invoke TXs and these TXs could create a different StorageContext to save arbitrary data

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024

Contracts can't save any data if they are started with Verification trigger.

from neo-vm.

shargon avatar shargon commented on June 12, 2024

But this pushOnly flag is not only used under Verification, is used for arguments of invokes too, right?

from neo-vm.

shargon avatar shargon commented on June 12, 2024

Yes, it’s ok for me πŸ‘

from neo-vm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.