Skip to content

feat: Add persistent shard and realm support to Client #1395

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

Merged
merged 10 commits into from
Jun 25, 2025

Conversation

0xivanov
Copy link
Contributor

@0xivanov 0xivanov commented Jun 3, 2025

Description:
Adds persistent realm and shard according to hiero-ledger/sdk-collaboration-hub#28

New APIs

  • ClientForNetworkV2 : extracts the shard and realm from the network map and persists it
  • GetShard
  • GetRealm

Updated APIs

  • ClientFromConfig : can now accept shard and realm into the json schema

Deprecation notice

  • ClientForMirrorNetworkWithRealmAndShard : Use ClientForMirrorNetworkWithShardAndRealm instead.
  • ClientForNetwork : Use ClientForNetworkV2 instead.

Related issue(s):

Fixes #1404

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Ivan Ivanov <[email protected]>
@lfdt-bot
Copy link

lfdt-bot commented Jun 3, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 77.58621% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdk/client.go 76.36% 12 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
sdk/file_id.go 77.86% <100.00%> (ø)
sdk/client.go 65.37% <76.36%> (+0.13%) ⬆️

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Ivan Ivanov <[email protected]>
0xivanov added 3 commits June 10, 2025 14:16
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
@0xivanov 0xivanov changed the title WIP: Init client with shard and realm Init client with shard and realm Jun 12, 2025
@0xivanov 0xivanov marked this pull request as ready for review June 12, 2025 07:03
@0xivanov 0xivanov requested review from a team as code owners June 12, 2025 07:03
@0xivanov 0xivanov requested a review from gsstoykov June 12, 2025 07:03
@0xivanov 0xivanov changed the title Init client with shard and realm feat: Add persistent realm and shard support to Client Jun 12, 2025
@0xivanov 0xivanov changed the title feat: Add persistent realm and shard support to Client feat: Add persistent shard and realm support to Client Jun 12, 2025
0xivanov added 3 commits June 12, 2025 11:10
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
Signed-off-by: Ivan Ivanov <[email protected]>
@lfdt-bot
Copy link

lfdt-bot commented Jun 25, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

Signed-off-by: Ivan Ivanov <[email protected]>
Copy link
Contributor

@gsstoykov gsstoykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsstoykov gsstoykov merged commit 1dbeb43 into main Jun 25, 2025
12 checks passed
@gsstoykov gsstoykov deleted the shard-realm-client branch June 25, 2025 09:03
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.

Add persistent realm and shard support to Client
3 participants