Anna Shaleva
2d20b0fa23
core: remove nnsrecords package from native
...
Use nns from examples instead.
2021-05-17 22:24:56 +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
9d2712573f
*: enable godot linter and fix all its warnings
...
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
c4e084b0d8
*: fix whitespace errors
...
leading/trailing newlines
2021-05-12 22:51:41 +03:00
Roman Khimov
a44376903a
rpc: fix errcheck warnings in websocket code
2021-05-12 21:48:38 +03:00
Roman Khimov
e9cefc4bfc
*: fix all errcheck warnings in testing code
2021-05-12 21:45:12 +03:00
Roman Khimov
601841ef35
*: drop unused structure fields
...
Found by structcheck:
`good` is unused (structcheck)
and alike.
2021-05-12 19:41:23 +03:00
Roman Khimov
0178594850
*: simpilfy make() invocations
...
gosimple: S1019: should use make([]byte, 64) instead
2021-05-12 18:36:45 +03:00
Roman Khimov
8322607fd2
rpc/server: silence deadcode warning
2021-05-12 18:22:18 +03:00
Roman Khimov
cfc067dd24
*: remove dead code
...
Found by deadcode via golangci-lint.
2021-05-12 18:13:14 +03:00
Anna Shaleva
6d59689d9c
core: rename Neo.Crypto.CheckMultisig interop
2021-05-11 18:38:14 +03:00
Anna Shaleva
366e79b9b8
core: rename Neo.Crypto.CheckSig interop
2021-05-11 18:37:55 +03:00
Anna Shaleva
d0c64347ab
*: add data
to NEP11 Transfer
2021-05-05 19:44:29 +03:00
Anna Shaleva
9eeebf481c
rpc: allow to marshal Iterators for invoke* results
2021-04-30 16:23:06 +03:00
Anna Shaleva
40ae78cb88
wallet: add Standard
field to Token
...
We need to distinguish NEP11 and NEP17 tokens preesnted in the wallet.
2021-04-30 15:58:27 +03:00
Anna Shaleva
2fb083bd37
rpc: add NEP11TokenInfo method
2021-04-30 11:38:11 +03:00
Anna Shaleva
127d0ad2ba
rpc: allow to provide cosigners for NEP11-transfer-related commands
2021-04-23 10:45:11 +03:00
Anna Shaleva
49c35dec20
rpc: allow to provide cosigners for NEP17-transfer-related commands
2021-04-23 10:29:40 +03:00
Anna Shaleva
48ae1cc486
rpc: refactor SignAndPushInvocationTx
...
We have a set of accounts provided via `cosigners` argument, so we
should fill all transaction witnesses in (not only sender's witness).
If we can't properly construct witnesses for all of the signers then an
error should be returned.
2021-04-21 18:52:32 +03:00
Anna Shaleva
ae36523a61
rpc, internal: fix CodeQL int conversions warnings
...
```
Incorrect conversion of an integer with architecture-dependent bit
size from to a lower bit size type int32 without an upper bound
check.
```
2021-04-19 11:30:28 +03:00
Roman Khimov
13619a0e77
rpc/server: improve submitblock and submitnotaryrequest also
2021-04-10 22:47:24 +03:00
Roman Khimov
274f2c0408
rpc/server: be more specific in some sendrawtransaction error cases
...
Refs. #1894 .
2021-04-10 00:31:42 +03:00
Roman Khimov
973ed8c1f6
rpc/server: fix ineffassign warning
2021-04-08 15:52:57 +03:00
Anna Shaleva
1ba7338b07
rpc: fix mpt-related responses serialisation
...
MPT structures should be serialized in base64.
2021-04-01 10:17:03 +03:00
Roman Khimov
5b4f6d255f
Merge pull request #1857 from nspcc-dev/rpc/nep11
...
rpc: add NEP11 and NNS interfaces to RPC Client
2021-03-27 18:27:29 +03:00
Anna Shaleva
626ec8a82b
rpc: add resolve
and isAvailable
NNS API to RPC client
2021-03-26 20:48:07 +03:00
Anna Shaleva
f955589370
rpc: add NEP11 API support to the RPC client
2021-03-26 20:48:01 +03:00
Anna Shaleva
ad9ede455e
rpc: add NNS-connected transactions to the test chain
...
It is needed for RPC client integration tests.
2021-03-26 20:44:32 +03:00
Anna Shaleva
bcc5c055de
rpc: allow to calculatenetworkfee
for verify
with args
...
We can load invocation script for those contract-based witnesses which
requires arguments for `verify` methods.
2021-03-26 19:16:00 +03:00
Anna Shaleva
252e03bc34
rpc: add CalculateNetworkFee RPC method
2021-03-26 19:14:46 +03:00
Anna Shaleva
d2a81daf57
rpc: refactor TestCalculateNetworkFee
...
We need to ensure that we don't add extra network fee during
calculation.
2021-03-26 19:12:43 +03:00
Roman Khimov
6989769f2c
rpc/server: fix getversion reply for staterootinheader extension
...
Proper network should have it set to `true` and client should know about it.
2021-03-26 18:38:46 +03:00
Roman Khimov
c789431402
payload: drop Network from P2PNotaryRequest
...
It's not needed now.
2021-03-26 13:45:18 +03:00
Roman Khimov
8c110a6147
state: drop Network from MPTRoot structure
...
It's only needed to verify/sign.
2021-03-26 13:45:18 +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
Roman Khimov
0248e2c0d2
state: add network to MPTRoot, change hashing
...
Fix RC1 incompatibility.
2021-03-25 22:37:30 +03:00
Anna Shaleva
0a5072a1da
core: allow to compile test contracts with yaml config
...
And refactored Rubl test contract (it should support NEP-17 and
onNEP17Payment).
2021-03-22 15:32:26 +03:00
Anna Shaleva
e5cdecfa9f
core: fix transaction hashes
2021-03-18 17:57:54 +03:00
Roman Khimov
42465dd002
Merge pull request #1825 from nspcc-dev/fix-invokecontractverify
...
rpc: refactor invokecontractverify
2021-03-17 18:08:23 +03:00
Roman Khimov
a18fbc7bb1
Merge pull request #1827 from nspcc-dev/native/update_history
...
config: add NativeUpdateHistory
2021-03-16 12:47:22 +03:00
Anna Shaleva
9377751e65
config: add NativeUpdateHistory
2021-03-15 12:35:14 +03:00
Anna Shaleva
edfca68a17
rpc: refactor invokecontractverify
...
In `(c *Client) AddNetworkFee` we define network fee for contract
witness verification via `invokecontractverify` RPC call, and that's the
initial purpose of this RPC method. But it was not implemented
correctly. It used `System.Contract.Call` instead of beheiving like
`initVerificationVM`.
During real contract witness verification the whole contract's script is
loaded into VM, and then we jump to the `verify` method. Thus, to define
exact contract verification price, we should act like this (and not just
perform `System.Contract.Call` of `verify` method).
Tests are added.
This bug is the reason of adding extra GAS (c.notary.extraVerifyFee) to
pre-calculated value in
https://github.com/nspcc-dev/neofs-node/pull/404/files#diff-639db437ca2578db46c9e8cbf18f9aa01f8ca5aee30e0fa7e70ba0354822d7b3R237
2021-03-12 18:59:20 +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
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
cdaca7be3e
core: use Neo.Crypto.CheckSig for standard signature verification
2021-03-10 21:45:58 +03:00
Evgeniy Stratonikov
100f2db3fb
native: implement CryptoLib contract
2021-03-10 19:24:19 +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
Roman Khimov
e66d36900c
Merge pull request #1701 from nspcc-dev/statemsg
...
Update state-root handling
2021-03-09 15:16:44 +03:00