mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-04 10:53:19 +00:00
Auto-sharding currently produces shard ids in the range [0..NUM_SHARDS_IN_NETWORK-1], derived from the content topic hash. To interoperate with Status, which uses a specific set of shard values, we need to be able to force the actual shard values while keeping the auto-sharding distribution. This adds an optional shard override array (length NUM_SHARDS_IN_NETWORK): auto-sharding still hashes the content topic to an index, but the shard id placed in the pubsub topic becomes shardOverride[index] instead of the index itself. Wired through: - Sharding.getGenZeroShard remaps the computed index via shardOverride - ShardingConf gains a shardOverride field; default subscribe shards and shard validation use the actual (override) shard values - WakuConfBuilder.withShardOverride + buildShardingConf threading - CLI arg --shard-override (repeatable) - mountAutoSharding accepts the override (validates length) - api_conf AutoShardingConfig gains shardOverride (+ JSON) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>