Roman Khimov
4e864ca7fb
Merge pull request #2331 from nspcc-dev/extend-invokefunction-results
...
Extend invokefunction results
2022-01-19 18:25:41 +03:00
Roman Khimov
c9ccc9b575
Merge pull request #2332 from nspcc-dev/native/fix-notary
...
core: adjust native Notary `withdraw` call flags
2022-01-19 18:25:23 +03:00
Anna Shaleva
cc60bca491
core: adjust native Notary withdraw
call flags
...
It changes states and calls `transfer` method of GAS which emits `transfer`
notification, so it requires States | AllowCall | AllowNotify, i.e. the
widest permission.
See
https://github.com/nspcc-dev/neo-go/issues/1990#issuecomment-1014911528 .
2022-01-19 11:33:33 +03:00
Roman Khimov
2e452df13a
rpc/storage: add storage changes to invoke* diagnostics
2022-01-19 00:02:19 +03:00
Roman Khimov
d79d8324e0
rpc: add notifications into the invoke* result
2022-01-18 22:35:44 +03:00
Roman Khimov
0afe8826ba
Merge pull request #2328 from nspcc-dev/rpc/getstateroot-client
...
rpc: add `getstateroot` to RPC client
2022-01-18 18:13:27 +03:00
Roman Khimov
01e9af6a30
Merge pull request #2329 from nspcc-dev/dont-request-queued-blocks
...
Don't request queued blocks again
2022-01-18 18:12:51 +03:00
Anna Shaleva
b98fab6b38
rpc: refactor findstates
client wrapper
...
1. Use empty `prefix` instead of nil `preifx` in order to avoid RPC server
exceptions.
2. Allow to omit `start` parameter` if `maxCount` is not specified.
3. Use empty `start` instead of nil `start` to avoid RPC server
exceptions.
2022-01-18 14:56:17 +03:00
Roman Khimov
89d754da6f
network: don't request blocks we already have in the queue
...
Fixes #2258 .
2022-01-18 00:04:41 +03:00
Roman Khimov
03fd91e857
network: use assert.Eventually in bq test
...
Simpler and more efficient (polls more often and completes the test sooner).
2022-01-18 00:04:29 +03:00
Roman Khimov
d52a06a82d
network: move index-position relation into helper
...
Just to make things more clear, no functional changes.
2022-01-18 00:02:16 +03:00
Roman Khimov
a23943c161
Merge pull request #2327 from nspcc-dev/change-wallet-acc-password
...
cli/wallet: add change-password command, fix #2233
2022-01-17 18:03:51 +03:00
Roman Khimov
62b0fceec2
cli/wallet: add change-password command, fix #2233
2022-01-17 16:41:45 +03:00
Anna Shaleva
e3c0a1635f
rpc: improve findstates
errors reporting
2022-01-17 12:24:59 +03:00
Anna Shaleva
edcb6e2eee
rpc: fix parameters construction error for findstates
client wrapper
2022-01-17 12:24:39 +03:00
Anna Shaleva
4c469e6f49
rpc: update docs of RPC client
2022-01-17 12:00:56 +03:00
Anna Shaleva
83b4c6734f
rpc: add support of getstateroot
to RPC client
2022-01-17 11:59:13 +03:00
Roman Khimov
4cc5957c3a
Merge pull request #2326 from nspcc-dev/doc-go-mod-compiler-requirement
...
docs: mention go modules, fix #2274
2022-01-16 21:45:10 +03:00
Roman Khimov
3cc5c2d9dc
docs: mention go modules, fix #2274
2022-01-14 23:33:01 +03:00
Roman Khimov
9c8ba5777e
Merge pull request #2323 from nspcc-dev/drop-blockchainer
...
Reduce blockchainer.Blockchainer use
2022-01-14 20:47:26 +03:00
Roman Khimov
cc9e64ce61
Merge pull request #2325 from nspcc-dev/lock-on-statejump
...
core: lock block addition on state jump
2022-01-14 20:45:54 +03:00
Roman Khimov
294a70646e
core: lock block addition on state jump
...
It should be performed before we're able to process blocks or before we
shutdown (which uses addition lock), fix
panic: assignment to entry in nil map
goroutine 5755 [running]:
github.com/nspcc-dev/neo-go/pkg/core/storage.(*MemoryStore).drop(...)
/home/rik/dev/neo-go/pkg/core/storage/memory_store.go:74
github.com/nspcc-dev/neo-go/pkg/core/storage.(*MemoryStore).PutChangeSet(0xc00093e700, 0xc0002051a0, 0xc000205200, 0x1, 0x1)
/home/rik/dev/neo-go/pkg/core/storage/memory_store.go:100 +0x25c
github.com/nspcc-dev/neo-go/pkg/core/storage.(*MemoryStore).PutBatch(...)
/home/rik/dev/neo-go/pkg/core/storage/memory_store.go:90
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).removeOldStorageItems(0xc000206a00)
/home/rik/dev/neo-go/pkg/core/blockchain.go:495 +0x33a
created by github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).jumpToStateInternal
/home/rik/dev/neo-go/pkg/core/blockchain.go:553 +0x68a
FAIL github.com/nspcc-dev/neo-go/pkg/core 52.084s
2022-01-14 20:25:39 +03:00
Roman Khimov
0b0531d723
Merge pull request #2299 from nspcc-dev/tests-migration
...
core: migrate native contract API tests to neotest framework
2022-01-14 20:10:17 +03:00
Roman Khimov
bc6d6e58bc
network: always pass transactions to consensus process
...
Consensus can require conflicting transactions and it can require more
transactions than mempool can fit, all of this should work. Transactions will
be checked anyway using its secondary mempool. See the scenario from #668 .
2022-01-14 20:08:40 +03:00
Roman Khimov
746644a4eb
network: decouple it from blockchainer.Blockchainer
...
We don't need all of it.
2022-01-14 19:57:16 +03:00
Roman Khimov
ddb23ccf78
core: shrink blockchainer.StateRoot further, leave simple RO methods
2022-01-14 19:57:16 +03:00
Roman Khimov
077d5ccb03
core: drop dangerous methods from blockchainer.StateRoot
...
CleanStorage and UpdateStateValidators should only be availabe to appropriate
core modules.
2022-01-14 19:57:16 +03:00
Roman Khimov
380e706255
core/state*: drop blockchainer.Blockchainer use
2022-01-14 19:57:16 +03:00
Roman Khimov
44fd7af044
rpc/result: drop unnecessary blockchainer dependency
2022-01-14 19:57:16 +03:00
Roman Khimov
59b2696849
services/consensus: drop blockchainer.Blockchainer use
...
Simplify testing, avoid monstrous Blockchainer interface.
2022-01-14 19:57:16 +03:00
Roman Khimov
fc45d3b132
blockchain: properly set invocation counter for verification ctx
...
Fix problem noted in #2270 .
2022-01-14 19:57:16 +03:00
Roman Khimov
9f9bd7261c
core: return *interop.Context from GetTestVM
...
Return everything needed, fix #2273 .
2022-01-14 19:57:16 +03:00
Roman Khimov
ab2e60458d
interop: drop blockchainer dependency
...
Use local interface.
2022-01-14 19:57:16 +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
af87cb082f
network: decouple Server from the notary service
2022-01-14 19:55:53 +03:00
Roman Khimov
508d36f698
network: drop consensus dependency
2022-01-14 19:55:53 +03:00
Roman Khimov
66aafd868b
network: unplug stateroot service from the Server
...
Notice that it makes the node accept Extensible payloads with any category
which is the same way C# node works. We're trusting Extensible senders,
improper payloads are harmless until they DoS the network, but we have some
protections against that too (and spamming with proper category doesn't differ
a lot).
2022-01-14 19:55:50 +03:00
Roman Khimov
0ad3ea5944
network/cli: move Oracle service instantiation out of the network
2022-01-14 19:53:45 +03:00
Roman Khimov
5dd4db2c02
network/services: unify service lifecycle management
...
Run with Start, Stop with Shutdown, make behavior uniform.
2022-01-14 19:53:45 +03:00
AnnaShaleva
ce5dfdbe90
nativetest: migrate Notary contract tests to neotest
2022-01-14 17:56:10 +03:00
Anna Shaleva
df6a7d4258
nativetest: migrate Oracle contract tests to neotest
2022-01-14 17:56:10 +03:00
Anna Shaleva
0e1f85b2bf
vm: optimise emit.Array() to use NEWARRAY0 for zero-lenght arrays
2022-01-14 17:56:10 +03:00
Anna Shaleva
2f18b114f2
nativetest: migrate NEO contract tests to neotest
2022-01-14 17:56:10 +03:00
Anna Shaleva
e0ca05f62c
nativetest: migrate Management contract tests to neotest
2022-01-14 17:56:04 +03:00
Anna Shaleva
73ecbb2fb3
rpc: adjust helper contract code
...
Compiler forces notification parameters to match the one specified in
manifest, and manifest of `test_contract.go` tells that `to` parameter
type is hash160:
```
event 'Transfer' should have 'Hash160' as type of 1 parameter, got: ByteArray
```
2022-01-14 16:47:31 +03:00
Anna Shaleva
7927c8d8f5
nativetest: migrate Designation contract tests to neotest
2022-01-14 16:47:31 +03:00
Anna Shaleva
3f1af71f52
nativetest: migrate GAS contract tests to neotest framework
2022-01-14 16:47:31 +03:00
Anna Shaleva
4e7435081f
nativetest: migrate Ledger contract tests to neotest
2022-01-14 16:47:27 +03:00
Anna Shaleva
bbe92c21ea
nativetest: migrate Policy contract tests to neotest
2022-01-14 16:34:33 +03:00
AnnaShaleva
48355ba9bf
vm: allow to emit int[32, 16, 8] and some of uints
2022-01-13 19:12:20 +03:00