Skip to content

chore: Extend AutoSharding with capability to handle arbitrary set of shards#3719

Draft
NagyZoltanPeter wants to merge 1 commit into
masterfrom
chore-autosharding-support-static-shard-config
Draft

chore: Extend AutoSharding with capability to handle arbitrary set of shards#3719
NagyZoltanPeter wants to merge 1 commit into
masterfrom
chore-autosharding-support-static-shard-config

Conversation

@NagyZoltanPeter
Copy link
Copy Markdown
Contributor

Description

This PR was ready when we discussed with @igor-sirotin to postpone such feature till we are sure demand for it.
Intent of the PR to have it ready as a reminder and re-use later if needed.

As new SendAPI and LogosMessageDelivery API will not support former static sharding on API interface. I found this is a gap where such autosharding node cannot properly select shards on network configured to static sharding (like status fleets) with arbitrary shards (non consecutive sequence of shard numbering).

This extension allows autoshading mounted for both configuration, so enable using autosharding publishing (when no pubsubTopic is provided). It is achieved with selecting shard from the supported shards list by the hash calculated index.
This allows support for any kind of shard selected properly.

This change does not break any previous functionality.

Changes

  • mounting of Autosharding is done for both type of sharding configured.
  • shard calculation is extended to select shard by index calculated from content_topic

Issue

#3432
#3709

…, and enable using it with static sharded network configurations. This can fill the gap that new messaging API does not support static sharding at all, this enhacement let's such API just cooperate with any network shard configuration without compromising backward compatibility of kernel API.
@github-actions
Copy link
Copy Markdown

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3719

Built from 70084f2

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.

1 participant