pokt-network / poktroll

The official Shannon upgrade implementation of the Pocket Network Protocol implemented using Rollkit.dev
MIT License
15 stars 6 forks source link

[Application] Add GetRingAddressesAtSessionEndHeight #634

Closed red-0ne closed 3 days ago

red-0ne commented 4 days ago

Summary

Add a static GetRingAddressesAtSessionEndHeight function that receives a sessionEndBlockHeight instead of an arbitrary blockHeight.

Make GetRingAddressesAtBlock use GetRingAddressesAtSessionEndHeight.

Issue

The static GetRingAddressesAtBlock depends on the shared package to get sessionEndBlockHeight out of an arbitrary blockHeight and sharedparams. This implies that the environment using GetRingAddressesBlock needs to have a sharedClient dependency.

The shannon-sdk needs to get the the application's ring to sign a RelayRequest and is currently needing a sharedClient and an additional request just for the sake of getting a sessionEndBlockHeight. While this one is available on the fetched session's meta.

In order to avoid pulling this dependency or reimplementing ring generation. GetRingAddressesAtSessionEndHeight accepts a sessionEndHeight that the caller could retrieve by other means than querying the sharedParams module.

Type of change

Select one or more:

Testing

Documentation changes (only if making doc changes)

Local Testing (only if making code changes)

PR Testing (only if making code changes)

Sanity Checklist

github-actions[bot] commented 4 days ago

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 634)) Grafana network dashboard for devnet-issue-{issue-id}