Skip to content

Conversation

dskloetc
Copy link
Contributor

@dskloetc dskloetc commented Aug 21, 2025

https://smartcontract-it.atlassian.net/browse/OPDATA-3674

Description

When proof-of-reserves is told to use ethereum-cl-indexer it assumes the etherFiBalance endpoint and implements special handling logic for it.

ethereum-cl-indexer now also has a generic porBalance endpoint, which doesn't require special handling, except for checking that the results are valid.

Changes

  1. Pass indexerEndpoint to runReduceAdapter.
  2. In runReduceAdapter, if the indexer is ethereum-cl-indexer, use different logic depending on the indexerEndpoint.
  3. For the porBalance endpoint, check validity and then use the default handling.

Steps to Test

  1. Unit tests added.
  2. Manually tested end-to-end with this request to proof-of-reserves:
    {
      "protocol": "por_address_list",
      "protocolEndpoint": "virtune",
      "accountId": "VIRSETHS",
      "network": "ethereum",
      "chainId": "1",
      "indexer": "ethereum_cl_indexer",
      "indexerEndpoint": "porBalance"
    }

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file or update the soak testing blacklist.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

Copy link

changeset-bot bot commented Aug 21, 2025

🦋 Changeset detected

Latest commit: e56fa98

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@chainlink/proof-of-reserves-adapter Minor
@chainlink/renvm-address-set-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dskloetc dskloetc marked this pull request as ready for review September 5, 2025 10:39
@dskloetc dskloetc requested a review from a team September 5, 2025 10:40
@dskloetc dskloetc requested a review from mxiao-cll September 5, 2025 13:12
@dskloetc dskloetc requested a review from mxiao-cll September 5, 2025 13:29
@dskloetc dskloetc enabled auto-merge (squash) September 5, 2025 14:07
@dskloetc dskloetc merged commit 295416c into main Sep 5, 2025
19 checks passed
@dskloetc dskloetc deleted the feature/kloet/withdrawal-credential branch September 5, 2025 14:10
@github-actions github-actions bot mentioned this pull request Sep 5, 2025
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.

2 participants