Commit graph

8160 commits

Author SHA1 Message Date
Anna Shaleva
6969982f77
Merge pull request #3800 from nspcc-dev/dependabot/go_modules/examples/zkp/cubic_circuit/github.com/consensys/gnark-0.12.0
build(deps): bump github.com/consensys/gnark from 0.11.0 to 0.12.0 in /examples/zkp/cubic_circuit
2025-01-30 23:48:57 +03:00
dependabot[bot]
f09a04d705
build(deps): bump github.com/consensys/gnark
Bumps [github.com/consensys/gnark](https://github.com/consensys/gnark) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/consensys/gnark/releases)
- [Changelog](https://github.com/Consensys/gnark/blob/master/CHANGELOG.md)
- [Commits](https://github.com/consensys/gnark/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/consensys/gnark
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-30 12:54:06 +00:00
Roman Khimov
5d0cd53d67
Merge pull request #3799 from nspcc-dev/dbft-0.3.2
go.mod: fetch dBFT v0.3.2
2025-01-30 15:51:59 +03:00
Anna Shaleva
e704731f2f go.mod: fetch dBFT v0.3.2
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2025-01-30 15:35:20 +03:00
Anna Shaleva
50cb21333e
Merge pull request #3796 from nspcc-dev/si-fix
rpcbindings: fix missing return item
2025-01-27 15:54:26 +03:00
Roman Khimov
8ba2bbf87c rpcbindings: fix missing return item
... not enough return values
        have (error)
        want (stackitem.Item, error)

An omission of 00e22b9751.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-26 23:47:36 +03:00
Anna Shaleva
7ba8048530
Merge pull request #3569 from ixje/applog-invocations
*: add invocations to applicationlog
2025-01-24 18:42:53 +03:00
Roman Khimov
22c5cf3537
Merge pull request #3794 from nspcc-dev/tostackitem 2025-01-24 18:06:44 +03:00
ixje
4b2ee9a424
state, rpc: add invocations to applicationlog
Add setting to include smart contract invocations data to the applicationlog.
Original issue at https://github.com/neo-project/neo/issues/3386

Signed-off-by: ixje <erik@coz.io>
2025-01-24 15:44:10 +01:00
Roman Khimov
00e22b9751 rpcbindings: produce ToStackItem companion method
We need it for structs to be usable as function parameters, otherwise
they're not implementing stackitam.Convertible and they fail at transaction
script creation phase:

    2025/01/22 20:31:26 bootstrap error: could not invoke method (addNode): test invocation failed: unsupported operation: *netmap.NetmapNode2 type

Related to https://github.com/nspcc-dev/neofs-node/pull/3088.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-24 17:07:20 +03:00
Roman Khimov
4da753f822 stackitem: split TryMake and Make
Sometimes we may need something that doesn't panic.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-24 17:07:20 +03:00
Roman Khimov
673b26fdb1
Merge pull request #3792 from nspcc-dev/payables
native: sync supported standards with reference
2025-01-21 21:58:22 +03:00
Anna Shaleva
3b28749fd1 examples: add NEP-27 to the list of supported standards
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2025-01-21 19:41:45 +03:00
Anna Shaleva
257fa7c6c9 native: add NEP-27 to Notary's supported standards
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2025-01-21 19:41:45 +03:00
Anna Shaleva
b2322a804a native: add NEP-27 to Neo's supported standards
Port https://github.com/neo-project/neo/pull/3643.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2025-01-21 19:41:43 +03:00
Anna Shaleva
fcd83e9fd7 smartcontract: support NEP-26 and NEP-27
A replacement of NEP11Payable and NEP17Payable. The essence is the same,
but these standards have official name since
https://github.com/neo-project/proposals/pull/169.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2025-01-21 18:14:55 +03:00
Anna Shaleva
16a6a59c43
Merge pull request #3787 from nspcc-dev/gc-improvements
GC and persistence improvements
2025-01-16 14:37:17 +03:00
Roman Khimov
c047bad446 docs: a bit more DB recommendations
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-15 22:08:08 +03:00
Roman Khimov
9513780c45 core: adjust in-memory processed set dynamically
Instead of tick-tocking with sync/async and having an unpredictable data
set we can just try to check for the real amount of keys that be processed
by the underlying DB. Can't be perfect, but still this adds some hard
limit to the amount of in-memory data. It's also adaptive, slower machines
will keep less and faster machines will keep more.

This gives almost perfect 4s cycles for mainnet BoltDB with no tail cutting,
it makes zero sense to process more blocks since we're clearly DB-bound:

2025-01-15T11:35:00.567+0300    INFO    persisted to disk       {"blocks": 1469, "keys": 40579, "headerHeight": 5438141, "blockHeight": 5438140, "velocity": 9912, "took": "4.378939648s"}
2025-01-15T11:35:04.699+0300    INFO    persisted to disk       {"blocks": 1060, "keys": 39976, "headerHeight": 5439201, "blockHeight": 5439200, "velocity": 9888, "took": "4.131985438s"}
2025-01-15T11:35:08.752+0300    INFO    persisted to disk       {"blocks": 1508, "keys": 39658, "headerHeight": 5440709, "blockHeight": 5440708, "velocity": 9877, "took": "4.052347569s"}
2025-01-15T11:35:12.807+0300    INFO    persisted to disk       {"blocks": 1645, "keys": 39565, "headerHeight": 5442354, "blockHeight": 5442353, "velocity": 9864, "took": "4.05547743s"}
2025-01-15T11:35:17.011+0300    INFO    persisted to disk       {"blocks": 1472, "keys": 39519, "headerHeight": 5443826, "blockHeight": 5443825, "velocity": 9817, "took": "4.203258142s"}
2025-01-15T11:35:21.089+0300    INFO    persisted to disk       {"blocks": 1345, "keys": 39529, "headerHeight": 5445171, "blockHeight": 5445170, "velocity": 9804, "took": "4.078297579s"}
2025-01-15T11:35:25.090+0300    INFO    persisted to disk       {"blocks": 1054, "keys": 39326, "headerHeight": 5446225, "blockHeight": 5446224, "velocity": 9806, "took": "4.000524899s"}
2025-01-15T11:35:30.372+0300    INFO    persisted to disk       {"blocks": 1239, "keys": 39349, "headerHeight": 5447464, "blockHeight": 5447463, "velocity": 9744, "took": "4.281444939s"}

2× can be considered, but this calculation isn't perfect for low number of
keys, so somewhat bigger tolerance is preferable for now. Overall it's not
degrading performance, my mainnet/bolt run was even 8% better with this.

Fixes #3249, we don't need any option this way.

Fixes #3783 as well, it no longer OOMs in that scenario. It however can OOM in
case of big GarbageCollectionPeriod (like 400K), but this can't be solved easily.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-15 22:08:08 +03:00
Roman Khimov
c07c74df41 docs: add more recommendataions to GarbageCollectionPeriod
We're trying to delete less than 1% of data in the default configuration for
mainnet, so it looks like this:

    2025-01-14T15:51:39.449+0300    INFO    finished MPT garbage collection {"removed": 221115, "kept": 71236766, "time": "5m40.323822085s"}

Spending this much time for this low gain every 10K blocks is far from being
optimal.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-14 17:20:31 +03:00
Roman Khimov
c14492e8c8 core: raise severity of persistence failure message
It is very critical in fact.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-14 12:46:01 +03:00
Roman Khimov
70aaeb06ad core: fix old transfer data deletion in RUB-only configuration
RemoveUntraceableBlocks without RemoveUntraceableHeaders is still a valid
configuration and removeOldTransfers() only checks for gcBlockTimes now
for timestamps, so they should always be added. This fixes

    2025-01-13T23:28:57.340+0300    ERROR   failed to get block timestamp transfer GC       {"time": "1.162µs", "index": 20000}

for RemoveUntraceableBlocks-only configurations.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-14 12:43:15 +03:00
Roman Khimov
ba0ca6a4ab core: perform synchronized persist if GC took some time
The intention here is to reduce the amount of in-flight changes and prevent
OOM. It doesn't matter what we're doing, persisting or collecting garbage,
what matters is that we're behind the schedule of regular persist cycle.

Refs. #3783.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-13 23:39:48 +03:00
Roman Khimov
1f83f472c7 core: swap transfer and MPT GC
It doesn't change anything logically, but transfer GC needs to have current
block timestamp for its logic and if we're delaying it with MPT GC it can
more often fail to obtain it:

    2025-01-13T16:15:18.311+0300    ERROR   failed to get block timestamp transfer GC       {"time": "1.022µs", "index": 20000}

It's not critical, this garbage can still be collected on the next run, but
we better avoid this anyway.

Refs. #3783.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-01-13 23:37:21 +03:00
Anna Shaleva
4d2b88dd9d
Merge pull request #3778 from nspcc-dev/archival-node
Archival node
2024-12-28 12:07:28 +03:00
Roman Khimov
82b400700f capability: add ArchivalNode, fix #3776
This will be used to differentiate full history nodes from state only. Currently
it's just a definition, we can not use it safely on current networks because
nodes will refuse this Version, so actual code using the attribute will be
added in newer versions.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-28 10:51:40 +03:00
Roman Khimov
4720727bf5 capability: allow to decode unknown capabilities
It's more symmetric than the C# counterpart, but the essence is the same: we
can accept capabilities we can't interpret. Refs. https://github.com/neo-project/neo/pull/3639

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-28 10:51:40 +03:00
Roman Khimov
47b679341b capability: specify reserved type range
Follow https://github.com/neo-project/neo/pull/3639.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-28 10:51:40 +03:00
Roman Khimov
e0338b7ed0 capability: improve FullNode documentation
That's the way it's defined and used in C#, see https://github.com/neo-project/neo/pull/3639 also.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-27 12:14:48 +03:00
Anna Shaleva
64c4de4e38
Merge pull request #3700 from nspcc-dev/nep-27-candidate-registration
NEO candidate registration via NEP-27 callback
2024-12-25 10:50:03 +03:00
Roman Khimov
38b9b13098 blockfetcher: make UT work with AIO started
Connection succeeds when AIO is running, some more obscure port is less likely
to cause this problem.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-25 10:36:38 +03:00
Roman Khimov
4d45be8434 native: add candidate registration via onNEP17Payment
Solves two problems:
 * inability to estimate GAS needed for registerCandidate in a regular way
   because of its very high fee (more than what normal RPC servers allow)
 * inability to have MaxBlockSystemFee lower than the registration price
   which is very high on its own (more than practically possible to execute)

See https://github.com/neo-project/neo/issues/3552.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-25 10:36:38 +03:00
Roman Khimov
ab5128fb48 config: enable Echidna for tests
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-12-24 18:01:12 +03:00
Anna Shaleva
dc747ce3b7
Merge pull request #3761 from nspcc-dev/designate
native: add Echidna changes
2024-12-24 10:36:36 +03:00
Ekaterina Pavlova
663146aa1f examples: update neo-go deps
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-23 17:01:20 +01:00
Ekaterina Pavlova
86b2493edd *: update interop deps
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-23 15:57:05 +01:00
Ekaterina Pavlova
80e18222bc native: add callflag.AllowNotify to some methods to HFEchidna
Close #3702

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-23 15:54:56 +01:00
Ekaterina Pavlova
b096e68428 native: add Base64URL support to the StdLib starting from HFEchidna
Close #3550

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-23 15:54:56 +01:00
Ekaterina Pavlova
dc68e39811 native: add Designation event extension starting from HFEchidna
Close #3549

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-23 15:54:54 +01:00
Anna Shaleva
992890721a
Merge pull request #3771 from Chubru/feat/add_LoadContract
Add 'neotest.ReadNEF' method
2024-12-20 20:53:13 +03:00
Anna Shaleva
cffafc4e79
Merge pull request #3759 from nspcc-dev/container-update
config: update NeoFSBlockFetcher's ContainerID
2024-12-20 20:10:59 +03:00
Chubru
0b21d4caf6
neotest: Add 'ReadNEF' method
Signed-off-by: Chubru <chubru.alexander@gmail.com>
2024-12-20 16:03:03 +03:00
Anna Shaleva
6d20772714
Merge pull request #3763 from nspcc-dev/index-duplicates
cli: add warning for duplicated index files in `upload-bin`
2024-12-17 16:27:50 +03:00
Anna Shaleva
b86c6201d3
Merge pull request #3765 from nspcc-dev/gnark-up
zkp: bump golang.org/x/crypto from 0.26.0 to 0.31.0
2024-12-17 16:24:09 +03:00
Ekaterina Pavlova
c669ae343b cli: add warning for duplicated index files in upload-bin
As we are not afraid of duplicates this is not a critical error anymore.
BlockFetcher will take the first returned by search.

Close #3762

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-17 16:19:07 +03:00
Anna Shaleva
c27101a97c
Merge pull request #3760 from nspcc-dev/default-attr
cli: take care of `upload-bin` defaults
2024-12-17 16:13:21 +03:00
Anna Shaleva
4b7b2ef701 docs: take care of upload-bin documentation
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-12-17 10:18:34 +03:00
Anna Shaleva
0bb6c6e6bd cli: take care of upload-bin defaults
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-12-16 15:54:15 +03:00
Ekaterina Pavlova
6d509896fb config: update NeoFSBlockFetcher's ContainerID
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-12-16 14:26:40 +03:00
Anna Shaleva
24f81a7f3e
Merge pull request #3758 from nspcc-dev/sdk-fix
services: fix error check for NeoFS client Dial
2024-12-16 12:36:03 +03:00