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
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
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
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
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
Anna Shaleva
c50f3db6ad
rpc, cli: encode script in base64 for Invoke*
2020-10-19 11:51:27 +03:00
Evgenii Stratonikov
9733a6f394
core: move CalculateNetworkFee
to a separate package
2020-10-07 10:04:19 +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
Anna Shaleva
e34e367a7b
core: take into account size fee during verifyTxWitnesses
...
GasLimit for transaction scripts verification should not include fee for
transaction size.
2020-09-30 21:40:04 +03:00
Evgenii Stratonikov
c5cdaae87a
native: support postPersist
method
...
It should be called for NEO contract to distribute
committee bounties.
2020-09-23 14:47:09 +03:00
Evgenii Stratonikov
43b3e15330
native: send GAS to a committee member on persist
2020-09-23 14:42:12 +03:00
Evgenii Stratonikov
7d90d79ae6
core: update claimable GAS calculation
2020-09-23 14:12:42 +03:00
Roman Khimov
6b7ca0ce3f
rpc/server: limit the maximum number of elements for get*transfers
2020-09-22 16:45:01 +03:00
Roman Khimov
970de84130
rpc: add paging to getnep5transfers call
...
And add some tests.
2020-09-22 16:40:29 +03:00
Anna Shaleva
770c8d774c
core, rpc: add GetCommittee method
...
Closes #1414
2020-09-21 15:56:25 +03:00
Roman Khimov
93be4bbeee
rpc/server: fix "websocket: bad handshake" during testing
...
I think it's caused by connection limits server-side, we never close
connection on the client.
2020-09-16 12:51:59 +03:00
Roman Khimov
19c69618c5
transaction: cache tx size, don't serialize it over and over again
2020-09-11 18:55:19 +03:00
Anna Shaleva
acacac1b24
rpc: use state.AppExecResult for ApplicationLog marshalling
...
Closes #1371
2020-09-07 13:38:32 +03:00
Evgenii Stratonikov
9c7168e4e8
rpc/client: allow to use contract accounts in AddNetworkFee
2020-08-27 11:32:55 +03:00
Roman Khimov
7fedb4f4ba
testchain: move newBlock there from rpc/server
...
Allow its reuse by other components.
2020-08-20 18:50:36 +03:00
Roman Khimov
d0c29f52c9
core: verification script must return exactly one value
...
C# node is quite picky as it expects there to be exactly one value returned,
but our testchain actually adds 4 signatures for multisig cases instead of 3
which makes it technically incompatible with C# node.
2020-08-17 22:02:15 +03:00
Roman Khimov
c16040aecc
native: sort GetValidators result
...
As it's returned sorted now. Fixes state change mismatch for
NextValidators. It also partially reverts
2f8e7e4d33
and significantly changes the test
chain as the fees are no longer being sent to the same account.
2020-08-10 19:49:09 +03:00
Roman Khimov
fb97ea9458
native: don't register standby validators on initialization
...
C# doesn't do that since neo-project/neo#1762 .
2020-08-10 17:51:46 +03:00
Evgenii Stratonikov
412fc53cdd
rpc: provide timestamps in getnep5transfers
...
Set default value for the first timestamp to a week ago.
2020-08-07 18:42:34 +03:00
Evgenii Stratonikov
9bc731b3b1
native: implement delegated voting
...
Close #867 .
2020-08-06 20:39:13 +03:00
Anna Shaleva
90825efa16
core: move transaction's sender to cosigners
...
Closes #1184
Ported changes from https://github.com/neo-project/neo/pull/1752
2020-08-04 17:33:50 +03:00
Evgenii Stratonikov
9cba25616d
rpc: use raw stack items in invoke*
RPC
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 16:07:16 +03:00
Anna Shaleva
4bf88ba6b0
core: decouple native contracts from interop service
...
Closes #1191 .
2020-07-29 10:33:18 +03:00
Evgenii Stratonikov
84c148575d
rpc: remove Main func from test contract
2020-07-27 13:00:35 +03:00
Evgenii Stratonikov
d2ddf7b7cb
*: support invoking methods by offset
...
Allow to invoke methods by offset:
1. Every invoked contract must have manifest.
2. Check arguments count on invocation.
3. Change AppCall to a regular syscall.
4. Add test suite for `System.Contract.Call`.
2020-07-27 13:00:35 +03:00
Roman Khimov
c4cde44543
Merge pull request #1216 from nspcc-dev/neo3/rpc/sendrawtransaction
...
rpc: adjust `sendrawtransaction` and `submitblock` RPC calls
2020-07-22 22:13:21 +03:00
Anna Shaleva
889a5d7eb6
rpc: adjust submitblock
RPC-call
...
It should return block hash instead of boolean.
2020-07-22 08:37:53 +03:00
Anna Shaleva
c2534b1a0b
rpc: adjust sendrawtransaction
RPC-call
...
It should return tx has instead of boolean.
2020-07-22 08:37:46 +03:00
Evgenii Stratonikov
3d7fa9de93
*: make Notify interop accept event name
2020-07-20 13:33:32 +03:00
Evgenii Stratonikov
a6fc5cfdf1
rpc: support raw address in getnep5transfers RPC
2020-07-17 18:51:13 +03:00
Evgenii Stratonikov
c4c2ce1465
rpc: support stringified address in getnep5balances RPC
2020-07-17 18:51:13 +03:00
Roman Khimov
f46ed798f0
Merge pull request #1169 from nspcc-dev/neo3/rpc/fields_names_adjustment
...
rpc: adjust RPC calls JSON fields
2020-07-15 18:24:54 +03:00
Anna Shaleva
2ab23dc56a
rpc: adjust getunclaimedgas
RPC-call
...
Part of #1130
2020-07-15 14:45:51 +03:00
Anna Shaleva
17233e1d8e
core: rename Neo.Crypto.Verify to Neo.Crypto.VerifyWithECDsaSecp256r1
...
Part of #918
2020-07-14 16:19:12 +03:00
Roman Khimov
db027ad9c5
vm: zero GAS means no GAS, use fee data to properly limit execution
...
We were accepting transactions with zero system fee, but we shouldn't do
that. Also, transaction's verification execution has to be limited by network
fee.
2020-07-14 08:37:29 +03:00
Anna Shaleva
abe3c94b95
core: use big.Int to store NEP5 balances
...
closes #1133
2020-07-09 13:26:39 +03:00
Anna Shaleva
73b630db9b
*: switch from fixed8 to int64
...
Follow C# implementation, we have to marshall JSON Fixed8 fields without
taking into account decimals.
2020-06-29 21:39:27 +03:00
Roman Khimov
d81d826bfc
core: fix Storage.Get to return Null when there is no value
...
Match C# implementation and fix state inconsistency at block 249920 of
preview2 testnet. Make our Go Storage.Get return nil and adapt
examples/tests.
2020-06-24 10:43:58 +03:00
Roman Khimov
e5f05790d5
core: cache standby validators in the Blockchain
...
They never change, so it makes no sense parsing the keys over and over
again. It also simplifies the interface a little.
2020-06-24 10:22:17 +03:00