Git Product home page Git Product logo

Comments (9)

roman-khimov avatar roman-khimov commented on July 1, 2024 1

IIUC this never happens for real (deserialized) transactions, so not that big of an issue:

AllowedContracts = Scopes.HasFlag(WitnessScope.CustomContracts)
? reader.ReadSerializableArray<UInt160>(MaxSubitems)
: Array.Empty<UInt160>();
AllowedGroups = Scopes.HasFlag(WitnessScope.CustomGroups)
? reader.ReadSerializableArray<ECPoint>(MaxSubitems)
: Array.Empty<ECPoint>();
Rules = Scopes.HasFlag(WitnessScope.WitnessRules)
? reader.ReadSerializableArray<WitnessRule>(MaxSubitems)
: Array.Empty<WitnessRule>();

But maybe worth fixing for tests.

from neo.

vncoelho avatar vncoelho commented on July 1, 2024

@cschuchardt88, congratulations for the recent finding and dedication to the project.

I saw your comment but later you deleted it. It was about a dynamic script.
Were you able to verify something related to that?

from neo.

cschuchardt88 avatar cschuchardt88 commented on July 1, 2024

No, all the information is in the 1st comment. It just crashes the vm.

from neo.

shargon avatar shargon commented on July 1, 2024

It will be solved changing neo to nullable

from neo.

cschuchardt88 avatar cschuchardt88 commented on July 1, 2024

What is the problem is. If you call syscall CurrentSigners. It fails in dynamic scripts. Because the transaction isn't being deserialized soon enough even though you are passing in a transaction.

from neo.

cschuchardt88 avatar cschuchardt88 commented on July 1, 2024

@shargon @Jim8y

This needs to be fixed take for example:

neo> invoke 0x598afeea6a97e87f69d10d55047f459cf6917656 test
Invoking script with: 'wh8MBWRyYWluDBRWdpH2nEV/BFUN0Wl/6Jdq6v6KWUFifVtS'
VM State: FAULT
Gas Consumed: 0.0098655
Result Stack: []
Error: Value cannot be null. (Parameter 'source')
[DisplayName(nameof(TestContract))]
[ContractPermission("*", "*")]
public class TestContract : SmartContract
{
    [Syscall("System.Runtime.CurrentSigners")]
    public static extern Signer[] GetSigners();


    public static void Test()
    {
        try
        {
            var signers = GetSigners();
        }
        catch
        {
        }
    }
}

from neo.

vncoelho avatar vncoelho commented on July 1, 2024

@shargon @Jim8y

This needs to be fixed take for example:

neo> invoke 0x598afeea6a97e87f69d10d55047f459cf6917656 test
Invoking script with: 'wh8MBWRyYWluDBRWdpH2nEV/BFUN0Wl/6Jdq6v6KWUFifVtS'
VM State: FAULT
Gas Consumed: 0.0098655
Result Stack: []
Error: Value cannot be null. (Parameter 'source')
[DisplayName(nameof(TestContract))]
[ContractPermission("*", "*")]
public class TestContract : SmartContract
{
    [Syscall("System.Runtime.CurrentSigners")]
    public static extern Signer[] GetSigners();


    public static void Test()
    {
        try
        {
            var signers = GetSigners();
        }
        catch
        {
        }
    }
}

If this tx @cschuchardt88 is failing, perhaps it need a HF.

from neo.

cschuchardt88 avatar cschuchardt88 commented on July 1, 2024

@vncoelho

No its just the Transaction isn't getting passed as a parameter to the ApplicationEngine only the script is or Signers are null; for invoking contract methods in the CLI.

from neo.

vncoelho avatar vncoelho commented on July 1, 2024

@vncoelho

No its just the Transaction isn't getting passed as a parameter to the ApplicationEngine only the script is or Signers are null; for invoking contract methods in the CLI.

I see, I will reproduce here.

from neo.

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.