Commit graph

29 commits

Author SHA1 Message Date
Roman Khimov
43a59adbd0 rpc/server: move to services/rpcsrv
`server` is not a good package name and it's an internal service, so it can be
just about anywhere.
2022-07-21 22:14:12 +03:00
Roman Khimov
fab8dfb9f8 vm: move State type into a package of its own
It's used a lot in other places that need it, but don't need whole VM at the
same time.
2022-07-08 18:34:52 +03:00
Anna Shaleva
9862b40f2c rpc: support InitialGasDistribution response from old Neo-Go nodes
https://github.com/nspcc-dev/neo-go/pull/2435 breaks compatibility
between newer RPC clients and older RPC servers with the following
error:
```
failed to get network magic: json: cannot unmarshal string into Go struct field Protocol.protocol.initialgasdistribution of type int64
```

This behaviour is expected, but we can't allow this radical change.
Thus, the following solution is implemented:
1. RPC server responds with proper non-stringified
   InitialGasDistribution value. The value represents an integral
   of fixed8 multiplied by the decimals.
2. RPC client is able to distinguish older and newer responses. For
   older one the stringified value without decimals part is
   expected. For newer responses the int64 value with decimal part
   is expected.

The cludge will be present in the code for a while until nodes of
version <=0.98.3 become completely absolete.
2022-04-27 19:00:46 +03:00
Roman Khimov
a10b1ad32d rpc/server: make Server conform network.Service interface
With Start() and Shutdown() taking no parameters and returning no values.
2022-04-22 10:49:06 +03:00
Anna Shaleva
2096ad6e81 *: remove io/ioutil uses
Close #1764.
2022-03-17 19:39:18 +03:00
Anna Shaleva
3c75f047c1 cli: refactor nep11-related commands and add tests
Specify tokenID via hex-encoded string.
2022-02-09 11:47:27 +03:00
Anna Shaleva
9de9bcb17c cli: add tests for server commands
Fixes:
  * Proper exit code should be returned on exit for server-related
commands
2022-02-02 11:28:26 +03:00
Roman Khimov
bf1604454c blockchainer/network: move StateSync interface to the user
Only network package cares about it.
2022-01-14 19:57:14 +03:00
Roman Khimov
508d36f698 network: drop consensus dependency 2022-01-14 19:55:53 +03:00
Evgeniy Stratonikov
f83395e897 cli/test: move test wallet path to constant
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:05:32 +03:00
Evgeniy Stratonikov
7d2d9e96ef cli: add query tx command, fix #2069
Implement a way to check if tx has been persisted on blockchain and
to get general info about transaction. Much more convenient than
handwritten curl queries.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-20 18:03:50 +03:00
Anna Shaleva
6d59689d9c core: rename Neo.Crypto.CheckMultisig interop 2021-05-11 18:38:14 +03:00
Anna Shaleva
9015e50847 core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1
Rename it to Neo.Crypto.CheckMultisig and remove `message` parameter.
2021-03-10 21:46:05 +03:00
Anna Shaleva
6c0faa4ea3 rpc: provide cosigners accounts to CreateTxFromScript
We need to define network fee for each of cosigners, and the only way to
do it is to access the cosigner's script.
2021-03-04 10:37:35 +03:00
Anna Shaleva
2c81fc8b8e *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
Evgeniy Stratonikov
f6176b30f2 cli: support escape codes 2021-02-11 16:06:11 +03:00
Evgenii Stratonikov
43e4d3af88 oracle: integrate module in core and RPC
1. Initialization is performed via `Blockchain` methods.
2. Native Oracle contract updates list of oracle nodes
  and in-fly requests in `PostPersist`.
3. RPC uses Oracle module directly.
2021-01-28 13:00:58 +03:00
Evgenii Stratonikov
1fee268f95 cli/smartcontract: return error if deploy script failed to run 2020-12-10 14:41:02 +03:00
Evgenii Stratonikov
f4cbb1ae74 cli/test: clean input buffer after execution 2020-12-04 11:05:49 +03:00
Evgenii Stratonikov
bb316f4652 cli/test: trim newline char in checkNextLine 2020-12-04 11:04:02 +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
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
Evgenii Stratonikov
945e9410e4 cli: add test for testinvokefunction
Check that contract can be properly deployed
and invoked.
2020-10-06 19:12:38 +03:00
Roman Khimov
fdcc72dad0 cli/wallet: make 'addr' optional for NEP5 balances query
Iterate over all accounts by default.
2020-09-28 18:15:51 +03:00
Evgenii Stratonikov
583ef546f9 cli: add tests for wallet claim
Fix a NEO contract hash used in tx.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
6e5a637da9 cli: add tests for multisig sign
This test is also a good example of how to
create and sign multisig transaction from scratch.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
0a5fe84589 cli: add tests for wallet export 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
d30c7db49a cli: add tests for NEP5 transfer 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
468f7ee650 cli: add tests for NEP5 balance querying 2020-09-18 12:07:02 +03:00