Evgenii Stratonikov
b97dfae8d8
native: replace NEP-5 with NEP-17
2020-11-24 13:08:23 +03:00
Evgenii Stratonikov
a5914f89fa
core: allow to provide block in GetTestVM()
...
Sometimes amount of GAS consumed depends on block height.
2020-11-24 12:17:29 +03:00
Evgenii Stratonikov
c849176be7
manifest: include contract Name
2020-11-24 11:23:44 +03:00
Evgenii Stratonikov
8e60a65b55
rpc: implement verifyproof RPC
...
Test getproof and verifyproof together.
2020-11-20 18:06:22 +03:00
Evgenii Stratonikov
e38e8aa48a
rpc: implement getproof RPC
2020-11-20 18:06:22 +03:00
Evgenii Stratonikov
6b42e9306a
rpc/server: implement getstateheight RPC
2020-11-20 18:06:21 +03:00
Evgenii Stratonikov
4de22247d5
rpc/server: implement getstateroot RPC
2020-11-20 17:16:33 +03:00
Evgenii Stratonikov
1869d6d460
core: allow to use state root in header
2020-11-20 17:16:32 +03:00
Anna Shaleva
8e29a200c0
rpc: adjust NEP5 transfers amount JSON marshalling
...
This committ fixes the difference between Go and C# nodes:
Go:
```
{
"jsonrpc" : "2.0",
"result" : {
"received" : [
{
"blockindex" : 65,
"txhash" : "0x394f851cf167d664c0dbcf98e2e64f2da23022fd7943dcb914492529de20a945",
"transfernotifyindex" : 0,
"timestamp" : 1605535020126,
"transferaddress" : "NUVPACMnKFhpuHjsRjhUvXz1XhqfGZYVtY",
"amount" : "29999999",
"assethash" : "0x668e0c1f9d7b70a99dd9e06eadd4c784d641afbc"
}
],
"address" : "NULwe3UAHckN2fzNdcVg31tDiaYtMDwANt",
"sent" : []
},
"id" : 1
}
```
C#:
```
{
"id" : 1,
"result" : {
"address" : "NULwe3UAHckN2fzNdcVg31tDiaYtMDwANt",
"sent" : [],
"received" : [
{
"transferaddress" : "NUVPACMnKFhpuHjsRjhUvXz1XhqfGZYVtY",
"timestamp" : 1605535020126,
"txhash" : "0x394f851cf167d664c0dbcf98e2e64f2da23022fd7943dcb914492529de20a945",
"blockindex" : 65,
"transfernotifyindex" : 0,
"amount" : "2999999900000000",
"assethash" : "0x668e0c1f9d7b70a99dd9e06eadd4c784d641afbc"
}
]
},
"jsonrpc" : "2.0"
}
```
2020-11-17 15:50:19 +03:00
Roman Khimov
88cee80a58
Merge pull request #1543 from nspcc-dev/compatibility-fixes
...
rpc, cli: tiny compatibility fixes
2020-11-16 15:53:42 +03:00
Anna Shaleva
083879838c
rpc: adjust getrawtransaction
and gettransactionheight
RPC call
...
We should return verbose transaction in case if it is in the mempool
from `getrawtransaction`. We also shouldn't return height from
`gettransactionheight` in case if transaction is in the mempool.
2020-11-16 13:25:42 +03:00
Roman Khimov
3cb945f022
manifest: simplify marshaling
2020-11-13 21:46:26 +03:00
Roman Khimov
286d9185f4
smartcontract: remove contract features
...
We're featureless now, all contracts have access to storage and payable status
is to be determined via new NEP. Follow neo-project/neo#2060 .
2020-11-13 21:26:23 +03:00
Anna Shaleva
31cf71fb62
rpc: use default Uint160 marshaller for result.NEP5Balance.Asset
...
To match C# behaviour we should marshal asset hash with `0x` prefix.
2020-11-13 12:28:31 +03:00
Roman Khimov
0f827ee6ba
Merge pull request #1531 from nspcc-dev/core/applicationlog_with_multiple_triggers
...
core, rpc: store multiple execution results for single hash
2020-11-12 19:05:22 +03:00
Anna Shaleva
d6992cb5c4
core: marshal block hash for AppExecResult [NotificationsSubsystem]
2020-11-12 17:43:20 +03:00
Anna Shaleva
0b15ca8bd0
rpc: add trigger parameter to getapplicationlog
2020-11-12 17:43:11 +03:00
Anna Shaleva
7ca93e76ac
core, rpc: allow to store several AppExecResult for a single hash
...
It is required for we have several executions per block.
2020-11-12 16:24:39 +03:00
Anna Shaleva
20f8fe5699
rpc: use base64 for submitblock
and sendrawtransaction
...
Changes ported from https://github.com/neo-project/neo-modules/pull/394 .
2020-11-12 15:21:35 +03:00
Evgenii Stratonikov
54992ad4f3
core: provide account in calculate claimable
...
`getunclaimedgas` RPC should return all GAS available to claim.
2020-11-10 16:08:21 +03:00
Evgenii Stratonikov
860c146260
native: increase committee GAS bounty
...
Follow neo-project/neo#2049 .
2020-11-10 15:30:31 +03:00
Roman Khimov
a9dddf893a
Merge pull request #1525 from nspcc-dev/rpc/base64
...
rpc: return bse64 bytes from `getblock`, `getblockheader`, `getrawtx`
2020-11-09 10:48:28 +03:00
Anna Shaleva
6bb81d9b51
rpc: return bse64 bytes from getblock
, getblockheader
, getrawtx
...
Close #1522
2020-11-09 10:29:33 +03:00
Anna Shaleva
6ee919747f
rpc: allow batch JSON-RPC requests
...
Close #1509
2020-11-06 17:06:20 +03:00
Anna Shaleva
b8a88f9378
rpc: allow to use address, id or name instead of scripthash [Client]
...
... for getcontractstate RPC client method.
2020-11-03 17:58:24 +03:00
Anna Shaleva
d3daaafbe4
rpc: allow to get contract scripthash from address, id or name [Server]
...
... for `invokefunction` RPC method.
2020-11-03 17:25:46 +03:00
Anna Shaleva
15a939b1da
rpc: allow to getcontractstate
by address, id or name
...
close #1423
2020-11-03 17:23:49 +03:00
Roman Khimov
eaa260474f
trigger/core: split System trigger into OnPerist and PostPersist
...
Follow neo-project/neo#2022 .
2020-10-29 19:17:07 +03:00
Roman Khimov
d4da811d12
Merge pull request #1507 from nspcc-dev/conflicts_attr
...
core: implement Conflicts transaction attribute
2020-10-29 16:54:58 +03:00
Anna Shaleva
ec63d5c456
core: add conflicts attribute
...
Close #1491
2020-10-29 10:57:31 +03:00
Anna Shaleva
0da01fde7f
core: refactor blocked accounts logic
2020-10-23 11:42:30 +03:00
Roman Khimov
8be7cd4bff
Merge pull request #1489 from nspcc-dev/rpc/invoke_with_base64
...
rpc, cli: use base64 script encoding for Invoke* calls; add Magic to `getversion` RPC call
2020-10-19 16:17:06 +03:00
Anna Shaleva
590be7a58d
rpc, cli: remove Network from RPC client and cli
2020-10-19 16:11:11 +03:00
Anna Shaleva
64d1946fbb
rpc: fix Matches and marshalling for notification events
...
Close #1494 . Marshalling went wrong due to the incorrect pointers usage.
Reproduced and fixed.
2020-10-19 13:44:20 +03:00
Anna Shaleva
474d2dfb65
rpc: add Magic to Version
2020-10-19 11:51:27 +03:00
Anna Shaleva
c50f3db6ad
rpc, cli: encode script in base64 for Invoke*
2020-10-19 11:51:27 +03:00
Anna Shaleva
ceb7ea9737
rpc: allow both base58 and hex for Uint160 RPC server parameters
...
`getunclaimedgas` RPC-call allows to use both base58 and hex
representations for uint160.
2020-10-17 00:42:45 +03:00
Anna Shaleva
19a2e3bb91
rpc: add transaction field to InvokeResult
2020-10-17 00:42:39 +03:00
Roman Khimov
6025c13a6d
Merge pull request #1471 from nspcc-dev/rpc-server-logging-improvement
...
server: don't always Sprintf params for logger
2020-10-08 16:45:30 +03:00
Roman Khimov
c8ba155d47
server: don't always Sprintf params for logger
...
Add Stringer to Params, if we're not printing Debug messages (which usually is
the case), it won't be called at all. Micro-optimization.
2020-10-08 16:37:28 +03:00
Roman Khimov
8c2fd91c5c
Merge pull request #1462 from nspcc-dev/rpc/exceptions
...
rpc, core: add FaultException to AppExecResult and Invoke* results
2020-10-08 16:20:38 +03:00
Anna Shaleva
9a493dd2a0
rpc: add FaultException to result.Invoke
...
Close #1440
2020-10-08 16:12:14 +03:00
Evgenii Stratonikov
9733a6f394
core: move CalculateNetworkFee
to a separate package
2020-10-07 10:04:19 +03:00
Evgenii Stratonikov
b2a3a0851e
emit: accept multiple opcodes in Opcode()
2020-10-06 18:03:25 +03:00
Anna Shaleva
d27775acc5
rpc: remove json names from result.Invoke struct
...
We use invokeAux to marshal result.Invoke to JSON.
2020-10-05 16:00:15 +03:00
Roman Khimov
0e5a2f34c0
Merge pull request #1449 from nspcc-dev/rpc/client/getcvalidators_fix
...
rpc: getvalidators -> getnextblockvalidators
2020-10-02 13:30:58 +03:00
Anna Shaleva
fa0bd9f46b
rpc: getvalidators -> getnextblockvalidators
...
We don't have `getvalidators` RPS call, there's only
`getnextblockvalidators` in the reference implementation.
2020-10-01 17:09:14 +03:00
Roman Khimov
991089593f
Merge pull request #1450 from nspcc-dev/fix/witnessscope
...
transaction: rename FeeOnly to None
2020-10-01 16:46:07 +03:00
Evgenii Stratonikov
fa09b9af7b
transaction: rename FeeOnly to None
...
Follow missed change from neo-project/neo#1816 .
`None` may be used for any signer. Currently it is used
for sender to only pay fees, or to sign tx attributes.
2020-10-01 15:28:19 +03:00
Anna Shaleva
43390fe91d
rpc: check VM state in (*Client).CreateTXFromScript
...
We should also pay attention to the VM state before adding system fee to
the transaction. We shouldn't allow to add system fee in case if
transaction script is bad.
2020-10-01 13:48:40 +03:00