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
Roman Khimov
c942402957
blockchainer: drop Policer interface
...
We never use it as a proper interface, so it makes no sense keeping it this
way.
2022-01-12 00:58:03 +03:00
Roman Khimov
fcbb0aacc2
Merge pull request #2315 from nspcc-dev/cli/zero-balance-warning
...
cli: print zero balance of known token if `token` flag specified
2022-01-10 23:56:32 +03:00
Roman Khimov
f26de523fd
Merge pull request #2314 from nspcc-dev/vm-pretty-print
...
vm: cut trailing spaces in `PrintOps`
2021-12-29 06:20:08 +03:00
AnnaShaleva
cf3ec6d9ac
cli: print zero balance of known token if token
flag specified
...
Close #2313 .
2021-12-28 11:41:38 +03:00
Evgeniy Stratonikov
ffb6504f67
vm: cut trailing spaces in PrintOps
...
When there is a single big instruction (like PUSHDATA4) in script,
all other instructions are padded to the right with spaces.
This makes it hard to view script in terminal, because long lines
are usually wrapped at the screen boundary and printed as multiple lines.
The culprit is our `cursor` field which is printed in the last column
and causes all previous fields to have the same length for every
instruction. One way to fix this is to omit cursor field if it is empty.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-12-28 11:27:31 +03:00
Roman Khimov
501ca0dedb
Merge pull request #2311 from nspcc-dev/native/fix-gas-distribution
...
core: fix GAS distribution to primary node when notary enabled
2021-12-14 12:47:04 +03:00
AnnaShaleva
8c6de35ec2
core: fix GAS distribution to primary node when notary enabled
...
Close #2310 .
2021-12-14 12:18:47 +03:00
Roman Khimov
b43335e591
Merge pull request #2306 from nspcc-dev/call-tokens
...
compiler: use CALLT for native contract calls, fix #2257
2021-12-10 13:05:55 +03:00
Roman Khimov
299a7ea614
compiler: use CALLT for native contract calls, fix #2257
2021-12-10 11:58:50 +03:00
Roman Khimov
e6f64b7e3d
Merge pull request #2298 from nspcc-dev/test-signer
...
Improve signers handling in test framework
2021-12-10 11:25:01 +03:00
Evgeniy Stratonikov
4ab97094c2
neotest: provide full account list for committee
...
Make the behaviour of `committee.Single(n)` more predictable,
i.e be able to return every committee member.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-12-09 21:59:02 +03:00
Evgeniy Stratonikov
8886fa8ca9
neotest: simplify committee account construction
...
Simple `sort.Slice` is more readable than multi-level for-loop.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-12-09 21:59:02 +03:00
Evgeniy Stratonikov
37ecf51d13
neotest: allow to extract simple signers from multi-signer
...
There is a quirk related to ordering: we store accounts in such an order that
is expected by multi-signature verification script. This was done to
speed up transaction/block signing which is done quite frequently in
tests. This commit allows to provide accounts in any order and to
extract a single signer from multi-signer based on this order.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-12-09 21:59:02 +03:00
Evgeniy Stratonikov
d4689db47e
neotest: allow to extract account from single signer
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-12-09 21:59:02 +03:00
Roman Khimov
ad74061fc7
Merge pull request #2308 from nspcc-dev/cli/fix-relay-tx
...
cli: allow to relay transaction on Enter
2021-12-09 19:15:25 +03:00
Anna Shaleva
6c2bf7af78
cli: allow to relay transaction on Enter
...
Close #2307 .
2021-12-09 19:14:01 +03:00
Roman Khimov
f14f7b9396
Merge pull request #2305 from nspcc-dev/store-applog-with-tx
...
Store applog with tx
2021-12-09 16:05:24 +03:00
Roman Khimov
4c39b6600d
*: store application long along with tx/block
...
Two times less keys inserted into the DB per tx leads to ~13% TPS
improvement. We also drop one goroutine with it which isn't bad as well.
2021-12-09 15:39:26 +03:00
Roman Khimov
f87c595d94
core: fix TestRestoreAfterDeploy
...
A bit longer script easily solves the size problem.
2021-12-08 12:05:31 +03:00
Roman Khimov
658fbcebf7
Merge pull request #2304 from nspcc-dev/stdin-wallet
...
Wallet from stdin
2021-12-08 10:49:10 +03:00
Roman Khimov
dadb3b7240
cli/wallet: improve errNoPath string
...
It's also used by commands that don't write to the wallet, the text seems to
be wrong for these cases.
2021-12-08 10:36:17 +03:00
Roman Khimov
5196558056
cli/wallet: allow to read wallet from stdin where it's possible
...
Unfortunately, testing this code is not possible without an additional wrapper
in `input`, but adding it just to test this seems to be too excessive. Fixes
2021-12-08 10:36:17 +03:00
Roman Khimov
06fc450789
Merge pull request #2300 from nspcc-dev/fix-stripprefix-comment
...
interop/storage: fix outdated RemovePrefix comment
2021-12-06 18:16:48 +03:00
Roman Khimov
f8d5c5ff79
interop/storage: fix outdated RemovePrefix comment
...
ffaae0f773
changed the behavior long time ago,
we're actually stripping whole requested prefix.
2021-12-06 18:09:53 +03:00
Roman Khimov
d42d4fc812
Merge pull request #2295 from nspcc-dev/github/upload-build-artifacts
...
.github: upload binaries for Build workflows
2021-12-03 12:39:29 +03:00
Anna Shaleva
70d00a6f98
.github: simplify checkout process
...
We don't need separate steps for manual and automatic checkout, the
default ref value can be habdled by checkout@v2 itself.
2021-12-03 12:25:10 +03:00
Anna Shaleva
4a410f4898
.github: allow to trigger Build workflow manually
2021-12-03 12:22:48 +03:00
Anna Shaleva
b602c9d3a0
.github: upload binaries for Build workflows
2021-12-03 12:20:45 +03:00
Roman Khimov
3dbc9bb5dc
docs: add a note on defer limitations
2021-12-03 11:36:37 +03:00
Roman Khimov
6000c6a502
CHANGELOG: release 0.98.0
2021-12-03 11:11:06 +03:00
Roman Khimov
96339e9f64
Merge pull request #2290 from nspcc-dev/microopt
...
Trivial microoptimizations
2021-12-02 19:21:45 +03:00
Roman Khimov
b16497cbc4
Merge pull request #2291 from nspcc-dev/invtree-call-json
...
vm: put child invocation tree nodes into `call` element
2021-12-02 19:15:22 +03:00
Roman Khimov
eb27699dad
vm: put child invocation tree nodes into call
element
...
As neo-project/neo-modules#657 currently does.
2021-12-02 17:46:48 +03:00
Roman Khimov
41ab7a85a7
hash: avoid allocation in RipeMD160 calculation
2021-12-02 16:11:09 +03:00
Roman Khimov
53cfde62de
vm: don't allocate another stack for entry scripts
...
vm.New() creates a new stack, then we load an entry script with
LoadScriptWithFlags and it creates another one which doesn't make much
sense. rvcount is -1 for it, so all elements are to be copied down anyway and
it's clear so a new loaded script can't dig down to anything it shouldn't be
able to.
2021-12-02 15:59:51 +03:00