Remove account registration/deregistration and ingestion filtering#510
Merged
aditya1702 merged 688 commits intomainfrom Mar 6, 2026
Merged
Remove account registration/deregistration and ingestion filtering#510aditya1702 merged 688 commits intomainfrom
aditya1702 merged 688 commits intomainfrom
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into timescale
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the “registered accounts” concept end-to-end (API, services, ingestion filtering, persistence), aligning the wallet backend with an “index everything” indexer-style model.
Changes:
- Removed account registration/deregistration from GraphQL schema/resolvers, the
wbclient, and related services/tests. - Removed participant-based ingestion filtering and simplified ingestion persistence to always insert full buffer contents.
- Dropped the
accountstable + “active accounts” metrics and updated fee-bump eligibility/tests to rely onchannel_accounts.
Reviewed changes
Copilot reviewed 43 out of 45 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/wbclient/types/types.go | Removes register/deregister request/response types from the client types package. |
| pkg/wbclient/queries.go | Removes GraphQL mutation builders for register/deregister. |
| pkg/wbclient/client.go | Removes Client.RegisterAccount / Client.DeregisterAccount methods and payload wrappers. |
| openapi/main.yaml | Deletes the OpenAPI spec (previously included account registration + tx endpoints). |
| internal/services/ingest_test.go | Removes participant-filtering-related tests/fixtures and DB setup for accounts. |
| internal/services/ingest_live.go | Stops filtering ingestion data; inserts full buffer into DB and returns inserted tx/op counts directly. |
| internal/services/ingest_backfill.go | Removes participant filtering step in backfill flush; inserts full buffer. |
| internal/services/ingest.go | Deletes filtering helpers/types and refactors insertIntoDB to read directly from buffer. |
| internal/services/fee_bump_service_test.go | Updates fee-bump tests to make eligibility depend on channel_accounts instead of accounts. |
| internal/services/account_service_test.go | Removes tests for the deleted account service. |
| internal/services/account_service.go | Removes the account registration/deregistration service implementation. |
| internal/serve/serve.go | Removes AccountService wiring and the filtering config flag from server deps/config. |
| internal/serve/graphql/schema/mutations.graphqls | Removes registerAccount / deregisterAccount mutations and related input/payload types. |
| internal/serve/graphql/resolvers/transaction_resolvers_test.go | Updates metrics expectations to use transactions_accounts instead of accounts. |
| internal/serve/graphql/resolvers/test_utils.go | Removes accounts table setup/teardown from resolver test DB utilities. |
| internal/serve/graphql/resolvers/statechange_resolvers_test.go | Updates metrics expectations to use state_changes (via state-change-based account lookup) instead of accounts. |
| internal/serve/graphql/resolvers/resolver.go | Removes AccountService dependency and filtering flag from resolver constructor/config. |
| internal/serve/graphql/resolvers/queries_resolvers_test.go | Updates account query test to reflect “always return account object” semantics. |
| internal/serve/graphql/resolvers/queries.resolvers.go | Simplifies AccountByAddress to return an account object without DB lookup. |
| internal/serve/graphql/resolvers/operation_resolvers_test.go | Updates metrics expectations to use operations_accounts instead of accounts. |
| internal/serve/graphql/resolvers/mutations_resolvers_test.go | Removes register/deregister mutation tests and the mocked account service. |
| internal/serve/graphql/resolvers/mutations.resolvers.go | Removes register/deregister resolver implementations and associated imports. |
| internal/serve/graphql/resolvers/errors.go | Removes account registration/deregistration error message constants. |
| internal/serve/graphql/generated/models_gen.go | Removes generated models for register/deregister inputs/payloads. |
| internal/serve/graphql/generated/generated.go | Removes generated schema/runtime code for register/deregister mutations and payload types. |
| internal/metrics/mocks.go | Removes mock methods for active-account metrics. |
| internal/metrics/metrics_test.go | Removes tests for the active-accounts metric. |
| internal/metrics/metrics.go | Removes active-accounts metric and interface methods. |
| internal/loadtest/runner.go | Removes participant-filtering config from loadtest ingest service wiring. |
| internal/integrationtests/main_test.go | Removes registration-related integration test suite invocation. |
| internal/integrationtests/accounts_register_test.go | Removes integration test suite that validated registration + participant filtering. |
| internal/ingest/ingest.go | Removes EnableParticipantFiltering config and wiring into the ingest service. |
| internal/indexer/indexer_buffer_test.go | Removes GetAllParticipants tests and merge behavior tests tied to filtering support. |
| internal/indexer/indexer_buffer.go | Removes global participant tracking (allParticipants) and related methods/merge/clear logic. |
| internal/indexer/indexer.go | Removes GetAllParticipants from the IndexerBufferInterface. |
| internal/db/migrations/2024-04-29.1-accounts.sql | Removes the migration that created/dropped the accounts table. |
| internal/db/migrate_test.go | Updates migration ordering expectations after removing the accounts migration. |
| internal/data/transactions_test.go | Removes test setup inserts into the deleted accounts table. |
| internal/data/statechanges_test.go | Removes test setup inserts into the deleted accounts table. |
| internal/data/operations_test.go | Removes test setup inserts into the deleted accounts table. |
| internal/data/accounts_test.go | Removes tests for deleted CRUD/lookup APIs; updates remaining tests/metrics labels for join-table-based account lookups and channel-account fee-bump eligibility. |
| internal/data/accounts.go | Removes accounts-table CRUD and registered-account eligibility; updates fee-bump eligibility + metrics labels and keeps join-table batch lookups. |
| cmd/utils/global_options.go | Removes CLI option for participant filtering. |
| cmd/serve.go | Removes participant-filtering flag wiring from the serve command. |
| cmd/ingest.go | Removes participant-filtering flag wiring from the ingest command. |
Comments suppressed due to low confidence (1)
openapi/main.yaml:1
- This PR deletes the entire OpenAPI spec (
openapi/main.yaml). If the intent is only to remove registration/deregistration endpoints, consider updating the spec to reflect the remaining REST surface (e.g., fee-bump / transaction build) rather than removing it, since other repo docs/tools may rely on this file for API documentation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This reverts commit c3f871f.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remove all code related to account registration/deregistration.
Why
We have decided to keep wallet backend simple and store everything like a normal indexer would. If the need for a register/deregister workflow arises in the future, we will re-evaluate and add the logic then.
Known limitations
N/A
Issue that this PR addresses
Closes #520