Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netmap with nodev2 #3088

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Netmap with nodev2 #3088

wants to merge 21 commits into from

Conversation

roman-khimov
Copy link
Member

Fixes #3047, fixes #1914. The logic is rather simple:

  • we update to 0.45.0, SNs push data to both lists
  • the switch is turned on and we're using new lists now
  • old methods and data to be removed afterwards

Related to nspcc-dev/neofs-contract#461, once it's there the default will be to use v2 for new installations.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 1.46699% with 403 lines in your changes missing coverage. Please review.

Project coverage is 22.38%. Comparing base (5279df2) to head (e958bcb).

Files with missing lines Patch % Lines
pkg/morph/client/netmap/netmap.go 0.00% 98 Missing ⚠️
...-adm/internal/modules/fschain/netmap_candidates.go 0.00% 61 Missing ⚠️
pkg/morph/event/netmap/add_peer_notary.go 0.00% 54 Missing ⚠️
cmd/neofs-node/netmap.go 0.00% 38 Missing ⚠️
pkg/innerring/processors/netmap/process_peers.go 0.00% 25 Missing ⚠️
pkg/morph/client/netmap/add_peer.go 0.00% 23 Missing ⚠️
cmd/neofs-node/config.go 0.00% 21 Missing ⚠️
pkg/innerring/processors/netmap/handlers.go 0.00% 17 Missing ⚠️
pkg/innerring/processors/netmap/processor.go 0.00% 14 Missing ⚠️
pkg/morph/client/netmap/client.go 0.00% 11 Missing ⚠️
... and 15 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3088      +/-   ##
==========================================
- Coverage   22.47%   22.38%   -0.10%     
==========================================
  Files         751      749       -2     
  Lines       57804    58065     +261     
==========================================
+ Hits        12991    12995       +4     
- Misses      43929    44185     +256     
- Partials      884      885       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roman-khimov roman-khimov marked this pull request as draft January 22, 2025 20:37
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Jan 23, 2025
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 nspcc-dev/neofs-node#3088.

Signed-off-by: Roman Khimov <[email protected]>
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Jan 23, 2025
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 nspcc-dev/neofs-node#3088.

Signed-off-by: Roman Khimov <[email protected]>
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Jan 24, 2025
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 nspcc-dev/neofs-node#3088.

Signed-off-by: Roman Khimov <[email protected]>
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Jan 24, 2025
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 nspcc-dev/neofs-node#3088.

Signed-off-by: Roman Khimov <[email protected]>
Useless, NodeInfo can be passed directly and InvokePrmOptional is never used.

Signed-off-by: Roman Khimov <[email protected]>
But only if not converted to v2 node yet. We're keeping both for old networks
till they make a switch, then only v2 nodes are used.

Signed-off-by: Roman Khimov <[email protected]>
It's not adding any value.

Signed-off-by: Roman Khimov <[email protected]>
This logic is present since 2bd827a, but
sending tx every epoch is simpler and more reliable. The overhead is
negligible.

Signed-off-by: Roman Khimov <[email protected]>
Most of the time we don't need a complete AddPeer/AddNode. Fixes #1914.

Signed-off-by: Roman Khimov <[email protected]>
It's not provided for NodeV2, most of the time we need the latest and greatest,
when we don't usually epoch is known, so this interface is not really needed.

Signed-off-by: Roman Khimov <[email protected]>
It's not expected to be used, but semantically it's very much similar to
Array's PACK.

Signed-off-by: Roman Khimov <[email protected]>
Simiilar to PACK/PACKSTRUCT, but takes twice as manu arguments.

Signed-off-by: Roman Khimov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use new netmap method after contract update Send UpdateState instead of AddPeer as node's heartbeat
1 participant