neo-go/pkg/core
Ekaterina Pavlova 02727b14b7 vm: fix unclaimedGas calculation
Fix difference with C#:
```
(base) ekaterinapavlova@MacBook-Air-4 neo-go % curl -X POST
http://seed1t5.neo.org:20332 -H 'Content-Type: application/json' -d '{
  "jsonrpc": "2.0",
  "method": "getapplicationlog",
  "params":
  ["61681ce24dffea5481e9a50b10159b43b7ebfc21967b0b06fee7ff69c7123e3f"],
  "id": 1
}' | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
  Current
                                 Dload  Upload   Total   Spent    Left
                                 Speed
100   429    0   269  100   160    582    346 --:--:-- --:--:-- --:--:--
   930
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "executions" : [
         {
            "exception" : null,
            "gasconsumed" : "198754",
            "notifications" : [],
            "stack" : [
               {
                  "type" : "Integer",
                  "value" : "0"
               }
            ],
            "trigger" : "Application",
            "vmstate" : "HALT"
         }
      ],
      "txid" :
      "0x61681ce24dffea5481e9a50b10159b43b7ebfc21967b0b06fee7ff69c7123e3
      f"
   }
}
```
(base) ekaterinapavlova@MacBook-Air-4 neo-go % curl -X POST  https://rpc
.t5.n3.nspcc.ru:20331 -H 'Content-Type: application/json' -d '{
  "jsonrpc": "2.0",
  "method": "getapplicationlog",
  "params":
  ["61681ce24dffea5481e9a50b10159b43b7ebfc21967b0b06fee7ff69c7123e3f"],
  "id": 1
}' | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
  Current
                                 Dload  Upload   Total   Spent    Left
                                 Speed
100   583  100   423  100   160   1424    538 --:--:-- --:--:-- --:--:--
  1969
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "executions" : [
         {
            "exception" : "at instruction 120 (SYSCALL): can't calculate
             bonus of height unequal (BlockHeight + 1)",
            "gasconsumed" : "198754",
            "notifications" : [],
            "stack" : [
               {
                  "type" : "Integer",
                  "value" : "4704605"
               },
               {
                  "type" : "ByteString",
                  "value" : "KfYYlDe/fxqqqm1yr7o5XLnQ7uk="
               }
            ],
            "trigger" : "Application",
            "vmstate" : "FAULT"
         }
      ],
      "txid" :
      "0x61681ce24dffea5481e9a50b10159b43b7ebfc21967b0b06fee7ff69c7123e3
      f"
   }
}

```
```
(base) ekaterinapavlova@MacBook-Air-4 neo-go % ./bin/neo-go contract
invokefunction -r https://rpc.t5.n3.nspcc.ru:20331 -w ./testnet_wallet
.json 1e6f88377a6c6bc4f683a5fc61eed5645ec5f123 unclaimedGas
e9eed0b95c39baaf726daaaa1a7fbf379418f629 4704605
Enter account NWtk9HYWsf1njtSzA3XNgwZXRtriACcJ9G password >
Warning: FAULT VM state returned from the RPC node: at instruction 120
(SYSCALL): can't calculate bonus of height unequal (BlockHeight + 1).
Use --force flag to send the transaction anyway.
```

Close #3589

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-10-04 16:55:12 +03:00
..
block *: improve for loop syntax 2024-08-30 21:45:18 +03:00
chaindump chaindump: microoptimize memory management 2024-07-16 15:03:17 +03:00
dao *: improve for loop syntax 2024-08-30 21:45:18 +03:00
fee *: improve for loop syntax 2024-08-30 21:45:18 +03:00
interop vm: drop *vm.VM parameter of CheckMultisigPar() 2024-08-30 21:48:27 +03:00
mempool *: improve for loop syntax 2024-08-30 21:45:18 +03:00
mempoolevent *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
mpt mpt: refactor lcp to be possible to use range 2024-09-04 14:15:44 +03:00
native vm: fix unclaimedGas calculation 2024-10-04 16:55:12 +03:00
state *: improve for loop syntax 2024-08-30 21:45:18 +03:00
stateroot *: fix linter issues 2024-08-14 12:36:15 +03:00
statesync *: improve for loop syntax 2024-08-30 21:45:18 +03:00
storage *: improve for loop syntax 2024-08-30 21:45:18 +03:00
test_data core: refactor helper test contracts generation 2022-03-30 11:46:29 +03:00
transaction *: improve for loop syntax 2024-08-30 21:45:18 +03:00
basic_chain_test.go config: add a special Blockchain type to configure Blockchain 2022-12-07 17:35:53 +03:00
bench_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
blockchain.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
blockchain_core_test.go .golangci.yml: add intrange linter 2024-09-04 14:15:32 +03:00
blockchain_neotest_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
doc.go *: apply go 1.19 formatter heuristics 2022-08-09 15:37:52 +03:00
headerhashes.go *: drop open-coded slice reversing 2024-08-24 22:41:48 +03:00
helper_test.go *: improve for loop syntax 2024-08-30 21:45:18 +03:00
interops.go core: add System.Runtime.CurrentSigners syscall 2023-11-20 14:46:27 +03:00
native_designate_test.go *: introduce Genesis protocol configuration 2023-10-19 18:30:20 +03:00
prometheus.go core: distinguish notarypool/mempool metrics 2023-04-13 18:40:19 +03:00
util.go *: drop open-coded slice reversing 2024-08-24 22:41:48 +03:00
util_test.go *: add GenesisTransaction extension to the protocol configuration 2023-10-19 18:33:50 +03:00