Commit graph

8048 commits

Author SHA1 Message Date
Roman Khimov
9a3923097b
Merge pull request #3717 from nspcc-dev/rel-0.107.0
CHANGELOG: release 0.107.0
2024-12-03 12:00:20 +03:00
Anna Shaleva
656d098f5c CHANGELOG: release 0.107.0
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-12-03 10:41:32 +03:00
Anna Shaleva
20ea4c40f5 docs: adjust NeoFS BlockFetcher configuration example
Set container ID to N3 Mainnet container ID, extend the list of storage
nodes.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-12-02 19:51:45 +03:00
Anna Shaleva
6a7d2bc250
Merge pull request #3712 from nspcc-dev/move-metrics
*: move metric `neogo_version` out of pkg/network
2024-12-02 10:53:54 +03:00
Anna Shaleva
fde3ab0c88 ROADMAP: update roadmap
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-29 19:55:22 +03:00
Roman Khimov
a3c2d82e03
Merge pull request #3713 from nspcc-dev/enable-fetcher
config: enable NeoFSBlockFetcher by default
2024-11-29 19:55:19 +03:00
Anna Shaleva
ba822cfa76 config: enable NeoFSBlockFetcher by default
Best and newest features have to be shown to our users!

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-29 19:28:03 +03:00
Roman Khimov
7b82c759ce
Merge pull request #3711 from nspcc-dev/fetch-dbft
go.mod: upgrade dBFT version
2024-11-29 18:39:56 +03:00
Anna Shaleva
9778fd88fb *: migrate onto simplified dbft.PublicKey interface
Adopt https://github.com/nspcc-dev/dbft/pull/137.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-29 18:33:19 +03:00
Anna Shaleva
a5cf1635d8 go.mod: fetch dbft v0.3.1
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-29 18:33:03 +03:00
Ekaterina Pavlova
ebb71497a5 *: move metric neogo_version out of pkg/network
Close #3682

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 16:58:11 +03:00
Anna Shaleva
dc2d22110f
Merge pull request #3709 from nspcc-dev/compile
neotest: extend cached compiled contract identifier in CompileFile
2024-11-29 14:46:19 +03:00
Ekaterina Pavlova
3f95476ce3 neotest: extend cached compiled contract identifier in CompileFile
Close #3542

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 14:43:37 +03:00
Anna Shaleva
ac073e2ada
Merge pull request #3710 from nspcc-dev/fix-dockerfiles
Dockerfile: migrate to AS keyword usage
2024-11-29 14:38:09 +03:00
Anna Shaleva
7ba295ca99
Merge pull request #3708 from nspcc-dev/rpcwrapper
cli: add check config field for `generate-rpcwrapper`
2024-11-29 14:34:02 +03:00
Anna Shaleva
3b7a7dc767
Merge pull request #3706 from nspcc-dev/blockfetcher
NeoFS BlockFetcher: add pool with retries
2024-11-29 14:32:19 +03:00
Anna Shaleva
24127c18ff Dockerfile: migrate to AS keyword usage
Fix the following Docker image build warning that stops privnet image build:
```
 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 3)
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-29 14:16:32 +03:00
Ekaterina Pavlova
870421e950 cli: add check config field for generate-rpcwrapper
Close #3646

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:53:40 +03:00
Ekaterina Pavlova
718ff9aa0a blockfetcher: add check on IndexFileSize of index files
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:50 +03:00
Ekaterina Pavlova
14c980a685 network: refactor return value from NeoFSBlockFetcher service
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:50 +03:00
Ekaterina Pavlova
119ca27994 blockfetcher: fix block enqueue logic
Previously, the `blockQueuer` routine, which enqueues blocks into
`bQueue`, could be blocked on enqueing newer blocks if older blocks
downloading is delayed by NeoFS.

The `blocksCh` channel, acting as a queue ordered by download speed,
conflicted with the BQueue requirement for strict sequential enqueuing
(expecting an exact range of blocks), resulting in a deadlock that
stalled the process.

Before with default config settings:
```
2024-11-27T17:12:19.348+0300	INFO	persisted to disk	{"blocks":
 0, "keys": 116, "headerHeight": 0, "blockHeight": 0, "took": "15
 .509083ms"}
2024-11-27T17:19:39.574+0300	INFO	persisted to disk	{"blocks":
 16, "keys": 11107, "headerHeight": 216768, "blockHeight": 216768,
 "took": "62.762041ms"}
```
Average block persistence speed: 492.40 block/s
Average blocks number for each persist log: 584.28

After:

```
2024-11-27T17:29:03.362+0300	INFO	persisted to disk	{"blocks":
 0, "keys": 116, "headerHeight": 0, "blockHeight": 0, "took": "19
 .485084ms"}
2024-11-27T17:34:58.527+0300	INFO	persisted to disk	{"blocks":
 16, "keys": 11109, "headerHeight": 216770, "blockHeight": 216769,
 "took": "52.43925ms"}
```
Average block persistence speed: 610.33 block/s
Average blocks number for each persist log: 752.61

Close #3699

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:50 +03:00
Ekaterina Pavlova
c1ce6904c4 network: discard bFetcherQueue earlier
Discard `bFetcherQueue` to avoid persisting
new blocks during termination before service Shutdown.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:50 +03:00
Ekaterina Pavlova
df05cd2858 blockfetcher: change shutdown logic
Move the `isActive` check earlier to enable faster shutdown and prevent
the service from hanging.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:50 +03:00
Ekaterina Pavlova
8216f538c3 blockfetcher: check container and network Magic
Close #3644

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:37:11 +03:00
Ekaterina Pavlova
92ff8409a9 blockfetcher: add retry for GET and SEARCH operations
Close #3564

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-29 13:34:40 +03:00
Ekaterina Pavlova
9fa07d8d6d blockfetcher: fix invalid wallet test
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-28 16:14:25 +03:00
Ekaterina Pavlova
c321eed8ee blockfetcher: use pool for GET and SEARCH operations
Use NeoFS storage nodes pool during blocks fetching to spread the load.

Close #3568

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-28 16:14:25 +03:00
Ekaterina Pavlova
04516e7d26 neofs: add pool support for NeoFS operations
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-28 16:13:36 +03:00
Anna Shaleva
e89f9fe2a4
Merge pull request #3704 from nspcc-dev/interop-md-fixes
Native contract manifest build fixes
2024-11-26 17:03:31 +03:00
Anna Shaleva
f98169a762
Merge pull request #3689 from nspcc-dev/feat/filter-events-by-parameters
ws: allow filtering notification by parameters
2024-11-26 10:12:40 +03:00
Pavel Karpy
97bd73b38c rpcsrv/tests: simplify tests with parsed test contract hash
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2024-11-26 00:26:06 +03:00
Pavel Karpy
0ba16fe580 ws: allow filtering notification by parameters
`Any` type with nil/null value is treated as a parameter filter that allows
any notification value. Not more than 16 filter parameters are allowed.
Closes #3624.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2024-11-26 00:26:04 +03:00
Roman Khimov
9e7fd5180a interop: slightly rephrase BuildHFSpecificMD logic
Technically, we can always buildHFSpecificMD() if contract is active, but we
just optimize the build out in some cases. switch slightly obfuscates this
and requires having the call in two branches.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-11-25 14:45:26 +03:00
Roman Khimov
6b6878706a interop: fix ActiveFrom comparison when building HF-specific MD
These conditions are about filtering methods out. A method is excluded if its
ActiveFrom is strictly higher than the current HF, since if it's the same then
it should be present. Otherwise contract is broken at the height of this
particular HF.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-11-25 14:45:20 +03:00
Anna Shaleva
171e01be3c
Merge pull request #3691 from nspcc-dev/uploader-eq-search
upload-bin, NeoFSBlockFetcher: migrate to SEARCH with strict equality comparator
2024-11-25 13:43:12 +03:00
Ekaterina Pavlova
43609dd984 *: migrate to SEARCH with strict equality comparator
Close #3670

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-25 13:19:35 +03:00
Anna Shaleva
3d3f3f67e6
Merge pull request #3697 from nspcc-dev/logs-for-cash
core: fix restoring chain with `StateRootInHeader = true`
2024-11-25 12:52:11 +03:00
Ekaterina Pavlova
616c805ac5 cli: refactor index file search in upload-bin command
Align index file searching logic with block search.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-22 17:45:35 +03:00
Ekaterina Pavlova
5dab154582 cli: split searchBatchSize usage in upload-bin command
Split searchBatchSize into constant for searching and uploading.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-22 17:45:35 +03:00
Ekaterina Pavlova
9fd375d56d cli: fix nil error of fetchLatestMissingBlockIndex in upload-bin
Close #3653

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-22 17:45:35 +03:00
Roman Khimov
ff15e39363
Merge pull request #3695 from nspcc-dev/add-unwrap-errnull
unwrap: add ErrNull to handle Null returned, fix #2795
2024-11-22 14:19:46 +03:00
Ekaterina Pavlova
85c3b96f82 core: fix restoring chain with StateRootInHeader = true
Close #3597

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-22 13:33:50 +03:00
Roman Khimov
3d00a19383 unwrap: add ErrNull to handle Null returned, fix #2795
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-11-21 13:23:32 +03:00
Anna Shaleva
cdbc026c27
Merge pull request #3692 from nspcc-dev/basicchain-doc
*: extend basic testing chain documentation
2024-11-20 18:35:30 +03:00
Anna Shaleva
40dda9f524 *: extend basic testing chain documentation
Save some time for developers who are not familiar with RPC server
unit-test structure.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-11-20 18:06:13 +03:00
Anna Shaleva
2b758c53eb
Merge pull request #3560 from nspcc-dev/nep24
manifest: support NEP-24
2024-11-20 15:37:53 +03:00
Ekaterina Pavlova
b63c7aad73 rpcsrv: add NEP24 test
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-20 14:45:28 +03:00
Ekaterina Pavlova
8e99ff65e1 rpcsrv: update testdata/testblocks.acc
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-20 14:45:28 +03:00
Ekaterina Pavlova
b2bd8e4a0a manifest: support NEP-24
Close #3451

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-20 14:45:28 +03:00
Ekaterina Pavlova
54e3708566 manifest: add Required field to Standard
`Required` contains standards that are required for this standard.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-11-20 14:45:28 +03:00