neoneo-go/pkg/core/native
Anna Shaleva 7fc57c9d58 core: allow transfer 0 GAS/NEO with zero balance
This commit fixes states diff at 131795 block of mainnet.

Transaction:
```
NEO-GO-VM > loadbase64 DAAQDBSPsxdYh6cITC3gUKI4oWmYxJs49gwUj7MXWIenCEwt4FCiOKFpmMSbOPYUwB8MCHRyYW5zZmVyDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtSOQwAEQwUj7MXWIenCEwt4FCiOKFpmMSbOPYMFL1Mb4Fqp6gHiEwzM6xSc8fLS+RpFMAfDAh0cmFuc2ZlcgwU9WPqQLwoPU0OBcSOowWz8qBzQO9BYn1bUjk=
READY: loaded 176 instructions
NEO-GO-VM 0 > ops
INDEX    OPCODE       PARAMETER
0        PUSHDATA1     ("")                                       <<
2        PUSH0
3        PUSHDATA1    8fb3175887a7084c2de050a238a16998c49b38f6
25       PUSHDATA1    8fb3175887a7084c2de050a238a16998c49b38f6
47       PUSH4
48       PACK
49       PUSH15
50       PUSHDATA1    7472616e73666572 ("transfer")
60       PUSHDATA1    f563ea40bc283d4d0e05c48ea305b3f2a07340ef    // NEO token
82       SYSCALL      System.Contract.Call (627d5b52)
87       ASSERT
88       PUSHDATA1     ("")
90       PUSH1
91       PUSHDATA1    8fb3175887a7084c2de050a238a16998c49b38f6
113      PUSHDATA1    bd4c6f816aa7a807884c3333ac5273c7cb4be469
135      PUSH4
136      PACK
137      PUSH15
138      PUSHDATA1    7472616e73666572 ("transfer")
148      PUSHDATA1    f563ea40bc283d4d0e05c48ea305b3f2a07340ef    // NEO token
170      SYSCALL      System.Contract.Call (627d5b52)
175      ASSERT

```

Go's applog:
```
{
   "id" : 1,
   "result" : {
      "txid" : "0x97d2ccb01467b22c73a2cb95f7af298f3a5bd8c849d7044371898b8efecdaabd",
      "executions" : [
         {
            "exception" : "at instruction 87 (ASSERT): ASSERT failed",
            "stack" : [],
            "gasconsumed" : "4988995",
            "notifications" : [],
            "trigger" : "Application",
            "vmstate" : "FAULT"
         }
      ]
   },
   "jsonrpc" : "2.0"
}
```

C#'s applog:
```
{
   "jsonrpc" : "2.0",
   "result" : {
      "executions" : [
         {
            "stack" : [],
            "notifications" : [
               {
                  "contract" : "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
                  "state" : {
                     "type" : "Array",
                     "value" : [
                        {
                           "type" : "ByteString",
                           "value" : "j7MXWIenCEwt4FCiOKFpmMSbOPY="
                        },
                        {
                           "type" : "ByteString",
                           "value" : "j7MXWIenCEwt4FCiOKFpmMSbOPY="
                        },
                        {
                           "value" : "0",
                           "type" : "Integer"
                        }
                     ]
                  },
                  "eventname" : "Transfer"
               },
               {
                  "contract" : "0xd2a4cff31913016155e38e474a2c06d08be276cf",
                  "state" : {
                     "value" : [
                        {
                           "type" : "Any"
                        },
                        {
                           "type" : "ByteString",
                           "value" : "vUxvgWqnqAeITDMzrFJzx8tL5Gk="
                        },
                        {
                           "value" : "2490",
                           "type" : "Integer"
                        }
                     ],
                     "type" : "Array"
                  },
                  "eventname" : "Transfer"
               },
               {
                  "contract" : "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
                  "state" : {
                     "value" : [
                        {
                           "value" : "vUxvgWqnqAeITDMzrFJzx8tL5Gk=",
                           "type" : "ByteString"
                        },
                        {
                           "value" : "j7MXWIenCEwt4FCiOKFpmMSbOPY=",
                           "type" : "ByteString"
                        },
                        {
                           "value" : "1",
                           "type" : "Integer"
                        }
                     ],
                     "type" : "Array"
                  },
                  "eventname" : "Transfer"
               }
            ],
            "vmstate" : "HALT",
            "gasconsumed" : "9977990",
            "trigger" : "Application",
            "exception" : null
         }
      ],
      "txid" : "0x97d2ccb01467b22c73a2cb95f7af298f3a5bd8c849d7044371898b8efecdaabd"
   },
   "id" : 1
}

```
2021-09-10 17:18:09 +03:00
..
nativenames core: remove native NNS 2021-05-17 22:22:07 +03:00
nativeprices core: move NotaryVerificationPrice to a separate package 2021-03-23 13:56:39 +03:00
noderoles core: move native node roles to a separate pkg 2021-03-23 13:56:34 +03:00
compatibility_test.go config: add InitialGASSupply, fix #2073 2021-07-20 16:59:54 +03:00
contract.go config: add InitialGASSupply, fix #2073 2021-07-20 16:59:54 +03:00
crypto.go native: implement CryptoLib contract 2021-03-10 19:24:19 +03:00
crypto_test.go core: use Neo.Crypto.CheckSig for standard signature verification 2021-03-10 21:45:58 +03:00
designate.go core: implement statesync module 2021-09-07 19:43:27 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
interop.go core: reuse PushItem for interops 2021-08-30 23:43:58 +03:00
ledger.go interop: use non-Cached wrapped DAO 2021-07-30 15:45:17 +03:00
management.go core: maintain a set of NEP17-compliant contracts 2021-07-28 13:22:53 +03:00
management_test.go core: remove conflicting transactions wrt MaxTraceableBlocks 2021-08-18 13:31:47 +03:00
native_gas.go state: optimize NEP17Balance serialization 2021-08-09 11:09:06 +03:00
native_neo.go native: optimize totalSupply operations during token burn/mint 2021-08-03 17:59:38 +03:00
native_neo_candidate.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00
native_neo_test.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00
native_nep17.go core: allow transfer 0 GAS/NEO with zero balance 2021-09-10 17:18:09 +03:00
nativenames_test.go config: add InitialGASSupply, fix #2073 2021-07-20 16:59:54 +03:00
neo_types.go native: reuse stackitem.(De)Serialize more for data structures 2021-07-19 15:42:42 +03:00
notary.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00
oracle.go slice: introduce common Copy helper 2021-07-19 22:57:55 +03:00
oracle_types.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00
oracle_types_test.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00
policy.go native/policy: disallow blocking native contracts 2021-09-03 11:11:06 +03:00
std.go native/std: restrict amount of items in JSON deserialization 2021-08-02 18:57:47 +03:00
std_test.go native: reuse stackitem.(De)Serialize more for data structures 2021-07-19 15:42:42 +03:00
util.go stackitem: introduce Convertible interface 2021-07-19 15:42:42 +03:00