GithubHelp home page GithubHelp logo

testInvoke error debugging about neo-boa HOT 7 CLOSED

cityofzion avatar cityofzion commented on July 18, 2024
testInvoke error debugging

from neo-boa.

Comments (7)

hi0001234d avatar hi0001234d commented on July 18, 2024

Here is another snap from old version neo-python client, if it helps

image

from neo-boa.

localhuman avatar localhuman commented on July 18, 2024

I don't think config sc-debug-notify is what you want. Try
config sc-events on for reading smart contract events in the output stream. Use
config vm-log on to log every VM op to a file ( usually vm-instructions.log or something like that in the root of the project.)

Also, you can't concat string with +. use the concat method from boa.builtins

from neo-boa.

hi0001234d avatar hi0001234d commented on July 18, 2024

Okay, thanks for the instructions.

Yeah I'm not using + for string concat but not sure from where that error comes up, that's what I'm trying to figure out.

I'd tried what you said but still failed to get enough information about error to find the cause of issue. This is what error says

neo> testinvoke 0x16f59140b09a3ef087c01386cfb5ce27af45edfb register [b'23ba2703c53263e8d6e522dc32203339dcd8eee9',"superbowl event description",1525460109.498
785,1525990109.498785,1525160109.498785,1527460109.498785,b'584660c663f114d803928b77cb9abdd585a0fc17',b'cd26466c75c042a79d16983631b5364581cc8bec'] [] ['choic
e 1','choice 2']
[I 180507 03:34:57 EventHub:71] [test_mode][SmartContract.Execution.Fail] [16f59140b09a3ef087c01386cfb5ce27af45edfb] [None, 6]
Error testing contract invoke
neo>

here is snap also
image

from neo-boa.

hi0001234d avatar hi0001234d commented on July 18, 2024

Sorry to bother you, I forgot to check log file now I checked vm_instructions.log file and I got some info but they are assembly like codes and not sure how to trace them back to my contract script.

Can you please give me idea how can I trace them back, is it possible?

see below

2018-05-07 03:34:57.425007
1 PUSHBYTES8
2 PUSHBYTES8
3 PUSH2
4 PACK
5 PUSH0
6 PACK
7 PUSHBYTES20
8 PUSHBYTES20
9 PUSHBYTES4
10 PUSHBYTES4
11 PUSHBYTES4
12 PUSHBYTES4
13 PUSHBYTES27
14 PUSHBYTES20
15 PUSH8
16 PACK
17 PUSHBYTES8
18 APPCALL
19 PUSHBYTES1
20 NEWARRAY
21 TOALTSTACK
22 DUPFROMALTSTACK
23 PUSH0
24 PUSH2
25 ROLL
26 SETITEM
27 DUPFROMALTSTACK
28 PUSH1
29 PUSH2
30 ROLL
31 SETITEM
32 DUPFROMALTSTACK
33 PUSH2
34 PUSH2
35 ROLL
36 SETITEM
37 DUPFROMALTSTACK
38 PUSH3
39 PUSH2
40 ROLL
41 SETITEM
42 SYSCALL
Neo.Runtime.GetTrigger
43 NOP
44 DUPFROMALTSTACK
45 PUSH4
46 PUSH2
47 ROLL
48 SETITEM
49 DUPFROMALTSTACK
50 PUSH4
51 PICKITEM
52 PUSHBYTES1
53 NUMEQUAL
54 JMPIFNOT
55 DUPFROMALTSTACK
56 PUSH0
57 PICKITEM
58 PUSH0
59 NUMNOTEQUAL
60 JMPIFNOT
61 DUPFROMALTSTACK
62 PUSH0
63 PICKITEM
64 PUSHBYTES8
65 NUMEQUAL
66 JMPIFNOT
67 DUPFROMALTSTACK
68 PUSH1
69 PICKITEM
70 DUPFROMALTSTACK
71 PUSH2
72 PICKITEM
73 DUPFROMALTSTACK
74 PUSH3
75 PICKITEM
76 PUSH2
77 XSWAP
78 CALL
79 PUSHBYTES1
80 NEWARRAY
81 TOALTSTACK
82 DUPFROMALTSTACK
83 PUSH0
84 PUSH2
85 ROLL
86 SETITEM
87 DUPFROMALTSTACK
88 PUSH1
89 PUSH2
90 ROLL
91 SETITEM
92 DUPFROMALTSTACK
93 PUSH2
94 PUSH2
95 ROLL
96 SETITEM
97 DUPFROMALTSTACK
98 PUSH0
99 PICKITEM
100 ARRAYSIZE
101 PUSH8
102 NUMNOTEQUAL
103 JMPIFNOT
104 NOP
105 PUSHBYTES5
106 DUPFROMALTSTACK
107 PUSH0
108 PICKITEM
109 PUSH1
110 PICKITEM
111 SWAP
112 HASKEY

from neo-boa.

hi0001234d avatar hi0001234d commented on July 18, 2024

Your older issue here #53 talks about this, but that I think is for debugging while building contracts if I understood the code correctly here

def export_debug(self, output_path):
.

from neo-boa.

hi0001234d avatar hi0001234d commented on July 18, 2024

Now I can see more details and have access to debug.json file when I'd tried to build similar contract again. In debug.json there is no error I think its obvious because contract built successfully and had created avm file but test invoke failed and thrown a little more informative error

here is the error, let me know if you can tell what could be causing this

neo> build /var/lib/docker/overlay2/fa12c77f25edc3a8911d4be976d4efd3c7fad263d1afbe73ef0bf49bcbbbc7b9/merged/home/middleware/examples/prediction/sc/event_v1.p
y test '' 07101010 05 True True [] [] []
[I 180507 12:48:18 BuildNRun:49] Saved output to /var/lib/docker/overlay2/fa12c77f25edc3a8911d4be976d4efd3c7fad263d1afbe73ef0bf49bcbbbc7b9/merged/home/middleware/examples/prediction/sc/event_v1.avm
error executing invoke contract...
[E 180507 12:48:18 BuildNRun:84] Could not convert result to ContractParameter: 269488135 is not a valid ContractParameterType
Test invoke failed
tx is, results are None []

from neo-boa.

hi0001234d avatar hi0001234d commented on July 18, 2024

Closing it, finally found the issue was with one of the string operation which was not + (concat) though but something else.

from neo-boa.

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.