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

Difference in mainnet's block 2152458 state changes with C# node #749

Closed
roman-khimov opened this issue Mar 12, 2020 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@roman-khimov
Copy link
Member

Ours:

 {
  "block": 2152458,
  "size": 0,
  "storage": []
 },

Theirs:

   {
      "size" : 2,
      "block" : 2152458,
      "storage" : [
         {
            "state" : "Added",
            "value" : "00010100",
            "key" : "f9e6e770af783d809bd1a65e1bb5b6042953bcac696e697469616c697a6564000000000005"
         },
         {
            "key" : "f9e6e770af783d809bd1a65e1bb5b6042953bcac62abb5609f76599f90bc11485a5eccb4001ce4694aec00000000000000000000000b",
            "state" : "Added",
            "value" : "0008008066d627ede60000"
         }
      ]
   },

There is just one invocation transaction there, so it's not hard to find the one behaving in a different way: https://neoscan.io/transaction/215d14129913b2356aacfe1154a5d4c9f74afb5f870634fffbcdd1290736aa43

Our application log:

{
   "jsonrpc" : "2.0",
   "result" : {
      "executions" : [
         {
            "stack" : [
               {
                  "value" : "",
                  "type" : "ByteArray"
               }
            ],
            "contract" : "0xa741e2b2ccbcec8a7ceafea750efb3e98660a566",
            "gas_consumed" : "0.03",
            "trigger" : "Application",
            "notifications" : [],
            "vmstate" : "HALT"
         }
      ],
      "txid" : "0x215d14129913b2356aacfe1154a5d4c9f74afb5f870634fffbcdd1290736aa43"
   },
   "id" : 1
}

C# application log:

{
   "jsonrpc" : "2.0",
   "id" : 1,
   "result" : {
      "executions" : [
         {
            "gas_consumed" : "2.443",
            "trigger" : "Application",
            "vmstate" : "HALT",
            "stack" : [
               {
                  "value" : "1",
                  "type" : "Integer"
               }
            ],
            "contract" : "0x66a56086e9b3ef50a7feea7c8aecbcccb2e241a7",
            "notifications" : []
         }
      ],
      "txid" : "0x215d14129913b2356aacfe1154a5d4c9f74afb5f870634fffbcdd1290736aa43"
   }
}

As can be noticed we don't get too far into the script.

@roman-khimov roman-khimov added the bug Something isn't working label Mar 12, 2020
@roman-khimov
Copy link
Member Author

Seems to be caused by #745, spent GAS value indicates that checks like this fail:

15       SYSCALL            "Neo.Runtime.GetTrigger"                              
39       NOP                                                                      
40       PUSHDATA1          00 ("\x00")                                           
43       EQUAL                                                                    
44       NOT                                                                      
45       JMPIF              86 (41/2900)                                          

So if should be fixed by #746.

roman-khimov added a commit that referenced this issue Mar 12, 2020
vm: implement EQUAL opcode properly

Fixes #745, #749.
@roman-khimov roman-khimov added this to the v0.74.0 milestone Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant