Anna Shaleva
1782e16be4
rpc: improve RPC Client initialization
...
Thanks to #2463 .
2022-05-06 14:15:59 +03:00
Elizaveta Chichindaeva
28908aa3cf
[ #2442 ] English Check
...
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
AnnaShaleva
8991ee91cd
rpc: make RPC WSClient thread-safe
...
Add ability to use unique request IDs for RPC requests.
2022-02-24 19:01:12 +03:00
AnnaShaleva
0092330fe1
rpc: carefully review places where Client.cache.initDone is used
...
1. Keep initDone check only for the places where cache is directly accessed.
We don't need to check it in other places, otherwise we have a mess of
duplicating checks.
2. Fix bug in code related to block deserialisation. There's no magic, so
checking that initialisation is done is not enough for proper block
deserialisation. We need to manually fill StateRootEnabled field.
3. Since transaction doesn't need network magic to compute its hash, we don't
need to perform Client initialisation before transaction-related requests.
4. Check that cache is initialised before accessing network magic.
5. Refactor the way Policy contract hash is fetched for Client requests.
We don't really need Client initialisation for that, it's OK to fetch Policy
hash on-the-fly.
2022-02-22 12:52:14 +03:00
AnnaShaleva
7c1862a9ac
rpc: move all RPC client's cached fields to a separate cache structure
...
No functional changes.
2022-02-21 18:16:49 +03:00
Anna Shaleva
83b4c6734f
rpc: add support of getstateroot
to RPC client
2022-01-17 11:59:13 +03:00
Roman Khimov
f1145c8943
rpc/client: accept address as util.Uint160 in GetNEPXXTransfers
...
We're using proper util.Uint160 values everywhere in the client.
2021-11-19 12:58:46 +03:00
Roman Khimov
1375918b63
rpc: add client-side NEP-11 methods
2021-11-19 12:58:46 +03:00
Anna Shaleva
2e8bbf2a87
rpc: *In parameters marshalling optimisation
...
Parse request parameters on-demand.
2021-11-10 14:42:08 +03:00
Roman Khimov
2bec43511d
Merge pull request #2207 from nspcc-dev/rpc/gethistoricalstate
...
rpc: implement `getstate` and `findstates` RPC methods
2021-10-13 15:27:51 +03:00
Anna Shaleva
43ac4e1517
rpc: implement findstates
RPC handler
2021-10-13 11:41:05 +03:00
Anna Shaleva
6eb3cad6d5
rpc: use uint64 for timestamp boundaries in GetNEP17Transfers
...
Block's timestamp is in milliseconds, so it overflows uint32.
2021-10-11 17:34:05 +03:00
Anna Shaleva
01143da621
rpc: add getstate
RPC handler
2021-10-11 16:43:44 +03:00
Anna Shaleva
ed9cdfe667
rpc: use core Header for getblockheader
response
...
Nonce and Primary fields were missing from response.
2021-09-09 18:47:22 +03:00
Roman Khimov
7366d45985
rpc: add GetStateHeight to client
2021-07-22 21:13:44 +03:00
Roman Khimov
5bdcd4c241
client: add GetCandidateRegisterPrice method
...
It's important for clients.
2021-07-21 12:19:55 +03:00
Evgeniy Stratonikov
3a4e0caeb8
core/block: add Nonce
field to header
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-15 15:58:49 +03:00
Anna Shaleva
7180b2ce06
rpc: use non-native NNS instead of native NNS in testchain
2021-05-17 22:08:15 +03:00
Roman Khimov
e9cefc4bfc
*: fix all errcheck warnings in testing code
2021-05-12 21:45:12 +03:00
Anna Shaleva
366e79b9b8
core: rename Neo.Crypto.CheckSig interop
2021-05-11 18:37:55 +03:00
Evgeniy Stratonikov
bb039ef035
manifest: add features
field
2021-05-04 13:10:46 +03:00
Roman Khimov
438eb0c43a
rpc: rename magic to network in JSON
...
Follow neo-modules/neo-core changes. We don't rename structure fields though
to stay compatible with current code (and we do have netmode.Magic to justify
that also).
2021-04-28 23:41:31 +03:00
Roman Khimov
95c279325a
block: drop Network from the Header
...
It's not network-tied any more, network is only needed to
sign/verify. Unfortunately we still have to keep network in consensus data
structures because of dbft library interface.
2021-03-26 13:45:18 +03:00
Roman Khimov
d314f82db3
transaction: drop Network from Transaction
...
We only need it when signing/verifying.
2021-03-26 13:45:18 +03:00
Anna Shaleva
10fb86c0b2
rpc: add (*Client).GetDesignatedByRole method
2021-03-23 13:56:39 +03:00
Anna Shaleva
e5cdecfa9f
core: fix transaction hashes
2021-03-18 17:57:54 +03:00
Roman Khimov
7990fa1b61
client: add gasperblock getter
...
It's an important chain parameter.
2021-03-16 23:04:41 +03:00
Roman Khimov
87d4939093
client: add NNS price getter
2021-03-16 22:59:04 +03:00
Roman Khimov
f308a9995d
client: add GetOraclePrice for oracle price
2021-03-16 22:55:17 +03:00
Roman Khimov
42674e46ac
client: add GetStoragePrice for native policy contract
2021-03-16 22:50:14 +03:00
Roman Khimov
4462a6a6b7
change block/tx/extensible signing process, fix #1741
...
Sign [magic, hash], see neo-project/neo#2314 .
2021-03-12 11:27:50 +03:00
Anna Shaleva
cdaca7be3e
core: use Neo.Crypto.CheckSig for standard signature verification
2021-03-10 21:45:58 +03:00
Evgeniy Stratonikov
f83b376181
block: replace Base
with Header
2021-03-10 13:38:44 +03:00
Evgeniy Stratonikov
2f490a3403
block: remove ConsensusData
field
2021-03-10 13:38:44 +03:00
Evgeniy Stratonikov
ffd85dd51d
native/policy: remove MaxBlockSize and MaxBlockSystemFee
2021-03-04 16:59:19 +03:00
Evgeniy Stratonikov
7b8533b67c
native/policy: move MaxTransactionsPerBlock to config
2021-03-04 16:59:19 +03:00
Anna Shaleva
2c81fc8b8e
*: upgrade tests to use T.Cleanup()
2021-03-01 17:08:00 +03:00
Anna Shaleva
9d73802244
rpc: add getMaxNotValidBeforeDelta
method to RPC client
2021-02-11 17:11:36 +03:00
Evgeniy Stratonikov
e1d2a5b5b7
state: split ContractBase and UpdateCounter
...
Latter doesn't make sense for native contracts.
2021-02-11 12:24:09 +03:00
Evgeniy Stratonikov
18911caa3a
Revert "rpc: marshal GAS in getunclaimedgas
as decimal"
...
This reverts commit df801a8539
.
2021-02-09 11:37:25 +03:00
Evgeniy Stratonikov
b0fbd897ad
Revert "rpc: marshal fees and GAS as Fixed8 decimal"
...
This reverts commit a79b12b4d4
.
2021-02-09 11:16:52 +03:00
Roman Khimov
1f98289f5d
Merge pull request #1717 from nspcc-dev/rpc-base64
...
RPC base64 changes
2021-02-08 10:42:26 +03:00
Roman Khimov
e0c7a3b77c
rpc: add getblockheadercount call
...
See neo-project/neo-modules#504 .
2021-02-07 23:18:09 +03:00
Roman Khimov
272bb03e3b
rpc: use base64 for getstorage in/out
...
See neo-project/neo#484 .
2021-02-07 22:07:30 +03:00
Anna Shaleva
a2715404d0
core: serialise manifest as stackitem
2021-02-05 19:10:15 +03:00
Evgeniy Stratonikov
719dceff77
nef: merge Compiler and Version fields
2021-01-19 11:19:28 +03:00
Evgeniy Stratonikov
0bbdee2ce1
nef: add Reserved bytes
2021-01-19 11:19:28 +03:00
Evgeniy Stratonikov
52843fc1bf
nef: add Tokens field
2021-01-19 11:19:24 +03:00
Evgeniy Stratonikov
0b26b46234
state: store NEF instead of script for contract
...
NEFs for native contracts are set statically, thus
field values are taken from the reference implementation.
2021-01-13 15:34:10 +03:00
Roman Khimov
a8bb040558
*: fix ineffassign goreportcard warnings
2020-12-28 17:31:50 +03:00