Roman Khimov
4c9cd438f8
rpcbinding: sort named types to stabilize output
...
Same input -> same output, otherwise tests fail and @AnnaShaleva is annoyed.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 21:47:51 +03:00
Roman Khimov
eade327b9b
compiler: check for pkg nilness, fix #3202
...
Unfortunately, when import cycle happens somewhere deep in the import chain we
dont't get an error from packages.Load(). But it leaves some imports
uninitialized, so at least we can check for them.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 21:47:51 +03:00
Roman Khimov
fced6a27ba
compiler: iterate over autoguessed events in reproducible way
...
Otherwise it's undertermined which of two unnamed structures will get "Unnamed"
and "UnnamedX" which can break the test from time to time.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 18:43:40 +03:00
Roman Khimov
5370034955
compiler: deduplicate autoguessed event names, fix #3088
...
Make them stable wrt parameter order and use proper names in event structures
as well.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 18:35:26 +03:00
Roman Khimov
a5d041a1ac
compiler: check range first, analyze funcs then
...
Type data is added while walking through function ins/outs even if we're to
throw this function away. But we don't need it, these types are not used, so
we can deal with the main part of #3071 by optimizing this out.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 17:52:17 +03:00
Roman Khimov
7f9e2e5047
cli/sc: don't rewrite RPC bindings by default
...
TestAssistedRPCBindings didn't respect rewriteExpectedOutputs setting, with
this behavior compiler could produce any result and the test wouldn't notice.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 17:43:45 +03:00
Roman Khimov
ff958706f4
Merge pull request #3212 from nspcc-dev/drop-history
...
Move NativeUpdateHistory logic uner hardforks
2023-11-21 15:46:16 +03:00
Roman Khimov
28ee1621b8
Merge pull request #3155 from nspcc-dev/apptr-pricing
...
*: introduce Policy attributes pricing
2023-11-21 15:44:40 +03:00
Anna Shaleva
58102a9a80
*: move NativeUpdateHistory logic under Hardforks management
...
Close #3196 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 14:05:28 +03:00
Roman Khimov
4d8601297d
Merge pull request #3211 from nspcc-dev/fix-curr-height
...
core: review usages of (*intero.Context).BlockHeight method
2023-11-21 13:51:03 +03:00
Anna Shaleva
64b5ba24e9
*: fix less then
typos everywhere
...
My poor grammar...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:47:59 +03:00
Anna Shaleva
3b11f98cd0
core: review usages of (*intero.Context).BlockHeight method
...
This method returns persisted block height and doesn't take into account
persisting block height. Some of the callers of this method relay on
the wrong assumption that BlockHeight() returns persisting block index.
Fix improper usages of this method and adjust tests. Ref.
61a066583e/src/Neo/SmartContract/ApplicationEngine.cs (L634)
.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:46:13 +03:00
Anna Shaleva
c6d259b285
*: update interop deps
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:44:02 +03:00
Anna Shaleva
0493ddbd70
ROADMAP: add new line to the end of the file
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
474225d425
core, rpcsrv: apply generic attributes fee logic to NotaryServiceFeePerKey
...
Remove related methods from native Notary and add relevant code to native
Policy.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
82cb2e718d
native: introduce attribute pricing
...
Port the https://github.com/neo-project/neo/pull/2916 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Roman Khimov
80fcf81102
Merge pull request #3209 from nspcc-dev/strict-cfg
...
Forbid unknown YAML node configuration fields
2023-11-21 13:20:57 +03:00
Roman Khimov
8e5a724f5d
Merge pull request #3210 from nspcc-dev/service-err
...
wallet: provide more detailed errors on failed NewWalletFromFile
2023-11-21 13:20:11 +03:00
Anna Shaleva
59baecd39b
wallet: provide more detailed errors on failed NewWalletFromFile
...
Close #3180 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:07:11 +03:00
Roman Khimov
f10d2d2be7
Merge pull request #3208 from nspcc-dev/strlen
...
Support `strLen` native StdLib method
2023-11-20 21:29:08 +03:00
Anna Shaleva
63de821ff4
config: forbid unknown YAML configuration fields
...
Close #3128 and fix one of the privnet configurations along the way.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 20:04:09 +03:00
Anna Shaleva
a4779de375
core: improve TestConfigNativeUpdateHistory subtests naming
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 20:03:28 +03:00
Anna Shaleva
0fef119f5f
rpcsrv: update test data
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 19:41:45 +03:00
Anna Shaleva
16b7a83f30
*: update interop deps
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 19:25:52 +03:00
Anna Shaleva
406c9f8b92
core, interop: add strLen
method for native StdLib contract
...
Close #3195 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 19:23:33 +03:00
Roman Khimov
b5cf3f592f
Merge pull request #3207 from nspcc-dev/limit-rpc-signers
...
rpcsrv/params: limit tx signers/witnesses
2023-11-20 16:29:42 +03:00
Roman Khimov
f6cb698cd1
rpcsrv/params: limit tx signers/witnesses
...
Inspired by https://github.com/neo-project/neo-modules/pull/845 .
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-20 16:01:14 +03:00
Roman Khimov
7fb077e999
Merge pull request #3186 from nspcc-dev/reduce-max-nef-size
...
Restrict maximum serialized NEF file size
2023-11-20 15:19:40 +03:00
Roman Khimov
48bd8057dd
Merge pull request #3058 from nspcc-dev/current-signers
...
core: support `System.Runtime.CurrentSigners` syscall
2023-11-20 15:14:05 +03:00
Anna Shaleva
90705e37e9
compiler: perform NEF size check on serialization
...
Retun an error if the serialized NEF size exceeds stackitem.MaxSize.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 15:14:05 +03:00
Anna Shaleva
06c99fb2af
*: update interop deps
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:50:30 +03:00
Anna Shaleva
e63a93b8a0
compiler: add tests for System.Runtime.CurrentSigners
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:49:07 +03:00
Anna Shaleva
2fba04490a
core: add System.Runtime.CurrentSigners syscall
...
Port the https://github.com/neo-project/neo/pull/2827 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:46:27 +03:00
Anna Shaleva
90b01bcea6
core: move SignersToStackItem to transaction package
...
It will be reused from interops.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:46:27 +03:00
Anna Shaleva
14d98811a5
smartcontract: restrict maximum NEF file size on deserialisation
...
Port https://github.com/neo-project/neo/pull/2939 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:32:32 +03:00
Roman Khimov
b2205940fa
Merge pull request #3194 from nspcc-dev/add-test
...
manifest: add compatibility test for Permissions and Trust serialization
2023-11-18 22:44:57 +03:00
Anna Shaleva
fdcc369d60
manifest: add compatibility test for Permissions and Trust serialization
...
We already have tests for Permission deserialisation, so port the first
part of https://github.com/neo-project/neo/pull/2948 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-18 13:32:28 +03:00
Roman Khimov
dd48f810cc
Merge pull request #3203 from nspcc-dev/doc-upd
...
docs: adjust ValidatorsHistory documentation
2023-11-17 17:23:21 +03:00
Anna Shaleva
f88df92925
docs: adjust ValidatorsHistory documentation
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-17 16:57:41 +03:00
Roman Khimov
de2a445088
Merge pull request #3185 from nspcc-dev/fix-stackitem-limits
...
vm: reduce maximum stckitem size
2023-11-13 22:53:19 +03:00
Roman Khimov
5e220754d7
Merge pull request #3199 from nspcc-dev/fix-err
...
neorpc: adjust common error messages
2023-11-13 22:17:07 +03:00
Anna Shaleva
b0cdae4666
vm: reduce maximum stckitem size
...
To prevent possible DoS. Port the https://github.com/neo-project/neo-vm/pull/514 ,
close #3170 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-13 20:40:30 +03:00
Anna Shaleva
963a22e280
neorpc: adjust common error messages
...
According to the initial proposal and
https://github.com/neo-project/proposals/pull/156/files#diff-2b5f7c12a23f7dbe4cb46bbf4be6936882f8e0f0b3a4db9d8c58eb294b02e6ed .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-13 20:29:13 +03:00
Roman Khimov
dbd647e3a6
Merge pull request #3193 from nspcc-dev/rel-0.103.1
...
Release 0.103.1
2023-11-09 10:36:51 +03:00
Anna Shaleva
ed4610f8b4
CHANGELOG: release 0.103.1
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-09 10:28:12 +03:00
Roman Khimov
7045d3bd63
Merge pull request #3192 from nspcc-dev/rpc-err
...
neorpc: ensure errors.Is and errors.As work properly with neorpc.Error
2023-11-08 09:34:05 +03:00
Roman Khimov
f8d8b03f64
Merge pull request #3191 from nspcc-dev/fix-roundtrip
...
native: prohibit non-zero GAS/NEO roundtrip with zero balance
2023-11-08 09:32:56 +03:00
Anna Shaleva
fca7eb35a1
neorpc: ensure errors.Is and errors.As work properly with neorpc.Error
...
Close #3188 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-07 23:59:53 +03:00
Anna Shaleva
b4866bd69e
native: prohibit NEP-17 roundtrip with zero balance
...
Close #3190 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-07 19:37:37 +03:00
Roman Khimov
c5e284c117
Merge pull request #3187 from nspcc-dev/fix-neo-init
...
Fix native Neo cache initialization
2023-11-03 10:56:02 +03:00