Commit graph

7251 commits

Author SHA1 Message Date
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
Anna Shaleva
ba4c58780c native: optimize policy check for transaction's signers
Do not retrieve RO cache for each signer, make it ones per transaction
instead.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-03 10:29:47 +03:00
Anna Shaleva
de38163f89 core: log block height before MPT/natives cache initialization
We have this log on the network server side, but it would also be
useful in case of failed blockchain initialization.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-03 10:29:46 +03:00
Anna Shaleva
bbbc6805a8 native: fix NeoToken initialization process
Refactored native NeoToken cache scheme introduced in #3110 sometimes requires
validators list recalculation during native cache initialization process (when
initializing with the existing storage from the block that is preceded each N-th block).
To recalculate validators from candidates, native NeoToken needs an access to
cached native Policy blocked accounts. By the moment of native Neo initialization,
the cache of native Policy is not yet initialized, thus we need a direct DAO access
for Policy to handle blocked account check.

Close #3181.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-02 17:56:02 +03:00
Anna Shaleva
91c8aa21cc core: fix typo in comment
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-02 17:15:34 +03:00
Roman Khimov
8ed6d97085
Merge pull request #3178 from nspcc-dev/dependabot/go_modules/google.golang.org/grpc-1.57.1
build(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1
2023-10-27 12:25:58 +03:00
dependabot[bot]
c9803f5448
build(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.57.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.57.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 21:37:52 +00:00
Roman Khimov
9de9320d55
Merge pull request #3172 from nspcc-dev/rel-0.103.0
Release 0.103.0
2023-10-20 22:05:51 +03:00
Roman Khimov
b9297a4b2c
Merge pull request #3175 from nspcc-dev/fix-nns-dep
examples: update neo-go dependency and fetch fresh gnark-crypto
2023-10-20 22:04:27 +03:00
Anna Shaleva
a755a2be30 CHANGELOG: release 0.103.0
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 21:33:34 +03:00
Anna Shaleva
0e458f473f examples: update neo-go dependency and fetch fresh gnark-crypto
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 21:20:45 +03:00
Roman Khimov
d89c8801d6
Merge pull request #3173 from nspcc-dev/dep-upd
*: update interop dependencies
2023-10-20 21:15:54 +03:00
Roman Khimov
dffd87c6c8
Merge pull request #3171 from nspcc-dev/fix-linter
Fix linter problems
2023-10-20 21:14:41 +03:00
Anna Shaleva
1605496002 *: update interop dependencies
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 19:38:20 +03:00
Anna Shaleva
7a6b908cae neorpc: fix exported structure comment
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 19:31:23 +03:00
Roman Khimov
c3955f87d1
Merge pull request #3165 from nspcc-dev/fix-win-timeout
Improve timeout of RPC tests on Windows
2023-10-20 19:07:24 +03:00
Anna Shaleva
3544d65ecd rpcclient: disable linter for documentation example
Disable the following linter warning:
```
superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (revive)
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 17:28:57 +03:00
Anna Shaleva
6e0af5ac90 network: fix linter warning
Fix the following linter warning:
```
dot-imports: should not use dot imports (revive)
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 17:23:35 +03:00
Anna Shaleva
39ce3a9d1d vm: fix linter warning
Fix the following linter warning:
```
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 17:22:21 +03:00
Anna Shaleva
c93658b1c1 Partially revert "*: use localhost address instead of 127.0.0.1, fix #2575"
This partially reverts commit c26a962b55 for testing
chains configurations.

Ref. #2975, although this commit doesn't close it. This commit is an attempt to
enforce IPv4 for our test clients to avoid problem described in the issue.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 17:17:37 +03:00
Roman Khimov
890f64007a
Merge pull request #3168 from nspcc-dev/roles-init
Introduce Genesis protocol setting extensions
2023-10-19 18:49:45 +03:00
Anna Shaleva
8cc32a91b6 *: add GenesisTransaction extension to the protocol configuration
Provide a script that should be deployed in the genesis block.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-19 18:33:50 +03:00
Anna Shaleva
065bd3f0be *: introduce Genesis protocol configuration
This section contains genesis-related settings including genesis-related or natives-related
extensions. Currently it includes the set of node roles that may be designated
duing the native Designation contract initialisation.

Close #3156.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-19 18:30:20 +03:00
Anna Shaleva
1815bc8a32 *: update Stringers wrt fresh Stringer version
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-19 11:33:07 +03:00