Commit graph

7310 commits

Author SHA1 Message Date
Anna Shaleva
a159054f10 *: update interop dependency
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-28 10:49:39 +03:00
Anna Shaleva
b35f351f0b interop: add contract storage limits
Users of NeoGo interop package may have a demand to use these limits
for custom purposes, it would be nice to have them as constants.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-27 19:56:13 +03:00
Roman Khimov
fd7b7ffc13
Merge pull request #3231 from nspcc-dev/rel-0.104.0
CHANGELOG: release 0.104.0
2023-11-27 18:14:27 +03:00
Anna Shaleva
a9803b3477 CHANGELOG: release 0.104.0
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-27 17:34:53 +03:00
Roman Khimov
7179efec35
Merge pull request #3223 from nspcc-dev/cancel_command
cli: cancel transaction command
2023-11-27 17:32:48 +03:00
Ekaterina Pavlova
fc77754098 cli: cancel transaction command
CLI side method for canceling not yet accepted transaction. It's
alternative to unsupported `canceltransaction` RPC method.

Close #3151.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-11-27 18:10:54 +04:00
Ekaterina Pavlova
7a2eb32c42 cli: wallet flag set
Wallet operations flags moved to options and joint into Wallet flag set.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-11-25 10:05:05 +04:00
Ekaterina Pavlova
20a57d8337 cli: export GetAccFromContext and GetUnlockedAccount methods
Exported to avoid code duplication.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-11-25 10:05:05 +04:00
Roman Khimov
7a1bf77585
Merge pull request #3229 from nspcc-dev/fix-service-init
core, services: fix Designation-dependant service initialisation
2023-11-24 15:47:42 +03:00
Anna Shaleva
15b4e0a8cd services: adjust StateRoot service initialisation
Perform initialisation of StateRoot service with designated
StateValidator's node list in the service constructor. There's no need
to wait until the next role update event, and it may lead to inaccuraces
in service work on SIGHUP/server restart.

A part of #3228.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-24 15:25:51 +03:00
Anna Shaleva
11ec0db350 core, services: fix Designation-dependant service initialisation
Initialise services dependant on roles designation based on N+1
block so that Genesis roles extension work properly. There's not
much sence to fetch node roles information for the latest persisted
block because Designation contract itself makes designated nodes
responsible since the next subsequent block.

A part of #3228.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-24 15:25:51 +03:00
Roman Khimov
4216efbe6c
Merge pull request #3227 from nspcc-dev/upd-zkp-deps
examples: do not replace neo-go library for ZKP examples
2023-11-24 09:32:58 +03:00
Anna Shaleva
626f1ee198 examples: do not replace neo-go library for ZKP examples
0.103.1 contains all necessary changes to run tests.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-24 09:21:09 +03:00
Anna Shaleva
5d1e0192f1
Merge pull request #3206 from nspcc-dev/relative_path_flag
cli: add --relative-path option
2023-11-24 08:16:16 +03:00
Roman Khimov
1f84756c21
Merge pull request #3222 from nspcc-dev/doc/contracts-storage-seek-call-improvement
doc/Mention prefix trimming in `Seek` operations where applicable
2023-11-23 23:03:20 +03:00
Roman Khimov
61d5b6eb0c
Merge pull request #3221 from nspcc-dev/json-limits
Anti-DOS RPC limitations
2023-11-23 23:02:50 +03:00
Ekaterina Pavlova
f457d50773 cli: add --relative-path option
To be able running the node from any working directory by simply
pointing the relative-path as prefix for relative parameters set in
config.

Closes #3179.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-11-23 21:41:50 +04:00
Anna Shaleva
d511f6e5a9 confi: add MaxRequestHeaderBytes RPC configuration option
A part of #3131, follow the notion of https://github.com/neo-project/neo-modules/pull/827,
but don't restrict request line size due to https://github.com/golang/go/issues/15494.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-23 20:17:49 +03:00
Anna Shaleva
802d8d24b9 config: add MaxRequestBodySize RPC configuration option
A part of #3131, follow the https://github.com/neo-project/neo-modules/pull/827.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-23 20:17:49 +03:00
Roman Khimov
195bb742ca
Merge pull request #3225 from nspcc-dev/ojson-upd
*: upgrade go-ordered-json version
2023-11-23 19:27:24 +03:00
Anna Shaleva
251b8c57b9 *: upgrade go-ordered-json version
Close #3224.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-23 19:14:28 +03:00
Pavel Karpy
62b710868b *: mention prefix trimming in Seek operations where applicable
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2023-11-23 18:44:19 +03:00
Anna Shaleva
7362fd94e6
Merge pull request #3220 from nspcc-dev/stable-func-debug-data
compiler: walk over functions in reproducible order, fix #3219
2023-11-23 14:50:01 +03:00
Roman Khimov
341d978e5b compiler: walk over functions in reproducible order, fix #3219
It affects both Debug data and bindings, otherwise two unnamed structures can
get any of unnamed/unnamedx names depending on particular invocation.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-23 13:21:51 +03:00
Anna Shaleva
22c654b200 neorpc: restrict maximum subitems number in SignerWithWitness
Restrict the number of Rules, Contracts and Groups. A part of #3131.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-23 12:12:34 +03:00
Anna Shaleva
2f6ba1fded rpcsrv: define GetSignersWithWitnesses on a pointer
Nil receiver can be properly handled and all other `Param`'s mathods
are defined on a pointer.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-23 11:44:29 +03:00
Roman Khimov
25ef2c7f16
Merge pull request #3218 from nspcc-dev/serialization-limits
Introduce stackitem serialization limits
2023-11-22 21:28:25 +03:00
Anna Shaleva
910d53b27b core: do not check manifest size on deploy/update
Manifest will be a part of the state.Contract which will be checked on its
way to the storage. Tiny optimisation which allows not to serialize manifest
twice. Ref. https://github.com/nspcc-dev/neo-go/pull/3218#discussion_r1402374232.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-22 20:17:09 +03:00
Anna Shaleva
1d189fd90c Revert "native: ignore decoding errors during cache init"
This reverts commit 822722bd2e.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-22 19:39:03 +03:00
Anna Shaleva
6824bd9f40 smartcontract: require manifest serialization in (*Manifest).IsValid
Port the restrictive part of https://github.com/neo-project/neo/pull/2948.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-22 19:39:03 +03:00
Anna Shaleva
387c411da0 vm: add default limit to SI serialization context
Follow the notion of https://github.com/neo-project/neo/pull/2948.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-22 19:39:01 +03:00
Roman Khimov
00c6a811ab
Merge pull request #3215 from nspcc-dev/tiny-compiler-fixes
Tiny compiler fixes
2023-11-22 19:29:37 +03:00
Roman Khimov
e21664cd7d
Merge pull request #3216 from nspcc-dev/drop-fyrchik
*: drop fyrchik from code owners
2023-11-22 19:29:28 +03:00
Roman Khimov
23e553f647 *: drop fyrchik from code owners
His account is disabled (which technically leads to an invalid CODEOWNERS
file) and he's no longer active, unfortunately.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-22 11:18:27 +03:00
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
8aeb30e019
Merge pull request #3214 from nspcc-dev/doc-canceltx-rpc
docs: canceltransaction is not going to be supported
2023-11-21 20:29:45 +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
2ae44e074d docs: canceltransaction is not going to be supported
Refs. neo-project/neo-modules#837.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 16:11:58 +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